An elite, fully autonomous AI journalism pipeline. It scrapes 11 tech news feeds, extracts facts, and drafts heavily detailed 1,200-word articles using an invincible multi-LLM waterfall. The AI-generated Markdown is committed directly to GitHub, triggering a CI/CD GitHub Action that builds the Hugo site and hosts it live on GitHub Pages (
ltdeveloperblogs.github.io). Finally, it instantly broadcasts the live URL to 10 distinct social networks and publishing platforms.
Because standard flowchart rendering can be slow or unresponsive on GitHub, here is the high-speed visualization of the entire pipeline logic:
[ π 11 RSS Feeds ]β[ π Python Web Scraper (Removes JS/CSS/Navbars) ]β[ π§ AI Fact Extractor ]β[ πΎ queue.json ]
[ π System Prompt & Content Rules ]β[ π Groq Llama-3 (Primary) ]
β³ If rate-limited or failed, automatically falls back to:
[ π GitHub Models ]β[ πͺοΈ Mistral ]β[ β¨ Gemini ]β[ πͺ OpenRouter ]β[ π² Cohere ]
[ π YAML Frontmatter Validator ]β[ β’οΈ Nuclear Link Fixer (Fuzzy-Heals Broken Links) ]β[ π¦ Git Commit Markdown ]β[ βοΈ Push to GitHub 'main' ]
[ β‘ Action Triggered by Push ]β[ π Restore Git Timestamps ]β[ ποΈ Hugo Build (Hinode Theme) ]β[ π Live on GitHub Pages ]
[ π‘ Ping Google/Bing Indexing APIs ]β[ π Execute share_to_social_media() ]
β£ βπ Facebook Page
β£ βπΌ LinkedIn
β£ βπ¦ Bluesky
β£ βπ Mastodon
β£ βπ Tumblr
β£ βπ©βπ» DEV.to
β£ βπ ±οΈ Blogger
β£ βπ WordPress.com
β£ βπ¨βπ» CoderLegion
β ββ‘ Kleap (Direct PostgreSQL HTML Injection)
- Invincible Multi-LLM Waterfall Engine: Never fail a generation. If the primary Groq endpoint hits a rate limit, the system gracefully degrades through a cascade of 5 fallback models (GitHub Models, Mistral, Gemini, OpenRouter, Cohere) until a successful response is achieved.
- Zero-Credit Kleap Database Injection: Bypasses standard Kleap AI credits by formatting Markdown into clean HTML tags and
POSTing the rows directly into Kleap's live PostgreSQLarticlestable via their REST API. - Nuclear Link Fixer: Automatically scans the entire
.mdrepository for dead internal links before Hugo builds the site. It usesdifflibfuzzy-matching to repair broken markdown paths and silently vaporizes unfixable links to guarantee the SSG build never crashes. - GitHub Pages CI/CD: Python isn't deploying the siteβit strictly writes content and pushes to Git. A robust GitHub Actions YAML workflow (
hugo.yaml) listens for those commits, restores file modification times, installs Dart Sass, compiles Hugo, and hosts the result perfectly on GitHub Pages. - Dynamic Fallback Image Generation: If RSS feeds or Unsplash APIs fail to provide a cover image, the pipeline uses Python's
Pillowlibrary to programmatically render a beautiful, space-themed typography thumbnail on the fly. - Smart Truncation & Summarization: Social APIs have wildly different length limits. The broadcaster uses regex and sentence-boundary math to dynamically truncate summaries for Mastodon (495 chars), Bluesky (295 chars), and LinkedIn, ensuring no post is cut off mid-word.
This powerhouse architecture integrates 17 distinct API keys and tokens. All of these must be securely stored in GitHub Repository Settings > Secrets and variables > Actions.
| Environment Variable | Purpose & Platform |
|---|---|
GROQ_API_KEY |
Primary ultra-fast generation (Llama 3, Mixtral) |
GH_TOKEN |
First fallback (GitHub Models inference) |
MISTRAL_API_KEY |
Second fallback (Mistral Large) |
GEMINI_API_KEY |
Third fallback (Gemini 1.5 Flash) |
OPENROUTER_API_KEY |
Fourth fallback (Gemma / OpenRouter routing) |
COHERE_API_KEY |
Fifth fallback (Cohere Command-R) |
| Environment Variable | Purpose & Platform |
|---|---|
KLEAP_API_KEY |
Direct Postgres DB row insertion for Kleap (kleap.co) |
WP_COM_CLIENT_ID, WP_COM_CLIENT_SECRET, WP_COM_USERNAME, WP_COM_PASSWORD, WP_COM_SITE_DOMAIN |
Complete OAuth password grant flow for WordPress.com REST API |
BLOGGER_BLOG_ID, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_REFRESH_TOKEN |
OAuth2 Refresh Token architecture for Google Blogger |
DEVTO_API_KEY |
Markdown payload delivery to DEV.to |
CODERLEGION_API_KEY |
Blob uploads and content pushing to CoderLegion |
TUMBLR_KEY, TUMBLR_SECRET, TUMBLR_OAUTH, TUMBLR_OAUTH_SECRET, TUMBLR_BLOG_NAME |
OAuth1 signature authentication for Tumblr |
| Environment Variable | Purpose & Platform |
|---|---|
LINKEDIN_TOKEN, LINKEDIN_URN |
Rich media image asset uploading and embedding for LinkedIn |
BSKY_HANDLE, BSKY_PASSWORD |
AT Protocol image uploads and text formatting for Bluesky |
MASTODON_ACCESS_TOKEN, MASTODON_INSTANCE |
Instance-agnostic API broadcasting for Mastodon |
FB_PAGE_TOKEN, FB_PAGE_ID |
Facebook Graph API automated page posts |
GCP_INDEXING_JSON |
Instant Google Search indexing via GCP Service Account |
BING_API_KEY |
Instant URL submission via Bing Webmaster Tools |
UNSPLASH_ACCESS_KEY |
Secondary fallback cover image fetching via Unsplash API |