A fully automated system for generating and publishing daily tech news blog posts using AI and RSS feeds. This system fetches the latest tech news, uses AI to generate blog content, and publishes to GitHub Pages with minimal human interaction using the Minimal Mistakes Jekyll theme.
- Fetches tech news from multiple RSS feeds
- Generates high-quality blog posts using AI (supports OpenAI and Google Gemini)
- Downloads and locally stores images from news articles
- Creates properly formatted Jekyll posts for Minimal Mistakes theme
- Publishes to GitHub repository automatically
- Flexible AI provider system - switch between different AI providers easily
- Modular design for easy maintenance and extension
- Python 3.8+ (standard method) OR Docker (containerized method)
- GitHub account
- API keys for AI providers (OpenAI and/or Google Gemini)
- GitHub Personal Access Token with repo scope
- Clone this Repository
git clone https://github.com/yourusername/auto_blog.git
cd auto_blog
- Configure Environment Variables Copy the example environment file and fill in your details:
cp auto_blog/.env.example .env
Edit the .env
file with your API keys and GitHub credentials.
- Run the Setup Script This will create a virtual environment and set up the Minimal Mistakes blog repository:
# On Linux/Mac
./setup.py
# On Windows
python setup.py
- Run the System Generate and publish blog posts:
# On Linux/Mac
./run.py
# On Windows
python run.py
For the easiest experience, especially on Android or other platforms, use our Docker container:
- Get the Code and Configure
git clone https://github.com/yourusername/auto_blog.git
cd auto_blog
cp .env.example .env
# Edit .env with your credentials
- Build and Run with Docker
# Build the Docker image
./run-docker.sh build
# Run the system
./run-docker.sh run
That's it! The Docker container includes all dependencies and handles everything automatically.
- For Android Users
# Install and setup Docker on Termux
./android-docker.sh setup
# Build and run
./android-docker.sh build
./android-docker.sh run
See DOCKER_USAGE.md for detailed Docker instructions.
- Go to your GitHub repository
- Navigate to Settings → Pages
- Under "Source", select "Deploy from a branch"
- Select your branch (main) and the root folder (/)
- Click Save
Your blog will be available at: https://yourusername.github.io/yourrepository/
-
Create a GitHub Repository
- Go to GitHub and create a new repository with the name you specified in
.env
- You don't need to initialize it with any files
- Go to GitHub and create a new repository with the name you specified in
-
Create a Personal Access Token
- Go to GitHub Settings → Developer Settings → Personal access tokens → Tokens (classic)
- Click "Generate new token", give it a descriptive name
- Select the "repo" scope (gives full control of private repositories)
- Copy the token and add it to your
.env
file asGITHUB_TOKEN
You can choose between OpenAI (GPT models) and Google Gemini for content generation:
-
Using OpenAI
- Sign up for an API key at OpenAI
- Set
AI_PROVIDER=openai
in your.env
file - Add your API key as
OPENAI_API_KEY
in the.env
file
-
Using Google Gemini
- Sign up for an API key at Google AI Studio
- Set
AI_PROVIDER=gemini
in your.env
file - Add your API key as
GEMINI_API_KEY
in the.env
file
The system comes with default tech news feeds, but you can customize them:
RSS_FEEDS=https://techcrunch.com/feed/,https://www.theverge.com/rss/index.xml,https://www.wired.com/feed,https://arstechnica.com/feed/
Add or remove feeds as needed, separating them with commas.
You can customize the Minimal Mistakes theme by editing these files:
-
_config.yml: Main configuration file in the
github_repo
directory- Set site name, description, author information
- Change color scheme with
minimal_mistakes_skin
- Configure navigation, analytics, comments
-
Navigation: Create or edit
github_repo/_data/navigation.yml
main: - title: "Posts" url: /posts/ - title: "Categories" url: /categories/ - title: "Tags" url: /tags/ - title: "About" url: /about/
-
Profile Picture: Add your photo to
github_repo/assets/images/
and update_config.yml
For more detailed customization, refer to the Minimal Mistakes documentation.
To automatically generate posts daily, you can set up a cron job (Linux/Mac) or Task Scheduler (Windows).
# Open crontab
crontab -e
# Add this line to run daily at 8 AM
0 8 * * * cd /path/to/auto_blog && ./run.py >> logs/cron.log 2>&1
- Open Task Scheduler
- Create a new Basic Task
- Set trigger to Daily
- Action: Start a Program
- Program/script:
C:\path\to\python.exe
- Arguments:
C:\path\to\auto_blog\run.py
# Add to crontab
0 8 * * * cd /path/to/auto_blog && ./run-docker.sh run >> logs/cron.log 2>&1
-
Authentication Errors: Ensure your GitHub token has the correct permissions and is correctly set in the
.env
file -
Dependency Issues: If you encounter errors with dependencies, try running:
pip install -r requirements.txt
-
GitHub Pages Not Building: Check if your repository has GitHub Pages enabled in Settings → Pages
-
Missing Images: If images aren't displaying, check that they're being correctly saved to
github_repo/assets/images/
-
RSS Feed Issues: If specific feeds like Wired.com are causing problems, they will be automatically skipped after multiple timeout attempts
auto_blog/
├── __init__.py
├── main.py # Main entry point
├── config.py # Configuration handling
├── rss_fetcher/ # RSS feed handling
├── ai_content/ # AI integration for different providers
├── image_handler/ # Image downloading and processing
├── post_generator/ # Jekyll post generation
├── github_manager/ # GitHub repository management
└── utils/ # Utility functions
[Your License Here]
Contributions are welcome! Please feel free to submit a Pull Request.