Skip to content

πŸš€ Automated Email-to-WordPress pipeline powered by AI. Transform press releases into SEO-optimized articles with Claude, GPT-4, Gemini or Ollama. Features: Web dashboard, multi-AI providers, customizable prompts, auto-publish mode, real-time notifications. IMAP monitoring β†’ AI generation β†’ WordPress draft publishing.

License

Notifications You must be signed in to change notification settings

mkarki/wordpress-article-maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WordPress Article Maker

πŸš€ Automated pipeline that transforms emails (press releases) into WordPress articles using AI.

Dashboard AI WordPress License

✨ Features

  • πŸ“§ IMAP Monitoring - Automatic email fetching from any mailbox
  • πŸ€– Multi-AI Support - Claude, GPT-4, Gemini, or Ollama (local)
  • πŸ“ Preview Mode - Review articles before publishing
  • πŸš€ WordPress Publishing - Direct draft publishing via REST API
  • βš™οΈ Web Dashboard - Full configuration interface with real-time notifications
  • πŸ”„ Auto Mode - Fully automated workflow without manual intervention
  • 🎨 Custom Prompts - Customize AI instructions for your writing style

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ IMAP Poller β”‚ β†’ Fetch emails
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Parser & Converter  β”‚ β†’ HTML β†’ Markdown
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ AI Generator    β”‚ β†’ Generate article (Claude/GPT/Gemini/Ollama)
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ WordPress API   β”‚ β†’ Publish as draft
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ Installation

# Clone the repo
git clone https://github.com/mkarki/wordpress-article-maker.git
cd wordpress-article-maker

# Install dependencies
pip install -r requirements.txt

# Copy and configure
cp config.env.example config.env
# Edit config.env with your credentials

βš™οΈ Configuration

Edit config.env:

# Email IMAP (Gmail requires App Password)
IMAP_HOST=imap.gmail.com
IMAP_EMAIL=your-email@gmail.com
IMAP_PASSWORD=xxxx xxxx xxxx xxxx

# WordPress (create Application Password in WP Admin)
WP_URL=https://your-site.com
WP_USER=your-username
WP_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx

# AI Provider (anthropic, openai, gemini, ollama)
AI_PROVIDER=anthropic

# Anthropic
ANTHROPIC_API_KEY=sk-ant-xxx
ANTHROPIC_MODEL=claude-sonnet-4-5-20250929

# OpenAI
OPENAI_API_KEY=sk-xxx
OPENAI_MODEL=gpt-4o

# Google Gemini
GEMINI_API_KEY=xxx
GEMINI_MODEL=gemini-1.5-pro

# Ollama (local)
OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=llama3

# Options
CHECK_INTERVAL=300          # Check interval in seconds
TARGET_LANG=en              # Target language
MAX_EMAILS_PER_CYCLE=5      # Max emails per cycle
AUTO_PUBLISH=false          # Auto mode
FILTER_SENDER=              # Filter by sender (optional)

πŸ” Gmail: Create App Password

  1. Enable 2-Step Verification on your Google account
  2. Go to https://myaccount.google.com/apppasswords
  3. Create a password for "Mail"
  4. Copy the generated password (format: xxxx xxxx xxxx xxxx)

πŸ” WordPress: Create Application Password

  1. WordPress Admin β†’ Users β†’ Profile
  2. Section "Application Passwords"
  3. Create a new password

πŸš€ Usage

Web Dashboard (recommended)

python run.py
# Open http://localhost:5050

CLI Mode (automatic)

python app/main.py

Docker

docker build -t wordpress-article-maker .
docker run -d --env-file config.env -p 5050:5050 wordpress-article-maker

πŸ“Š Dashboard

The web dashboard allows you to:

Tab Description
πŸ“§ Emails View and select emails to process
πŸ“ Pending Articles Manage generated articles before publishing
πŸ“Š History View articles published to WordPress
βš™οΈ Configuration Configure IMAP, WordPress, AI provider and prompt

πŸ€– Supported AI Providers

Provider Models
Anthropic Claude Sonnet 4.5, Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Haiku
OpenAI GPT-4o, GPT-4o Mini, GPT-4 Turbo, GPT-3.5 Turbo
Google Gemini 1.5 Pro, Gemini 1.5 Flash, Gemini Pro
Ollama Any local model (llama3, mistral, etc.)

πŸ’° Costs

  • Claude Sonnet 4: ~$0.003 per article
  • GPT-4o: ~$0.005 per article
  • Gemini 1.5 Pro: ~$0.002 per article
  • Ollama: Free (local)

πŸ“ Structure

wordpress-article-maker/
β”œβ”€β”€ app/                   # Source code
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ dashboard.py       # Flask dashboard
β”‚   β”œβ”€β”€ main.py            # CLI mode
β”‚   └── templates/
β”‚       └── dashboard.html # Web interface
β”œβ”€β”€ data/                  # Runtime data (not versioned)
β”œβ”€β”€ config.env             # Configuration (not versioned)
β”œβ”€β”€ config.env.example     # Configuration template
β”œβ”€β”€ requirements.txt       # Python dependencies
β”œβ”€β”€ run.py                 # Entry point
β”œβ”€β”€ Dockerfile             # Docker deployment
β”œβ”€β”€ README.md
└── LICENSE

πŸ“„ License

MIT License

About

πŸš€ Automated Email-to-WordPress pipeline powered by AI. Transform press releases into SEO-optimized articles with Claude, GPT-4, Gemini or Ollama. Features: Web dashboard, multi-AI providers, customizable prompts, auto-publish mode, real-time notifications. IMAP monitoring β†’ AI generation β†’ WordPress draft publishing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published