Product Hunt Daily Hot is a GitHub Action-based automation tool that generates a daily Markdown file summarizing the top products from Product Hunt and automatically commits it to a GitHub repository. The project aims to help users quickly view the daily Product Hunt leaderboard and provide more detailed product information.
- Automated Data Retrieval: Automatically retrieves the top 30 products from Product Hunt from the previous day.
- Keyword Generation: Generates easy-to-understand Chinese keywords to help users better understand the product content.
- High-Quality Translation: Uses OpenAI's GPT-4 model to perform high-quality translations of product descriptions.
- Markdown File Generation: Generates Markdown files containing product data, keywords, and translated descriptions, which can be easily published on websites or other platforms.
- Daily Automation: Automatically generates and commits the daily Markdown file via GitHub Actions.
- Configurable Workflow: Supports manual triggering or scheduled generation via GitHub Actions.
- Flexible Customization: The script is easy to extend or modify to include additional product details or adjust the file format.
- Automatic Publishing to WordPress: The generated Markdown files can be automatically published to a WordPress website.
- Python 3.x
- GitHub account and repository
- OpenAI API Key
- Product Hunt API credentials
- WordPress website and credentials (for automatic publishing)
- Clone the repository:
git clone https://github.com/ViggoZ/producthunt-daily-hot.git
cd producthunt-daily-hot
- Install Python dependencies:
Ensure you have Python 3.x installed. Then, install the required packages:
pip install -r requirements.txt
-
GitHub Secrets:
Add the following secrets to your GitHub repository:
OPENAI_API_KEY
: Your OpenAI API key.PRODUCTHUNT_CLIENT_ID
: Your Product Hunt API client ID.PRODUCTHUNT_CLIENT_SECRET
: Your Product Hunt API client secret.PAT
: Personal Access Token for pushing changes to the repository.WORDPRESS_URL
: Your WordPress website URL.WORDPRESS_USERNAME
: Your WordPress username.WORDPRESS_PASSWORD
: Your WordPress password.
-
GitHub Actions Workflow:
The workflow is defined in
.github/workflows/generate_markdown.yml
and.github/workflows/publish_to_wordpress.yml
. It runs daily at 07:01 UTC (15:01 Beijing Time) and can also be manually triggered.
Once set up, the GitHub Action will automatically generate and commit a Markdown file each day with the top products from Product Hunt, and automatically publish it to your WordPress website. These files are stored in the data/
directory.
- Modify
scripts/product_hunt_list_to_md.py
to customize the format or add additional content. - Adjust the schedule in
.github/workflows/generate_markdown.yml
if needed.
The generated files are stored in the data/
directory. Each file is named in the format PH-daily-YYYY-MM-DD.md
.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or new features.
This project is licensed under the MIT License - see the LICENSE file for details.