All projects
Content / ● Maintained

ContentGen-AI

Topic queue in, publish-ready articles out.

Python toolkit that automates SEO-optimized blog and affiliate article generation end to end with the OpenAI API.

2
Live sites running on it
galena.es and ondahertz.es
2
Content shapes supported
Standard posts and affiliate products
3
Search-engine notifiers
IndexNow endpoints pinged on publish
Synced 0m ago
01 / Audience

Who this is for

// Niche site owners
Scale content production across multiple sites from one configurable pipeline.
// Affiliate marketers
Turn product data into topics, descriptions, and organized assets automatically.

The problem

I run a few small AI-generated niche blogs (galena.es and ondahertz.es) and the bottleneck was never ideas, it was the repetitive labor between an idea and a published post: writing the draft, generating an image, naming files, dropping them in the right folder, and pinging search engines. ContentGen-AI exists to remove that labor so I can run several sites without it becoming a second job.

How I built it

The pipeline is driven by a CSV queue. The generator reads the next topic, and if the queue is empty it asks OpenAI for fresh ones and writes them back to the CSV. I chose CSV files over a database deliberately: the workload is a simple ordered queue, CSV is trivial to inspect and hand-edit, and it keeps the toolkit dependency-light and portable.

Each item flows through content generation, then a DALL-E image plus AI-written alt text, then a Markdown file saved into a category-based path. The same script handles two content shapes, standard blog posts and affiliate products, by branching the prompts rather than maintaining two codebases.

For reliability I leaned on observability over cleverness. Telegram notifications report progress and errors at every stage, and bad topics get logged and moved to an error CSV instead of stopping the run. After publishing, the script pings IndexNow endpoints so new articles get crawled fast. Everything site-specific lives in environment variables and a shared config.py, so pointing the toolkit at a new blog is a config change, not a fork.

02 / Quick start

Run it in under a minute

Run the generator
python AI_scripts/generate_article.py