infographic-gen
Infographic and newspaper-style news post pipeline for {{PERSONA_NAME}} — generates 4:5 images with text overlay paired with written captions for social media.
Two Modes
1. News Mode (--news) — Newspaper-style viral news posts
- News Search — Gemini + Google Search grounding finds the top 5 most viral Samoa news stories from the past 7 days, ranked by virality.
- Post Generation — Gemini writes a newspaper-style post: bold headline, subheadline, body text, CTA to download {{BRAND_NAME}}.
- Background Generation — FAL nano-banana-2 generates a dramatic, editorial-style background (muted tones, 4:5).
- Newspaper Composite — ffmpeg composites a newspaper front-page layout: "DISCOVER SAMOA" masthead, date, headline, subheadline, body, CTA bar, branding.
- Output — Newspaper image PNG + sidecar JSON saved to
~/{{PersonaDir}}/infographics/{date}-news-{slug}/
2. Standard Mode (default) — Infographic fact posts
- Content Ideation — Gemini generates an infographic concept: topic, title, 3-5 key facts/stats, background image prompt, and a long-form written caption.
- Background Generation — FAL nano-banana-2 generates a scene-setting background at 4:5 aspect ratio.
- Text Overlay — ffmpeg composites a semi-transparent overlay + title + bullet points + branding onto the background image.
- Output — Infographic PNG + sidecar JSON saved to
~/{{PersonaDir}}/infographics/{date}-{slug}/
Usage
# NEWS MODE — search viral Samoa news and generate newspaper post
node skills/infographic-gen/scripts/infographic-gen.js --news
node skills/infographic-gen/scripts/infographic-gen.js --news --dry-run
# STANDARD MODE — topic-bank infographic
node skills/infographic-gen/scripts/infographic-gen.js
node skills/infographic-gen/scripts/infographic-gen.js --topic "Samoa Travel Facts"
node skills/infographic-gen/scripts/infographic-gen.js --topic "To Sua Ocean Trench" --facts 4 --dry-run
Options
| Flag |
Default |
Description |
| --news |
false |
News mode: search viral Samoa news, newspaper layout |
| --topic "..." |
auto-rotate |
Override topic selection (standard mode only) |
| --facts N |
3-5 |
Override fact count (standard mode only) |
| --dry-run |
false |
Print plan, skip image generation |
Output
- Image:
~/{{PersonaDir}}/infographics/{date}-{slug}/infographic.png
- Sidecar:
~/{{PersonaDir}}/infographics/{date}-{slug}/infographic.json
Sidecar JSON includes type: "news" for news posts — the publish script reads this to adjust captions accordingly.
Prerequisites
GEMINI_API_KEY in .env
FAL_KEY in .env
- ffmpeg installed
- Reference image:
brand-content/persona/reference.png (standard mode with persona)
Platforms
Instagram (4:5 feed post), Facebook (feed post), Twitter/X (image + tweet). No YouTube, no TikTok.
Content Pillars (standard mode, auto-rotated)
- Hidden Samoa
- Local Life
- Adventure
- Business Spotlight
- Travel Tips
- Culture Education
1---2name: infographic-gen3description: infographic-gen4---5# infographic-gen67Infographic and newspaper-style news post pipeline for {{PERSONA_NAME}} — generates 4:5 images with text overlay paired with written captions for social media.89## Two Modes1011### 1. News Mode (`--news`) — Newspaper-style viral news posts121. **News Search** — Gemini + Google Search grounding finds the top 5 most viral Samoa news stories from the past 7 days, ranked by virality.132. **Post Generation** — Gemini writes a newspaper-style post: bold headline, subheadline, body text, CTA to download {{BRAND_NAME}}.143. **Background Generation** — FAL nano-banana-2 generates a dramatic, editorial-style background (muted tones, 4:5).154. **Newspaper Composite** — ffmpeg composites a newspaper front-page layout: "DISCOVER SAMOA" masthead, date, headline, subheadline, body, CTA bar, branding.165. **Output** — Newspaper image PNG + sidecar JSON saved to `~/{{PersonaDir}}/infographics/{date}-news-{slug}/`1718### 2. Standard Mode (default) — Infographic fact posts191. **Content Ideation** — Gemini generates an infographic concept: topic, title, 3-5 key facts/stats, background image prompt, and a long-form written caption.202. **Background Generation** — FAL nano-banana-2 generates a scene-setting background at 4:5 aspect ratio.213. **Text Overlay** — ffmpeg composites a semi-transparent overlay + title + bullet points + branding onto the background image.224. **Output** — Infographic PNG + sidecar JSON saved to `~/{{PersonaDir}}/infographics/{date}-{slug}/`2324## Usage2526```bash27# NEWS MODE — search viral Samoa news and generate newspaper post28node skills/infographic-gen/scripts/infographic-gen.js --news29node skills/infographic-gen/scripts/infographic-gen.js --news --dry-run3031# STANDARD MODE — topic-bank infographic32node skills/infographic-gen/scripts/infographic-gen.js33node skills/infographic-gen/scripts/infographic-gen.js --topic "Samoa Travel Facts"34node skills/infographic-gen/scripts/infographic-gen.js --topic "To Sua Ocean Trench" --facts 4 --dry-run35```3637## Options3839| Flag | Default | Description |40|------|---------|-------------|41| --news | false | News mode: search viral Samoa news, newspaper layout |42| --topic "..." | auto-rotate | Override topic selection (standard mode only) |43| --facts N | 3-5 | Override fact count (standard mode only) |44| --dry-run | false | Print plan, skip image generation |4546## Output4748- Image: `~/{{PersonaDir}}/infographics/{date}-{slug}/infographic.png`49- Sidecar: `~/{{PersonaDir}}/infographics/{date}-{slug}/infographic.json`5051Sidecar JSON includes `type: "news"` for news posts — the publish script reads this to adjust captions accordingly.5253## Prerequisites5455- `GEMINI_API_KEY` in `.env`56- `FAL_KEY` in `.env`57- ffmpeg installed58- Reference image: `brand-content/persona/reference.png` (standard mode with persona)5960## Platforms6162Instagram (4:5 feed post), Facebook (feed post), Twitter/X (image + tweet). No YouTube, no TikTok.6364## Content Pillars (standard mode, auto-rotated)65661. Hidden Samoa672. Local Life683. Adventure694. Business Spotlight705. Travel Tips716. Culture Education