How unixx0/ai-blog-generator works
This is an interactive, LangGraph-based AI blog generator. A user supplies a topic; the workflow optionally researches it, plans sections, writes them in parallel, then assembles markdown and adds generated illustrations. It saves the markdown and offers a human decision point for PDF export. The graph combines README-documented stages with relationships visible in the sampled main.py excerpts; unsampled implementation details are not inferred.
Main entry points: main.py Section writers · logger.py Logging
Components 20
Blog workflow
- Interactive workflow
main.py - Research router
main.py - Web search
main.py - Logging
logger.py
Content generation
- Outline planner
main.py - Task fan-out
main.py - Section writers
main.py - Result reducer
main.py
Illustration and export
- Markdown assembly
main.py - Image planning
main.py - Image generation
main.py - Image embedding
main.py - Markdown file
main.py - PDF decision
main.py - PDF export
main.py
External integrations
- Groq LLM
- HuggingFace models
- Tavily search
- Pandoc conversion
Other components
- Topic author
Connections 21
- Topic author → Interactive workflow: provides topic
README.md - Interactive workflow → Research router: starts workflow
README.md - Research router → Web search: routes optionally
README.md - Web search → Tavily search: queries
README.md - Research router → Outline planner: routes planning
README.md - Web search → Outline planner: supplies research
README.md - Outline planner → Task fan-out: creates tasks
main.py - Task fan-out → Section writers: dispatches tasks
main.py - Section writers → Groq LLM: generates sections
README.md - Section writers → HuggingFace models: generates sections
README.md - Section writers → Result reducer: returns sections
README.md - Result reducer → Markdown assembly: invokes subgraph
main.py - Markdown assembly → Image planning: passes markdown
main.py - Image planning → Image generation: provides image prompts
main.py - Image generation → HuggingFace models: requests images
main.py - Image generation → Image embedding: provides image paths
main.py - Image embedding → Markdown file: writes markdown
main.py - Image embedding → PDF decision: requests decision
main.py - PDF decision → Pandoc conversion: converts if approved
main.py - Pandoc conversion → PDF export: creates PDF
README.md - Interactive workflow → Logging: configures logging
main.py