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 Developer Token (obtained from Product Hunt Developer Settings)
- 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 keyPRODUCTHUNT_DEVELOPER_TOKEN: Your Product Hunt Developer TokenPAT: Personal Access Token for pushing changes to the repositoryWORDPRESS_URL: Your WordPress website URLWORDPRESS_USERNAME: Your WordPress usernameWORDPRESS_PASSWORD: Your WordPress password
-
Get Product Hunt Developer Token:
- Visit Product Hunt Developer Settings
- Log in to your account
- Create a new application in the developer settings
- Obtain the Developer Token
-
GitHub Actions Workflow:
The workflow is defined in
.github/workflows/generate_markdown.ymland.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.pyto customize the format or add additional content. - Adjust the schedule in
.github/workflows/generate_markdown.ymlif 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.
