Infographic Builder
Media & Document Verification

Infographic Builder

Skip to main content
< All Topics
Print

Infographic Builder

Generate structured infographic briefs and production-ready PNG images from knowledgebase documents through conversational intake, Claude-powered content extraction, category-aware template rendering, and WordPress upload.

Workflow


Phase 1  Intake ──► Phase 2  Brief Generation ──► Phase 3  Review
  │                                                    │
  └─ user refines scope ◄─────────────────────────────┘
                                    │
                              Phase 4  Render ──► Phase 5  Upload ──► Phase 6  Frontmatter

Phase 1: Intake and Scoping

Accept the user’s request and resolve it into structured parameters:

Parameter Question to resolve Default
Subject Which document is this infographic for? (required — slug or title)
Category type What kind of content is it? Infer from document category
Template override User-specified template type? Auto from category mapping
Visual style formal (Editorial Civic) or sketchnote (hand-drawn whiteboard)? formal — ask if ambiguous
Render mode Local PNG only, or upload to WordPress? Both

Two selectable visual design systems render from the same structured brief: formal (default, navy/parchment/gold, Inter typeface) and sketchnote (hand-drawn whiteboard, blue/orange accents, Virgil hand-lettered headings — best for social-first explainers and process diagrams). Full contract: gui/templates/infographics/DESIGN-VISUAL.md.

PU category → template mapping

KB category Template Brief focus
any people/ or organizations/ category accountability Subject, role, key actions, severity, timeline, connections
voting voting State requirements, critical dates, barriers
legal legal Core concept, rights, amendments, key cases
investigative-tools investigative Tool, purpose, workflow steps, capabilities
civic-engagement civic_engagement Topic, strategies, resources, impact
truth-reconciliation truth_reconciliation Concept, precedents, principles, US application
press-freedom press_freedom Incident type, actors, impact, threat level
speech-analysis speech_analysis Speaker, markers, severity, pattern analysis
ai-skills ai_skills Skill name, capability, use cases, composable skills
learning-paths-* learning_paths Path name, audience, modules, outcomes
All others general Topic, key points, data points, action items

Phase 2: Brief Generation

Use Claude to extract a structured JSON brief from the document, tailored to its category. Each category has a specific schema defining the exact fields to extract (headline, key data points, bottom line, etc.).

Phase 3: User Review

Present the brief for review. The user may edit, add, or remove items, change template, or regenerate with different emphasis.

Phase 4: Render to PNG

Render the approved brief through: Jinja2 HTML template → WeasyPrint PDF → pypdfium2 PNG (2× scale). 11 category-specific templates × 2 styles (formal + sketchnote) plus a shared base layout per style. For style="sketchnote" + the template renderer, an optional AI-generated hero illustration (Gemini/Flux) can be injected above the structured content.

Phase 5: Upload to WordPress

Upload the rendered PNG to the WordPress Media Library via WPClient.upload_media().

Phase 6: Store in Frontmatter


infographic_id: 12345
infographic_url: "https://patriot.university/wp-content/uploads/.../slug-infographic.png"
infographic_source: "weasyprint"   # or "gemini" / "flux"
infographic_style: "formal"        # or "sketchnote"

Then publish: python scripts/pu_publish.py --apply --only {slug}


Composed skills

Skill Role
patriot-content-authoring Frontmatter conventions, document structure
accountability-profile-verification Source citation standards
fact-checking Verify extracted facts
patriot-sanity-check Final accuracy and proportionality check

Guardrails

  • Apply patriot-private-citizen-inclusion-gate before building infographics for any individual.
  • Apply patriot-sanity-check on the brief before rendering.
  • Never include claims not sourced in the original document.
  • Mark inferred or estimated data per ITI Inferred Data Transparency rule.
Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
Please Share Your Feedback
How Can We Improve This Article?
Table of Contents