@prismer/runtime 2.2.55 → 2.2.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +574 -0
- package/apc/skills/releasing-test/SKILL.md +9 -0
- package/built-in-skills/agent-coordination/SKILL.md +21 -4
- package/built-in-skills/agent-meta/SKILL.md +11 -0
- package/built-in-skills/assets/SKILL.md +1 -1
- package/built-in-skills/canvas-design/SKILL.md +3 -3
- package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/InstrumentSerif-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/LICENSE-SOURCES.md +16 -0
- package/built-in-skills/claim-agent-ownership/SKILL.md +7 -3
- package/built-in-skills/claude-api/SKILL.md +1 -1
- package/built-in-skills/claude-api/python/claude-api/README.md +2 -2
- package/built-in-skills/claude-api/python/claude-api/tool-use.md +9 -5
- package/built-in-skills/claude-api/python/managed-agents/README.md +11 -1
- package/built-in-skills/claude-api/shared/error-codes.md +4 -4
- package/built-in-skills/claude-api/shared/managed-agents-client-patterns.md +4 -2
- package/built-in-skills/claude-api/shared/managed-agents-core.md +1 -2
- package/built-in-skills/claude-api/shared/managed-agents-events.md +41 -22
- package/built-in-skills/claude-api/shared/managed-agents-multiagent.md +5 -3
- package/built-in-skills/claude-api/shared/managed-agents-self-hosted-sandboxes.md +1 -1
- package/built-in-skills/claude-api/shared/managed-agents-tools.md +2 -3
- package/built-in-skills/claude-api/shared/model-migration.md +3 -3
- package/built-in-skills/claude-api/shared/models.md +1 -1
- package/built-in-skills/claude-api/typescript/claude-api/batches.md +1 -1
- package/built-in-skills/claude-api/typescript/claude-api/files-api.md +3 -1
- package/built-in-skills/claude-api/typescript/claude-api/tool-use.md +8 -2
- package/built-in-skills/claude-api/typescript/managed-agents/README.md +8 -2
- package/built-in-skills/codebase-design/SKILL.md +15 -1
- package/built-in-skills/codebase-design/references/requesting-code-review/GUIDE.md +291 -0
- package/built-in-skills/codebase-design/references/requesting-code-review/LICENSE +21 -0
- package/built-in-skills/codebase-design/references/requesting-code-review/LICENSE.superpowers +21 -0
- package/built-in-skills/codebase-design/references/requesting-code-review/NOTICE.md +37 -0
- package/built-in-skills/codebase-design/references/sdlc-review/GUIDE.md +130 -0
- package/built-in-skills/codebase-design/references/sdlc-review/LICENSE +21 -0
- package/built-in-skills/codebase-design/references/sdlc-review/NOTICE.md +17 -0
- package/built-in-skills/codebase-design/references/simplify-code/GUIDE.md +269 -0
- package/built-in-skills/codebase-design/references/simplify-code/LICENSE +21 -0
- package/built-in-skills/codebase-design/references/simplify-code/NOTICE.md +37 -0
- package/built-in-skills/competitor-intelligence/LICENSE +21 -0
- package/built-in-skills/competitor-intelligence/NOTICE.md +6 -0
- package/built-in-skills/competitor-intelligence/SKILL.md +125 -0
- package/built-in-skills/competitor-intelligence/scripts/watch_state.py +160 -0
- package/built-in-skills/conversation-compaction/SKILL.md +3 -0
- package/built-in-skills/council-creator/SKILL.md +4 -3
- package/built-in-skills/diagnosing-bugs/SKILL.md +12 -0
- package/built-in-skills/diagnosing-bugs/references/desktop-dom/GUIDE.md +64 -0
- package/built-in-skills/diagnosing-bugs/references/desktop-dom/LICENSE +21 -0
- package/built-in-skills/diagnosing-bugs/references/desktop-dom/NOTICE.md +17 -0
- package/built-in-skills/diagnosing-bugs/references/systematic-debugging/GUIDE.md +410 -0
- package/built-in-skills/diagnosing-bugs/references/systematic-debugging/LICENSE +21 -0
- package/built-in-skills/diagnosing-bugs/references/systematic-debugging/LICENSE.superpowers +21 -0
- package/built-in-skills/diagnosing-bugs/references/systematic-debugging/NOTICE.md +37 -0
- package/built-in-skills/doc-coauthoring/SKILL.md +6 -0
- package/built-in-skills/doc-coauthoring/references/humanizer/GUIDE.md +647 -0
- package/built-in-skills/doc-coauthoring/references/humanizer/LICENSE +21 -0
- package/built-in-skills/doc-coauthoring/references/humanizer/LICENSE.hermes +21 -0
- package/built-in-skills/doc-coauthoring/references/humanizer/PROVENANCE.md +7 -0
- package/built-in-skills/document-actions/LICENSE +21 -0
- package/built-in-skills/document-actions/NOTICE.md +21 -0
- package/built-in-skills/document-actions/SKILL.md +46 -0
- package/built-in-skills/evidence-citations/LICENSE +21 -0
- package/built-in-skills/evidence-citations/NOTICE.md +21 -0
- package/built-in-skills/evidence-citations/SKILL.md +46 -0
- package/built-in-skills/evidence-citations/references/citation-formats.md +68 -0
- package/built-in-skills/evidence-citations/references/grounding-rationale.md +64 -0
- package/built-in-skills/evidence-citations/scripts/sources.py +720 -0
- package/built-in-skills/frontend-design/SKILL.md +6 -0
- package/built-in-skills/frontend-design/references/claude-design/GUIDE.md +650 -0
- package/built-in-skills/frontend-design/references/claude-design/LICENSE +21 -0
- package/built-in-skills/frontend-design/references/claude-design/LICENSE.hermes +21 -0
- package/built-in-skills/frontend-design/references/claude-design/PROVENANCE.md +7 -0
- package/built-in-skills/image-generate/SKILL.md +5 -0
- package/built-in-skills/image-generate/scripts/generate-and-deliver.mjs +24 -3
- package/built-in-skills/mcp-builder/reference/evaluation.md +11 -2
- package/built-in-skills/mcp-builder/reference/node_mcp_server.md +34 -5
- package/built-in-skills/mcp-builder/reference/python_mcp_server.md +6 -2
- package/built-in-skills/mcp-builder/scripts/connections.py +1 -1
- package/built-in-skills/mcp-builder/scripts/evaluation.py +52 -34
- package/built-in-skills/mcp-builder/scripts/requirements.txt +2 -2
- package/built-in-skills/meeting-actions/LICENSE +21 -0
- package/built-in-skills/meeting-actions/NOTICE.md +21 -0
- package/built-in-skills/meeting-actions/SKILL.md +48 -0
- package/built-in-skills/memory/SKILL.md +27 -3
- package/built-in-skills/memory/references/llm-wiki/GUIDE.md +468 -0
- package/built-in-skills/memory/references/llm-wiki/LICENSE +21 -0
- package/built-in-skills/memory/references/llm-wiki/NOTICE.md +4 -0
- package/built-in-skills/memory/references/llm-wiki/scripts/lint_wiki.py +84 -0
- package/built-in-skills/memory/references/llm-wiki/scripts/requirements.txt +1 -0
- package/built-in-skills/memory/references/llm-wiki/templates/SCHEMA.md +19 -0
- package/built-in-skills/memory/references/llm-wiki/templates/index.md +9 -0
- package/built-in-skills/memory/references/llm-wiki/templates/log.md +4 -0
- package/built-in-skills/memory-dream/SKILL.md +8 -15
- package/built-in-skills/memory-import/SKILL.md +51 -0
- package/built-in-skills/office-artifacts/NOTICE.md +15 -0
- package/built-in-skills/office-artifacts/SKILL.md +20 -0
- package/built-in-skills/office-artifacts/references/RESOURCE-LIMITS.md +44 -0
- package/built-in-skills/office-artifacts/references/docx/GUIDE.md +196 -0
- package/built-in-skills/office-artifacts/references/docx/LICENSE +21 -0
- package/built-in-skills/office-artifacts/references/docx/NOTICE.md +21 -0
- package/built-in-skills/office-artifacts/references/docx/references/revisions-and-comments.md +88 -0
- package/built-in-skills/office-artifacts/references/docx/scripts/docx_comments.py +292 -0
- package/built-in-skills/office-artifacts/references/docx/scripts/docx_common.py +93 -0
- package/built-in-skills/office-artifacts/references/docx/scripts/docx_create.py +177 -0
- package/built-in-skills/office-artifacts/references/docx/scripts/docx_edit.py +250 -0
- package/built-in-skills/office-artifacts/references/docx/scripts/docx_read.py +169 -0
- package/built-in-skills/office-artifacts/references/docx/scripts/docx_revisions.py +149 -0
- package/built-in-skills/office-artifacts/references/docx/scripts/docx_template.py +70 -0
- package/built-in-skills/office-artifacts/references/docx/scripts/docx_validate.py +155 -0
- package/built-in-skills/office-artifacts/references/docx/tests/test_docx_skill.py +525 -0
- package/built-in-skills/office-artifacts/references/pdf/GUIDE.md +125 -0
- package/built-in-skills/office-artifacts/references/pdf/LICENSE +21 -0
- package/built-in-skills/office-artifacts/references/pdf/NOTICE.md +21 -0
- package/built-in-skills/office-artifacts/references/pdf/references/forms.md +99 -0
- package/built-in-skills/office-artifacts/references/pdf/references/nano-pdf-editing.md +40 -0
- package/built-in-skills/office-artifacts/references/pdf/references/ocr-extraction.md +165 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/_raster.py +87 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/extract_marker.py +95 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/extract_pymupdf.py +107 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/pdf_create.py +153 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/pdf_fill_form.py +97 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/pdf_form_layout.py +168 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/pdf_make_form.py +145 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/pdf_merge.py +50 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/pdf_meta.py +123 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/pdf_page_image.py +101 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/pdf_read.py +153 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/pdf_secure.py +71 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/pdf_split.py +86 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/pdf_stamp.py +145 -0
- package/built-in-skills/office-artifacts/references/pdf/scripts/pdf_watermark.py +51 -0
- package/built-in-skills/office-artifacts/references/pdf/tests/test_pdf_skill.py +414 -0
- package/built-in-skills/office-artifacts/references/powerpoint/GUIDE.md +220 -0
- package/built-in-skills/office-artifacts/references/powerpoint/LICENSE +21 -0
- package/built-in-skills/office-artifacts/references/powerpoint/NOTICE.md +21 -0
- package/built-in-skills/office-artifacts/references/powerpoint/scripts/pptx_create.py +214 -0
- package/built-in-skills/office-artifacts/references/powerpoint/scripts/pptx_edit.py +442 -0
- package/built-in-skills/office-artifacts/references/powerpoint/scripts/pptx_from_template.py +88 -0
- package/built-in-skills/office-artifacts/references/powerpoint/scripts/pptx_read.py +131 -0
- package/built-in-skills/office-artifacts/references/powerpoint/scripts/pptx_render.py +104 -0
- package/built-in-skills/office-artifacts/references/powerpoint/tests/test_powerpoint_skill.py +478 -0
- package/built-in-skills/office-artifacts/references/xlsx/GUIDE.md +196 -0
- package/built-in-skills/office-artifacts/references/xlsx/LICENSE +21 -0
- package/built-in-skills/office-artifacts/references/xlsx/NOTICE.md +21 -0
- package/built-in-skills/office-artifacts/references/xlsx/references/restructuring.md +74 -0
- package/built-in-skills/office-artifacts/references/xlsx/scripts/csv_to_xlsx.py +108 -0
- package/built-in-skills/office-artifacts/references/xlsx/scripts/xlsx_create.py +259 -0
- package/built-in-skills/office-artifacts/references/xlsx/scripts/xlsx_edit.py +269 -0
- package/built-in-skills/office-artifacts/references/xlsx/scripts/xlsx_read.py +160 -0
- package/built-in-skills/office-artifacts/references/xlsx/scripts/xlsx_recalc.py +111 -0
- package/built-in-skills/office-artifacts/references/xlsx/scripts/xlsx_restructure.py +418 -0
- package/built-in-skills/office-artifacts/references/xlsx/scripts/xlsx_to_csv.py +69 -0
- package/built-in-skills/office-artifacts/references/xlsx/tests/test_xlsx_skill.py +542 -0
- package/built-in-skills/office-artifacts/tests/test_resource_regressions.py +272 -0
- package/built-in-skills/persona-generator/SKILL.md +9 -9
- package/built-in-skills/pkf-svg/SKILL.md +5 -0
- package/built-in-skills/pkf-svg/references/architecture-diagram/GUIDE.md +148 -0
- package/built-in-skills/pkf-svg/references/architecture-diagram/LICENSE +21 -0
- package/built-in-skills/pkf-svg/references/architecture-diagram/LICENSE.hermes +21 -0
- package/built-in-skills/pkf-svg/references/architecture-diagram/PROVENANCE.md +7 -0
- package/built-in-skills/pkf-svg/references/architecture-diagram/templates/template.html +345 -0
- package/built-in-skills/pkf-writing/SKILL.md +36 -14
- package/built-in-skills/prismer-airtable/LICENSE +21 -0
- package/built-in-skills/prismer-airtable/NOTICE.md +11 -0
- package/built-in-skills/prismer-airtable/SKILL.md +248 -0
- package/built-in-skills/prismer-airtable/scripts/airtable_client.py +76 -0
- package/built-in-skills/prismer-apple-notes/LICENSE +21 -0
- package/built-in-skills/prismer-apple-notes/NOTICE.md +17 -0
- package/built-in-skills/prismer-apple-notes/SKILL.md +118 -0
- package/built-in-skills/prismer-apple-notes/scripts/readiness.py +47 -0
- package/built-in-skills/prismer-apple-reminders/LICENSE +21 -0
- package/built-in-skills/prismer-apple-reminders/NOTICE.md +17 -0
- package/built-in-skills/prismer-apple-reminders/SKILL.md +155 -0
- package/built-in-skills/prismer-apple-reminders/scripts/readiness.py +47 -0
- package/built-in-skills/prismer-ascii-video/LICENSE +21 -0
- package/built-in-skills/prismer-ascii-video/LICENSE.hermes +21 -0
- package/built-in-skills/prismer-ascii-video/PROVENANCE.md +7 -0
- package/built-in-skills/prismer-ascii-video/README.md +290 -0
- package/built-in-skills/prismer-ascii-video/SKILL.md +252 -0
- package/built-in-skills/prismer-ascii-video/provenance/category-DESCRIPTION.md +3 -0
- package/built-in-skills/prismer-ascii-video/references/architecture.md +807 -0
- package/built-in-skills/prismer-ascii-video/references/composition.md +900 -0
- package/built-in-skills/prismer-ascii-video/references/effects.md +1877 -0
- package/built-in-skills/prismer-ascii-video/references/inputs.md +693 -0
- package/built-in-skills/prismer-ascii-video/references/optimization.md +688 -0
- package/built-in-skills/prismer-ascii-video/references/scenes.md +1018 -0
- package/built-in-skills/prismer-ascii-video/references/shaders.md +1408 -0
- package/built-in-skills/prismer-ascii-video/references/troubleshooting.md +360 -0
- package/built-in-skills/prismer-baoyu-infographic/LICENSE +21 -0
- package/built-in-skills/prismer-baoyu-infographic/LICENSE.hermes +21 -0
- package/built-in-skills/prismer-baoyu-infographic/LICENSE.origin +21 -0
- package/built-in-skills/prismer-baoyu-infographic/PORT_NOTES.md +37 -0
- package/built-in-skills/prismer-baoyu-infographic/PROVENANCE.md +7 -0
- package/built-in-skills/prismer-baoyu-infographic/SKILL.md +240 -0
- package/built-in-skills/prismer-baoyu-infographic/references/analysis-framework.md +182 -0
- package/built-in-skills/prismer-baoyu-infographic/references/base-prompt.md +43 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/bento-grid.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/binary-comparison.md +48 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/bridge.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/circular-flow.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/comic-strip.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/comparison-matrix.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/dashboard.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/dense-modules.md +72 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/funnel.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/hierarchical-layers.md +48 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/hub-spoke.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/iceberg.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/isometric-map.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/jigsaw.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/linear-progression.md +48 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/periodic-table.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/story-mountain.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/structural-breakdown.md +48 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/tree-branching.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/venn-diagram.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/layouts/winding-roadmap.md +41 -0
- package/built-in-skills/prismer-baoyu-infographic/references/structured-content-template.md +244 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/aged-academia.md +36 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/bold-graphic.md +36 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/chalkboard.md +61 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/claymation.md +29 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/corporate-memphis.md +29 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/craft-handmade.md +44 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/cyberpunk-neon.md +29 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/hand-drawn-edu.md +63 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/ikea-manual.md +29 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/kawaii.md +29 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/knolling.md +29 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/lego-brick.md +29 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/morandi-journal.md +60 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/origami.md +29 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/pixel-art.md +29 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/pop-laboratory.md +48 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/retro-pop-grid.md +47 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/storybook-watercolor.md +29 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/subway-map.md +29 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/technical-schematic.md +36 -0
- package/built-in-skills/prismer-baoyu-infographic/references/styles/ui-wireframe.md +29 -0
- package/built-in-skills/prismer-blocked-page-recovery/LICENSE +21 -0
- package/built-in-skills/prismer-blocked-page-recovery/NOTICE.md +17 -0
- package/built-in-skills/prismer-blocked-page-recovery/SKILL.md +158 -0
- package/built-in-skills/prismer-blocked-page-recovery/scripts/recover_page.py +311 -0
- package/built-in-skills/prismer-box/LICENSE +21 -0
- package/built-in-skills/prismer-box/NOTICE.md +11 -0
- package/built-in-skills/prismer-box/SKILL.md +147 -0
- package/built-in-skills/prismer-box/references/bulk-operations.md +43 -0
- package/built-in-skills/prismer-box/references/cli-guide.md +133 -0
- package/built-in-skills/prismer-box/references/content-workflows.md +86 -0
- package/built-in-skills/prismer-box/references/hubs.md +77 -0
- package/built-in-skills/prismer-box/references/oauth-setup.md +92 -0
- package/built-in-skills/prismer-box/references/rest-api.md +37 -0
- package/built-in-skills/prismer-box/references/sdk-development.md +85 -0
- package/built-in-skills/prismer-box/references/search-and-ai.md +147 -0
- package/built-in-skills/prismer-box/references/troubleshooting.md +33 -0
- package/built-in-skills/prismer-box/references/webhooks-and-events.md +43 -0
- package/built-in-skills/prismer-codebase-inspection/LICENSE +21 -0
- package/built-in-skills/prismer-codebase-inspection/NOTICE.md +17 -0
- package/built-in-skills/prismer-codebase-inspection/SKILL.md +141 -0
- package/built-in-skills/prismer-computer-use/LICENSE +21 -0
- package/built-in-skills/prismer-computer-use/NOTICE.md +17 -0
- package/built-in-skills/prismer-computer-use/SKILL.md +372 -0
- package/built-in-skills/prismer-design-md/LICENSE +21 -0
- package/built-in-skills/prismer-design-md/LICENSE.hermes +21 -0
- package/built-in-skills/prismer-design-md/PROVENANCE.md +7 -0
- package/built-in-skills/prismer-design-md/SKILL.md +227 -0
- package/built-in-skills/prismer-design-md/templates/starter.md +99 -0
- package/built-in-skills/prismer-email-inbox-triage/LICENSE +21 -0
- package/built-in-skills/prismer-email-inbox-triage/NOTICE.md +11 -0
- package/built-in-skills/prismer-email-inbox-triage/SKILL.md +116 -0
- package/built-in-skills/prismer-findmy/LICENSE +21 -0
- package/built-in-skills/prismer-findmy/NOTICE.md +17 -0
- package/built-in-skills/prismer-findmy/SKILL.md +150 -0
- package/built-in-skills/prismer-findmy/scripts/readiness.py +47 -0
- package/built-in-skills/prismer-gif-search/LICENSE +21 -0
- package/built-in-skills/prismer-gif-search/LICENSE.hermes +21 -0
- package/built-in-skills/prismer-gif-search/PROVENANCE.md +7 -0
- package/built-in-skills/prismer-gif-search/SKILL.md +97 -0
- package/built-in-skills/prismer-gif-search/scripts/tenor.py +81 -0
- package/built-in-skills/prismer-github/LICENSE +21 -0
- package/built-in-skills/prismer-github/NOTICE.md +17 -0
- package/built-in-skills/prismer-github/SKILL.md +74 -0
- package/built-in-skills/prismer-github/references/auth.md +91 -0
- package/built-in-skills/prismer-github/references/ci-troubleshooting.md +193 -0
- package/built-in-skills/prismer-github/references/code-review.md +465 -0
- package/built-in-skills/prismer-github/references/conventional-commits.md +81 -0
- package/built-in-skills/prismer-github/references/github-api-cheatsheet.md +177 -0
- package/built-in-skills/prismer-github/references/issue-to-pr.md +74 -0
- package/built-in-skills/prismer-github/references/issues.md +336 -0
- package/built-in-skills/prismer-github/references/pr-workflow.md +346 -0
- package/built-in-skills/prismer-github/references/repo-management.md +484 -0
- package/built-in-skills/prismer-github/references/review-output-template.md +84 -0
- package/built-in-skills/prismer-github/scripts/ensure-gh.py +132 -0
- package/built-in-skills/prismer-github/scripts/gh-env.sh +25 -0
- package/built-in-skills/prismer-github/scripts/git-credential-token.py +68 -0
- package/built-in-skills/prismer-github/scripts/github-api.py +71 -0
- package/built-in-skills/prismer-github/scripts/github-context.py +28 -0
- package/built-in-skills/prismer-github/templates/bug-report.md +35 -0
- package/built-in-skills/prismer-github/templates/feature-request.md +31 -0
- package/built-in-skills/prismer-github/templates/pr-body-bugfix.md +35 -0
- package/built-in-skills/prismer-github/templates/pr-body-feature.md +33 -0
- package/built-in-skills/prismer-google-workspace/LICENSE +21 -0
- package/built-in-skills/prismer-google-workspace/NOTICE.md +11 -0
- package/built-in-skills/prismer-google-workspace/SKILL.md +369 -0
- package/built-in-skills/prismer-google-workspace/references/daily-brief.md +65 -0
- package/built-in-skills/prismer-google-workspace/references/gmail-search-syntax.md +63 -0
- package/built-in-skills/prismer-google-workspace/scripts/_hermes_home.py +17 -0
- package/built-in-skills/prismer-google-workspace/scripts/_private_state.py +39 -0
- package/built-in-skills/prismer-google-workspace/scripts/google_api.py +1339 -0
- package/built-in-skills/prismer-google-workspace/scripts/gws_bridge.py +121 -0
- package/built-in-skills/prismer-google-workspace/scripts/setup.py +563 -0
- package/built-in-skills/prismer-google-workspace/tests/test_productivity_regressions.py +214 -0
- package/built-in-skills/prismer-hermes-agent/LICENSE +21 -0
- package/built-in-skills/prismer-hermes-agent/NOTICE.md +17 -0
- package/built-in-skills/prismer-hermes-agent/SKILL.md +247 -0
- package/built-in-skills/prismer-hermes-agent/references/background-systems.md +108 -0
- package/built-in-skills/prismer-hermes-agent/references/cli-reference.md +158 -0
- package/built-in-skills/prismer-hermes-agent/references/configuration.md +96 -0
- package/built-in-skills/prismer-hermes-agent/references/contributor-guide.md +151 -0
- package/built-in-skills/prismer-hermes-agent/references/delegate-task-concurrency-diagnosis.md +47 -0
- package/built-in-skills/prismer-hermes-agent/references/desktop-plugins.md +215 -0
- package/built-in-skills/prismer-hermes-agent/references/native-mcp.md +351 -0
- package/built-in-skills/prismer-hermes-agent/references/petdex.md +82 -0
- package/built-in-skills/prismer-hermes-agent/references/portal-auth-for-third-party-apps.md +135 -0
- package/built-in-skills/prismer-hermes-agent/references/project-context-files.md +55 -0
- package/built-in-skills/prismer-hermes-agent/references/providers-and-models.md +81 -0
- package/built-in-skills/prismer-hermes-agent/references/security-privacy.md +73 -0
- package/built-in-skills/prismer-hermes-agent/references/slash-commands.md +119 -0
- package/built-in-skills/prismer-hermes-agent/references/themes.md +134 -0
- package/built-in-skills/prismer-hermes-agent/references/troubleshooting.md +87 -0
- package/built-in-skills/prismer-hermes-agent/references/tui-widgets.md +144 -0
- package/built-in-skills/prismer-hermes-agent/references/webhooks.md +219 -0
- package/built-in-skills/prismer-hermes-agent/references/windows-quirks.md +64 -0
- package/built-in-skills/prismer-hermes-agent/templates/clock.mjs +51 -0
- package/built-in-skills/prismer-hermes-agent/templates/plugin.js +97 -0
- package/built-in-skills/prismer-hermes-agent/templates/skin.yaml +49 -0
- package/built-in-skills/prismer-himalaya/LICENSE +21 -0
- package/built-in-skills/prismer-himalaya/NOTICE.md +11 -0
- package/built-in-skills/prismer-himalaya/SKILL.md +340 -0
- package/built-in-skills/prismer-himalaya/references/configuration.md +227 -0
- package/built-in-skills/prismer-himalaya/references/message-composition.md +206 -0
- package/built-in-skills/prismer-himalaya/scripts/compose_draft.py +48 -0
- package/built-in-skills/prismer-im-collab/SKILL.md +1 -1
- package/built-in-skills/prismer-imessage/LICENSE +21 -0
- package/built-in-skills/prismer-imessage/NOTICE.md +17 -0
- package/built-in-skills/prismer-imessage/SKILL.md +128 -0
- package/built-in-skills/prismer-imessage/scripts/readiness.py +47 -0
- package/built-in-skills/prismer-manim-video/LICENSE +21 -0
- package/built-in-skills/prismer-manim-video/LICENSE.hermes +21 -0
- package/built-in-skills/prismer-manim-video/PROVENANCE.md +7 -0
- package/built-in-skills/prismer-manim-video/README.md +23 -0
- package/built-in-skills/prismer-manim-video/SKILL.md +279 -0
- package/built-in-skills/prismer-manim-video/references/animation-design-thinking.md +161 -0
- package/built-in-skills/prismer-manim-video/references/animations.md +282 -0
- package/built-in-skills/prismer-manim-video/references/camera-and-3d.md +135 -0
- package/built-in-skills/prismer-manim-video/references/decorations.md +202 -0
- package/built-in-skills/prismer-manim-video/references/equations.md +216 -0
- package/built-in-skills/prismer-manim-video/references/graphs-and-data.md +163 -0
- package/built-in-skills/prismer-manim-video/references/mobjects.md +333 -0
- package/built-in-skills/prismer-manim-video/references/paper-explainer.md +255 -0
- package/built-in-skills/prismer-manim-video/references/production-quality.md +190 -0
- package/built-in-skills/prismer-manim-video/references/rendering.md +187 -0
- package/built-in-skills/prismer-manim-video/references/scene-planning.md +118 -0
- package/built-in-skills/prismer-manim-video/references/troubleshooting.md +135 -0
- package/built-in-skills/prismer-manim-video/references/updaters-and-trackers.md +260 -0
- package/built-in-skills/prismer-manim-video/references/visual-design.md +124 -0
- package/built-in-skills/prismer-manim-video/scripts/setup.sh +15 -0
- package/built-in-skills/prismer-maps/LICENSE +21 -0
- package/built-in-skills/prismer-maps/NOTICE.md +11 -0
- package/built-in-skills/prismer-maps/SKILL.md +240 -0
- package/built-in-skills/prismer-maps/scripts/maps_client.py +1324 -0
- package/built-in-skills/prismer-node-inspect-debugger/LICENSE +21 -0
- package/built-in-skills/prismer-node-inspect-debugger/NOTICE.md +17 -0
- package/built-in-skills/prismer-node-inspect-debugger/SKILL.md +347 -0
- package/built-in-skills/prismer-notion/LICENSE +21 -0
- package/built-in-skills/prismer-notion/NOTICE.md +11 -0
- package/built-in-skills/prismer-notion/SKILL.md +495 -0
- package/built-in-skills/prismer-notion/references/block-types.md +112 -0
- package/built-in-skills/prismer-obsidian/LICENSE +21 -0
- package/built-in-skills/prismer-obsidian/LICENSE.hermes +21 -0
- package/built-in-skills/prismer-obsidian/PROVENANCE.md +7 -0
- package/built-in-skills/prismer-obsidian/SKILL.md +80 -0
- package/built-in-skills/prismer-obsidian/provenance/category-DESCRIPTION.md +3 -0
- package/built-in-skills/prismer-obsidian/scripts/write_note.py +84 -0
- package/built-in-skills/prismer-p5js/LICENSE +21 -0
- package/built-in-skills/prismer-p5js/LICENSE.hermes +21 -0
- package/built-in-skills/prismer-p5js/PROVENANCE.md +7 -0
- package/built-in-skills/prismer-p5js/README.md +64 -0
- package/built-in-skills/prismer-p5js/SKILL.md +574 -0
- package/built-in-skills/prismer-p5js/references/animation.md +439 -0
- package/built-in-skills/prismer-p5js/references/color-systems.md +355 -0
- package/built-in-skills/prismer-p5js/references/core-api.md +410 -0
- package/built-in-skills/prismer-p5js/references/export-pipeline.md +534 -0
- package/built-in-skills/prismer-p5js/references/interaction.md +398 -0
- package/built-in-skills/prismer-p5js/references/shapes-and-geometry.md +300 -0
- package/built-in-skills/prismer-p5js/references/troubleshooting.md +532 -0
- package/built-in-skills/prismer-p5js/references/typography.md +302 -0
- package/built-in-skills/prismer-p5js/references/visual-effects.md +905 -0
- package/built-in-skills/prismer-p5js/references/webgl-and-3d.md +423 -0
- package/built-in-skills/prismer-p5js/scripts/export-frames.js +91 -0
- package/built-in-skills/prismer-p5js/scripts/render.sh +113 -0
- package/built-in-skills/prismer-p5js/scripts/serve.sh +25 -0
- package/built-in-skills/prismer-p5js/scripts/setup.sh +87 -0
- package/built-in-skills/prismer-p5js/templates/viewer.html +401 -0
- package/built-in-skills/prismer-popular-web-designs/LICENSE +21 -0
- package/built-in-skills/prismer-popular-web-designs/LICENSE.hermes +21 -0
- package/built-in-skills/prismer-popular-web-designs/LICENSE.origin +21 -0
- package/built-in-skills/prismer-popular-web-designs/PROVENANCE.md +7 -0
- package/built-in-skills/prismer-popular-web-designs/SKILL.md +218 -0
- package/built-in-skills/prismer-popular-web-designs/templates/airbnb.md +259 -0
- package/built-in-skills/prismer-popular-web-designs/templates/airtable.md +102 -0
- package/built-in-skills/prismer-popular-web-designs/templates/apple.md +326 -0
- package/built-in-skills/prismer-popular-web-designs/templates/bmw.md +193 -0
- package/built-in-skills/prismer-popular-web-designs/templates/cal.md +272 -0
- package/built-in-skills/prismer-popular-web-designs/templates/claude.md +325 -0
- package/built-in-skills/prismer-popular-web-designs/templates/clay.md +317 -0
- package/built-in-skills/prismer-popular-web-designs/templates/clickhouse.md +294 -0
- package/built-in-skills/prismer-popular-web-designs/templates/cohere.md +279 -0
- package/built-in-skills/prismer-popular-web-designs/templates/coinbase.md +142 -0
- package/built-in-skills/prismer-popular-web-designs/templates/composio.md +320 -0
- package/built-in-skills/prismer-popular-web-designs/templates/cursor.md +322 -0
- package/built-in-skills/prismer-popular-web-designs/templates/elevenlabs.md +278 -0
- package/built-in-skills/prismer-popular-web-designs/templates/expo.md +294 -0
- package/built-in-skills/prismer-popular-web-designs/templates/figma.md +233 -0
- package/built-in-skills/prismer-popular-web-designs/templates/framer.md +259 -0
- package/built-in-skills/prismer-popular-web-designs/templates/hashicorp.md +291 -0
- package/built-in-skills/prismer-popular-web-designs/templates/ibm.md +345 -0
- package/built-in-skills/prismer-popular-web-designs/templates/intercom.md +159 -0
- package/built-in-skills/prismer-popular-web-designs/templates/kraken.md +138 -0
- package/built-in-skills/prismer-popular-web-designs/templates/linear.app.md +380 -0
- package/built-in-skills/prismer-popular-web-designs/templates/lovable.md +311 -0
- package/built-in-skills/prismer-popular-web-designs/templates/minimax.md +270 -0
- package/built-in-skills/prismer-popular-web-designs/templates/mintlify.md +339 -0
- package/built-in-skills/prismer-popular-web-designs/templates/miro.md +121 -0
- package/built-in-skills/prismer-popular-web-designs/templates/mistral.ai.md +274 -0
- package/built-in-skills/prismer-popular-web-designs/templates/mongodb.md +279 -0
- package/built-in-skills/prismer-popular-web-designs/templates/notion.md +322 -0
- package/built-in-skills/prismer-popular-web-designs/templates/nvidia.md +306 -0
- package/built-in-skills/prismer-popular-web-designs/templates/ollama.md +280 -0
- package/built-in-skills/prismer-popular-web-designs/templates/opencode.ai.md +294 -0
- package/built-in-skills/prismer-popular-web-designs/templates/pinterest.md +243 -0
- package/built-in-skills/prismer-popular-web-designs/templates/posthog.md +269 -0
- package/built-in-skills/prismer-popular-web-designs/templates/raycast.md +281 -0
- package/built-in-skills/prismer-popular-web-designs/templates/replicate.md +274 -0
- package/built-in-skills/prismer-popular-web-designs/templates/resend.md +316 -0
- package/built-in-skills/prismer-popular-web-designs/templates/revolut.md +198 -0
- package/built-in-skills/prismer-popular-web-designs/templates/runwayml.md +257 -0
- package/built-in-skills/prismer-popular-web-designs/templates/sanity.md +370 -0
- package/built-in-skills/prismer-popular-web-designs/templates/sentry.md +275 -0
- package/built-in-skills/prismer-popular-web-designs/templates/spacex.md +207 -0
- package/built-in-skills/prismer-popular-web-designs/templates/spotify.md +259 -0
- package/built-in-skills/prismer-popular-web-designs/templates/stripe.md +335 -0
- package/built-in-skills/prismer-popular-web-designs/templates/supabase.md +268 -0
- package/built-in-skills/prismer-popular-web-designs/templates/superhuman.md +265 -0
- package/built-in-skills/prismer-popular-web-designs/templates/together.ai.md +276 -0
- package/built-in-skills/prismer-popular-web-designs/templates/uber.md +308 -0
- package/built-in-skills/prismer-popular-web-designs/templates/vercel.md +323 -0
- package/built-in-skills/prismer-popular-web-designs/templates/voltagent.md +336 -0
- package/built-in-skills/prismer-popular-web-designs/templates/warp.md +266 -0
- package/built-in-skills/prismer-popular-web-designs/templates/webflow.md +105 -0
- package/built-in-skills/prismer-popular-web-designs/templates/wise.md +186 -0
- package/built-in-skills/prismer-popular-web-designs/templates/x.ai.md +270 -0
- package/built-in-skills/prismer-popular-web-designs/templates/zapier.md +341 -0
- package/built-in-skills/prismer-product-price-monitor/LICENSE +21 -0
- package/built-in-skills/prismer-product-price-monitor/NOTICE.md +11 -0
- package/built-in-skills/prismer-product-price-monitor/SKILL.md +97 -0
- package/built-in-skills/prismer-product-price-monitor/scripts/watch_state.py +116 -0
- package/built-in-skills/prismer-python-debugpy/LICENSE +21 -0
- package/built-in-skills/prismer-python-debugpy/NOTICE.md +17 -0
- package/built-in-skills/prismer-python-debugpy/SKILL.md +377 -0
- package/built-in-skills/prismer-python-debugpy/scripts/dap_client.py +68 -0
- package/built-in-skills/prismer-songsee/LICENSE +21 -0
- package/built-in-skills/prismer-songsee/LICENSE.hermes +21 -0
- package/built-in-skills/prismer-songsee/PROVENANCE.md +7 -0
- package/built-in-skills/prismer-songsee/SKILL.md +91 -0
- package/built-in-skills/prismer-songwriting-and-ai-music/LICENSE +21 -0
- package/built-in-skills/prismer-songwriting-and-ai-music/LICENSE.hermes +21 -0
- package/built-in-skills/prismer-songwriting-and-ai-music/PROVENANCE.md +7 -0
- package/built-in-skills/prismer-songwriting-and-ai-music/SKILL.md +317 -0
- package/built-in-skills/prismer-spike/LICENSE +21 -0
- package/built-in-skills/prismer-spike/LICENSE.gsd +21 -0
- package/built-in-skills/prismer-spike/NOTICE.md +17 -0
- package/built-in-skills/prismer-spike/SKILL.md +212 -0
- package/built-in-skills/prismer-teams-meeting-pipeline/LICENSE +21 -0
- package/built-in-skills/prismer-teams-meeting-pipeline/NOTICE.md +11 -0
- package/built-in-skills/prismer-teams-meeting-pipeline/SKILL.md +156 -0
- package/built-in-skills/prismer-xurl/LICENSE +21 -0
- package/built-in-skills/prismer-xurl/LICENSE.hermes +21 -0
- package/built-in-skills/prismer-xurl/PROVENANCE.md +7 -0
- package/built-in-skills/prismer-xurl/SKILL.md +444 -0
- package/built-in-skills/prismer-xurl/provenance/category-DESCRIPTION.md +3 -0
- package/built-in-skills/prismer-youtube-content/LICENSE +21 -0
- package/built-in-skills/prismer-youtube-content/LICENSE.hermes +21 -0
- package/built-in-skills/prismer-youtube-content/PROVENANCE.md +7 -0
- package/built-in-skills/prismer-youtube-content/SKILL.md +86 -0
- package/built-in-skills/prismer-youtube-content/provenance/category-DESCRIPTION.md +3 -0
- package/built-in-skills/prismer-youtube-content/references/output-formats.md +56 -0
- package/built-in-skills/prismer-youtube-content/scripts/fetch_transcript.py +146 -0
- package/built-in-skills/research-arxiv/LICENSE +21 -0
- package/built-in-skills/research-arxiv/NOTICE.md +4 -0
- package/built-in-skills/research-arxiv/SKILL.md +263 -0
- package/built-in-skills/research-arxiv/scripts/search_arxiv.py +111 -0
- package/built-in-skills/role-builder/SKILL.md +7 -1
- package/built-in-skills/role-builder/scripts/author-role.mjs +23 -7
- package/built-in-skills/role-builder/scripts/ingest-role.mjs +15 -117
- package/built-in-skills/role-builder/scripts/instantiate-and-run.mjs +15 -1
- package/built-in-skills/role-builder/scripts/operation-harness.mjs +6 -4
- package/built-in-skills/skill-creator/LICENSE.prismer +21 -0
- package/built-in-skills/skill-creator/NOTICE.md +18 -0
- package/built-in-skills/skill-creator/SKILL.md +20 -1
- package/built-in-skills/skill-creator/eval-viewer/generate_review.py +20 -31
- package/built-in-skills/skill-creator/eval-viewer/viewer.html +35 -23
- package/built-in-skills/skill-creator/references/hermes-agent-skill-authoring/GUIDE.md +220 -0
- package/built-in-skills/skill-creator/references/hermes-agent-skill-authoring/LICENSE +21 -0
- package/built-in-skills/{skill-authoring/SKILL.md → skill-creator/references/skill-authoring/GUIDE.md} +1 -1
- package/built-in-skills/{skill-builder/SKILL.md → skill-creator/references/skill-builder/GUIDE.md} +8 -12
- package/built-in-skills/skill-creator/references/skill-builder/scripts/ingest.mjs +93 -0
- package/built-in-skills/skill-creator/scripts/aggregate_benchmark.py +3 -2
- package/built-in-skills/skill-creator/scripts/import-library.mjs +30 -7
- package/built-in-skills/skill-creator/scripts/improve_description.py +14 -16
- package/built-in-skills/skill-creator/scripts/package_skill.py +16 -9
- package/built-in-skills/skill-creator/scripts/quick_validate.py +22 -5
- package/built-in-skills/skill-creator/scripts/run_eval.py +63 -144
- package/built-in-skills/skill-creator/scripts/run_loop.py +24 -16
- package/built-in-skills/slack-gif-creator/core/gif_builder.py +13 -2
- package/built-in-skills/slack-gif-creator/core/validators.py +17 -7
- package/built-in-skills/tasks/SKILL.md +2 -2
- package/built-in-skills/tdd/SKILL.md +7 -0
- package/built-in-skills/tdd/references/test-driven-development/GUIDE.md +356 -0
- package/built-in-skills/tdd/references/test-driven-development/LICENSE +21 -0
- package/built-in-skills/tdd/references/test-driven-development/LICENSE.superpowers +21 -0
- package/built-in-skills/tdd/references/test-driven-development/NOTICE.md +37 -0
- package/built-in-skills/team/SKILL.md +1 -1
- package/built-in-skills/web-artifacts-builder/SKILL.md +3 -3
- package/built-in-skills/web-artifacts-builder/scripts/bundle-artifact.sh +9 -7
- package/built-in-skills/web-artifacts-builder/scripts/init-artifact.sh +28 -55
- package/built-in-skills/webapp-qa/LICENSE +21 -0
- package/built-in-skills/webapp-qa/NOTICE.md +37 -0
- package/built-in-skills/webapp-qa/SKILL.md +41 -0
- package/built-in-skills/webapp-qa/references/dogfood/GUIDE.md +161 -0
- package/built-in-skills/webapp-qa/references/issue-taxonomy.md +109 -0
- package/built-in-skills/webapp-qa/templates/dogfood-report-template.md +86 -0
- package/built-in-skills/webapp-testing/SKILL.md +9 -2
- package/built-in-skills/webapp-testing/examples/console_logging.py +10 -4
- package/built-in-skills/webapp-testing/examples/element_discovery.py +11 -4
- package/built-in-skills/webapp-testing/examples/static_html_automation.py +14 -9
- package/built-in-skills/webapp-testing/scripts/with_server.py +34 -10
- package/built-in-skills/weekly-review/LICENSE +21 -0
- package/built-in-skills/weekly-review/NOTICE.md +21 -0
- package/built-in-skills/weekly-review/SKILL.md +49 -0
- package/components/eaas-pi-components.manifest.json +37 -0
- package/dist/cli.cjs +7079 -3327
- package/dist/cli.js +6706 -2936
- package/dist/index.cjs +7930 -3822
- package/dist/index.d.cts +484 -5
- package/dist/index.d.ts +484 -5
- package/dist/index.js +7181 -3064
- package/package.json +7 -2
- package/plugins/memory/prismer/__init__.py +4 -0
- package/plugins/memory/prismer/tool-schemas.generated.json +8 -0
- package/built-in-skills/skill-builder/scripts/ingest.mjs +0 -265
- package/built-in-skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- /package/built-in-skills/{document-generation/SKILL.md → office-artifacts/references/document-generation/GUIDE.md} +0 -0
- /package/built-in-skills/{skill-authoring/skill.json → skill-creator/references/skill-authoring/draft-contract.json} +0 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: powerpoint
|
|
3
|
+
description: Create, read, edit .pptx decks with python-pptx.
|
|
4
|
+
version: 1.1.0
|
|
5
|
+
author: Nous Research
|
|
6
|
+
license: MIT
|
|
7
|
+
platforms: [linux, macos, windows]
|
|
8
|
+
metadata:
|
|
9
|
+
hermes:
|
|
10
|
+
tags: [pptx, powerpoint, presentations, slides, office, python-pptx]
|
|
11
|
+
category: productivity
|
|
12
|
+
related_skills: [docx, xlsx, pdf]
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Powerpoint Skill
|
|
16
|
+
|
|
17
|
+
Create, inspect, and edit PowerPoint (.pptx) presentations using the
|
|
18
|
+
python-pptx library. Five helper scripts cover deck creation from a JSON
|
|
19
|
+
spec, structured read-back, in-place edits, template-driven brand decks,
|
|
20
|
+
and slide rendering — all offline, no PowerPoint installation required.
|
|
21
|
+
|
|
22
|
+
## When to Use
|
|
23
|
+
|
|
24
|
+
- The user asks to build a slide deck, report presentation, or pitch deck.
|
|
25
|
+
- You need to extract text, notes, tables, chart data, or images from a
|
|
26
|
+
.pptx someone shared.
|
|
27
|
+
- You need to update an existing deck: replace text, refresh or patch
|
|
28
|
+
chart data, swap a logo, duplicate/remove/reorder slides, set
|
|
29
|
+
backgrounds, footers, hyperlinks, or speaker notes.
|
|
30
|
+
- You must produce an on-brand deck from a company .pptx template.
|
|
31
|
+
- Do NOT use this for .ppt (legacy binary) files — convert them first with
|
|
32
|
+
`soffice --convert-to pptx old.ppt` if LibreOffice is available.
|
|
33
|
+
|
|
34
|
+
## Prerequisites
|
|
35
|
+
|
|
36
|
+
- Python 3.10+ with `python-pptx` installed
|
|
37
|
+
(`pip install python-pptx`).
|
|
38
|
+
- Optional: LibreOffice (`soffice`) plus poppler (`pdftoppm` or
|
|
39
|
+
`pdftocairo`) for rendering slides to PNGs and for PDF export.
|
|
40
|
+
`pptx_render.py` detects both with `shutil.which` and degrades
|
|
41
|
+
gracefully (reports `{"rendered": false, "missing": [...]}`, exit 0)
|
|
42
|
+
when absent — all create/read/edit operations work without them.
|
|
43
|
+
- Check availability via `terminal`:
|
|
44
|
+
`python -c "import pptx; print(pptx.__version__)"` and `which soffice pdftoppm`.
|
|
45
|
+
|
|
46
|
+
## How to Run
|
|
47
|
+
|
|
48
|
+
All scripts live in `scripts/`, take `--help`, print JSON to stdout, and
|
|
49
|
+
exit non-zero on failure. Run them with `terminal`:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
python scripts/pptx_create.py deck.json out.pptx
|
|
53
|
+
python scripts/pptx_read.py deck.pptx --outline # full JSON outline
|
|
54
|
+
python scripts/pptx_read.py deck.pptx --notes # speaker notes
|
|
55
|
+
python scripts/pptx_read.py deck.pptx --images ./img # export pictures
|
|
56
|
+
python scripts/pptx_edit.py deck.pptx --replace-text "Old Corp" "New Corp"
|
|
57
|
+
python scripts/pptx_edit.py deck.pptx --chart-data update.json
|
|
58
|
+
python scripts/pptx_edit.py deck.pptx --duplicate-slide 2
|
|
59
|
+
python scripts/pptx_edit.py deck.pptx --remove-slide 3 --move-slide 2 0
|
|
60
|
+
python scripts/pptx_from_template.py brand.pptx out.pptx --values vals.json
|
|
61
|
+
python scripts/pptx_render.py deck.pptx --outdir ./render # slide PNGs
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Author JSON specs with `write_file`; inspect script output and generated
|
|
65
|
+
JSON with `read_file`.
|
|
66
|
+
|
|
67
|
+
## Quick Reference
|
|
68
|
+
|
|
69
|
+
| Task | Command |
|
|
70
|
+
|---|---|
|
|
71
|
+
| New deck from spec | `pptx_create.py spec.json out.pptx` |
|
|
72
|
+
| 16:9 vs 4:3 | `"slide_size": "16:9"` or `"4:3"` in the spec |
|
|
73
|
+
| Outline as JSON | `pptx_read.py deck.pptx --outline` |
|
|
74
|
+
| Export images | `pptx_read.py deck.pptx --images DIR` |
|
|
75
|
+
| Replace text | `pptx_edit.py deck.pptx --replace-text OLD NEW` |
|
|
76
|
+
| Replace chart data | `pptx_edit.py deck.pptx --chart-data spec.json` |
|
|
77
|
+
| Patch one series | same flag, spec with `"ops"` (see below) |
|
|
78
|
+
| Swap picture | `pptx_edit.py deck.pptx --swap-image N NAME new.png` |
|
|
79
|
+
| Duplicate slide | `pptx_edit.py deck.pptx --duplicate-slide N` |
|
|
80
|
+
| Remove slide | `pptx_edit.py deck.pptx --remove-slide N` |
|
|
81
|
+
| Reorder slide | `pptx_edit.py deck.pptx --move-slide FROM TO` |
|
|
82
|
+
| Slide background | `pptx_edit.py deck.pptx --set-background N RRGGBB` |
|
|
83
|
+
| Hyperlink runs | `pptx_edit.py deck.pptx --hyperlink N TEXT URL` |
|
|
84
|
+
| Slide number on | `pptx_edit.py deck.pptx --enable-slide-number N` |
|
|
85
|
+
| Footer text | `pptx_edit.py deck.pptx --set-footer N TEXT` |
|
|
86
|
+
| Set notes | `pptx_edit.py deck.pptx --set-notes N TEXT` |
|
|
87
|
+
| Append notes | `pptx_edit.py deck.pptx --append-notes N TEXT` |
|
|
88
|
+
| Fill template | `pptx_from_template.py tpl.pptx out.pptx --values v.json` |
|
|
89
|
+
| Render slide PNGs | `pptx_render.py deck.pptx --outdir DIR` |
|
|
90
|
+
|
|
91
|
+
## Procedure
|
|
92
|
+
|
|
93
|
+
### 1. Create a deck
|
|
94
|
+
|
|
95
|
+
Write a JSON spec (see `pptx_create.py --help` for the full format), then
|
|
96
|
+
run `pptx_create.py`. Per slide you can set: `layout` (title,
|
|
97
|
+
title_content, section, two_content, title_only, blank), `title`,
|
|
98
|
+
`subtitle`, `bullets` (strings, or dicts with `level` 0-4, `size` pt,
|
|
99
|
+
`bold`, `italic`, `font`, `color` hex, `link` URL for a hyperlink),
|
|
100
|
+
`background` (solid hex), `footer` (text; enables the layout's footer
|
|
101
|
+
placeholder), `slide_number` (true; enables the layout's slide-number
|
|
102
|
+
placeholder), `images` (path + left/top/width/height in inches), `tables`
|
|
103
|
+
(`rows` as list-of-lists), `shapes` (rectangle, rounded_rectangle, oval,
|
|
104
|
+
diamond, right_arrow, chevron, with `fill` hex + optional `text`),
|
|
105
|
+
`charts` (bar, bar_h, line, pie with `categories` + `series`), and
|
|
106
|
+
`notes` (speaker notes).
|
|
107
|
+
|
|
108
|
+
### 2. Read a deck
|
|
109
|
+
|
|
110
|
+
`pptx_read.py deck.pptx --outline` returns slide size, layout inventory,
|
|
111
|
+
and per slide: layout name, all shape texts, table cells, image inventory
|
|
112
|
+
(filename/ext/bytes), chart categories/series/values, and speaker notes.
|
|
113
|
+
Use `--images DIR` to dump embedded pictures to files, then
|
|
114
|
+
`vision_analyze` on any exported image if you need to see its content.
|
|
115
|
+
|
|
116
|
+
### 3. Edit a deck
|
|
117
|
+
|
|
118
|
+
`pptx_edit.py` combines operations in one pass; use `--output` to keep the
|
|
119
|
+
original. Text replacement scans slide shapes, table cells, and notes.
|
|
120
|
+
Image swap retargets the picture's relationship id so position and size
|
|
121
|
+
are preserved. Slide removal drops the relationship and the `<p:sldId>`
|
|
122
|
+
entry; reorder moves the `<p:sldId>` element within `<p:sldIdLst>`
|
|
123
|
+
(python-pptx has no public API for either — the script does the XML-level
|
|
124
|
+
work). `--duplicate-slide N` appends an independent deep copy of slide N:
|
|
125
|
+
shape XML plus image/media/hyperlink relationships are cloned and rIds
|
|
126
|
+
remapped, so editing the copy never touches the original. Chart slides
|
|
127
|
+
are refused (see Pitfalls). `--set-notes`/`--append-notes` edit speaker
|
|
128
|
+
notes; `--set-background`, `--hyperlink`, `--enable-slide-number`, and
|
|
129
|
+
`--set-footer` handle deck polish.
|
|
130
|
+
|
|
131
|
+
Chart updates take a JSON spec via `--chart-data`. Full replace:
|
|
132
|
+
`{"slide": 0, "chart": 0, "categories": [...], "series": {...}}`. For
|
|
133
|
+
surgical edits, pass `"ops"` instead — a list of
|
|
134
|
+
`{"op": "update_series", "name": ..., "values": [...]}`,
|
|
135
|
+
`add_series`, `remove_series`, `rename_category` (`from`/`to` or
|
|
136
|
+
`index`), and `set_title`. python-pptx can only swap a chart's entire
|
|
137
|
+
dataset (`replace_data`), so ops are implemented as read-existing →
|
|
138
|
+
modify → replace; the per-part UX is a wrapper, and any chart data not
|
|
139
|
+
expressible as categories + numeric series will be normalized by the
|
|
140
|
+
round-trip.
|
|
141
|
+
|
|
142
|
+
### 4. Build from a template
|
|
143
|
+
|
|
144
|
+
`pptx_from_template.py` opens a brand .pptx, replaces every
|
|
145
|
+
`{{token}}` from a values JSON across slides/tables/notes, and can append
|
|
146
|
+
new slides that use the template's own layouts (by layout name or index)
|
|
147
|
+
so they inherit the master's fonts and colors. Tip: to start from a
|
|
148
|
+
template with zero slides, delete existing ones afterward with
|
|
149
|
+
`pptx_edit.py --remove-slide`.
|
|
150
|
+
|
|
151
|
+
### 5. Visual verification
|
|
152
|
+
|
|
153
|
+
`pptx_render.py deck.pptx --outdir ./render` converts the deck to PDF
|
|
154
|
+
with `soffice --headless` and splits it into one PNG per slide with
|
|
155
|
+
`pdftoppm` (or `pdftocairo`). Output JSON lists the PNG paths — review
|
|
156
|
+
each with `vision_analyze`. When either tool is missing the script exits
|
|
157
|
+
0 with `{"rendered": false, "missing": [...]}` and guidance; fall back to
|
|
158
|
+
the JSON outline from `pptx_read.py`, which verifies content and
|
|
159
|
+
structure, just not visuals.
|
|
160
|
+
|
|
161
|
+
## Converting to PDF
|
|
162
|
+
|
|
163
|
+
If LibreOffice is installed, export the finished deck to PDF directly:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
soffice --headless --convert-to pdf --outdir ./out deck.pptx
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
The output lands at `./out/deck.pdf`. Fonts not installed on the host are
|
|
170
|
+
substituted, so render-verify (Procedure step 5) before shipping the PDF.
|
|
171
|
+
There is no offline pure-Python .pptx→PDF path; if `soffice` is absent,
|
|
172
|
+
say so rather than approximating.
|
|
173
|
+
|
|
174
|
+
## Pitfalls
|
|
175
|
+
|
|
176
|
+
- **Run splitting**: PowerPoint fragments paragraph text into runs at
|
|
177
|
+
spell-check and edit boundaries. `--replace-text` first merges adjacent
|
|
178
|
+
runs whose formatting is identical, so matches split across such runs
|
|
179
|
+
are replaced with formatting fully preserved. Only when a match spans
|
|
180
|
+
*genuinely differently-formatted* runs is the paragraph rewritten with
|
|
181
|
+
the first run's formatting — verify those slides after replacement.
|
|
182
|
+
- **Chart slides cannot be duplicated**: each chart relationship embeds a
|
|
183
|
+
separate XLSX workbook part; cloning that graph reliably is not
|
|
184
|
+
supported, so `--duplicate-slide` refuses chart slides cleanly instead
|
|
185
|
+
of corrupting the deck. Rebuild the chart on a new slide instead.
|
|
186
|
+
External-hyperlink and image/media rels are carried over; layout and
|
|
187
|
+
notes rels are recreated fresh.
|
|
188
|
+
- **Chart ops are a wrapper**: python-pptx replaces the whole dataset;
|
|
189
|
+
`"ops"` round-trips existing plot data through `replace_data`, and
|
|
190
|
+
changing chart *type* is not possible.
|
|
191
|
+
- **Reordering is XML-level**: python-pptx has no supported reorder API.
|
|
192
|
+
`--move-slide` manipulates `<p:sldIdLst>` directly; safe for ordinary
|
|
193
|
+
decks but re-read the deck afterward to confirm.
|
|
194
|
+
- **Copying slides between decks is unsupported** — duplication works
|
|
195
|
+
only within one deck, where layouts and masters are shared.
|
|
196
|
+
- Footer/slide-number enablement copies the placeholder from the slide's
|
|
197
|
+
layout; on layouts without those placeholders, `--set-footer` fails
|
|
198
|
+
with a clear message (add a textbox instead).
|
|
199
|
+
- Hyperlinks apply to whole runs; `--hyperlink` links every run
|
|
200
|
+
containing the given text on that slide.
|
|
201
|
+
- The default python-pptx template is 4:3; the create script sets 16:9
|
|
202
|
+
unless the spec says otherwise. Custom templates keep their own size.
|
|
203
|
+
- Layout indexes vary by template. For brand templates, list layout names
|
|
204
|
+
first: `pptx_read.py template.pptx --outline` (`layouts_available`).
|
|
205
|
+
- `slide.shapes.title` is None on blank layouts — the create script
|
|
206
|
+
handles this, but remember it when writing ad-hoc python-pptx code.
|
|
207
|
+
- Always pass `encoding="utf-8"` when writing spec files; tokens like
|
|
208
|
+
`{{city}}` may be filled with non-ASCII values.
|
|
209
|
+
|
|
210
|
+
## Verification
|
|
211
|
+
|
|
212
|
+
1. After any create/edit, run `pptx_read.py OUT.pptx --outline` and check
|
|
213
|
+
slide count, texts, tables, notes, and chart values match intent.
|
|
214
|
+
2. `--images DIR` then file-size check confirms pictures embedded.
|
|
215
|
+
3. Render every slide with `pptx_render.py deck.pptx --outdir ./render`
|
|
216
|
+
and review each PNG with `vision_analyze` — this catches overlapping
|
|
217
|
+
shapes, truncated text, and color problems the outline cannot. If the
|
|
218
|
+
render tools are missing, the script says so; rely on the outline.
|
|
219
|
+
4. The bundled test suite is the full contract:
|
|
220
|
+
`python -m pytest tests/ -q` (requires python-pptx + pytest).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nous Research
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nous Research
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Create a .pptx presentation from a JSON deck spec.
|
|
3
|
+
|
|
4
|
+
Spec format (all positions/sizes in inches, colors as RRGGBB hex):
|
|
5
|
+
{
|
|
6
|
+
"slide_size": "16:9", // or "4:3" (default "16:9")
|
|
7
|
+
"slides": [
|
|
8
|
+
{"layout": "title", "title": "My Deck", "subtitle": "Q3 review"},
|
|
9
|
+
{"layout": "title_content", "title": "Agenda",
|
|
10
|
+
"bullets": ["Top item",
|
|
11
|
+
{"text": "Sub item", "level": 1, "bold": true,
|
|
12
|
+
"size": 18, "color": "CC0000", "font": "Arial",
|
|
13
|
+
"italic": false,
|
|
14
|
+
"link": "https://example.com/agenda"}],
|
|
15
|
+
"background": "1F2937", // solid slide background (hex)
|
|
16
|
+
"footer": "Confidential", // footer placeholder text
|
|
17
|
+
"slide_number": true, // enable slide-number placeholder
|
|
18
|
+
"notes": "Speaker notes for this slide"},
|
|
19
|
+
{"layout": "blank", "title": "Widgets",
|
|
20
|
+
"images": [{"path": "logo.png", "left": 1, "top": 1, "width": 3}],
|
|
21
|
+
"tables": [{"left": 1, "top": 2, "width": 6, "height": 2,
|
|
22
|
+
"rows": [["H1", "H2"], ["a", "b"]]}],
|
|
23
|
+
"shapes": [{"type": "rounded_rectangle", "left": 8, "top": 1,
|
|
24
|
+
"width": 3, "height": 1, "fill": "4472C4",
|
|
25
|
+
"text": "Callout", "text_color": "FFFFFF"}],
|
|
26
|
+
"charts": [{"type": "bar", "left": 1, "top": 3, "width": 6,
|
|
27
|
+
"height": 3.5, "title": "Sales",
|
|
28
|
+
"categories": ["Q1", "Q2"],
|
|
29
|
+
"series": {"North": [10, 20], "South": [7, 13]}}]}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
Layouts: title, title_content, section, two_content, title_only, blank
|
|
33
|
+
Chart types: bar, bar_h, line, pie Shape types: rectangle,
|
|
34
|
+
rounded_rectangle, oval, diamond, right_arrow, chevron
|
|
35
|
+
"""
|
|
36
|
+
import argparse
|
|
37
|
+
import copy
|
|
38
|
+
import json
|
|
39
|
+
import sys
|
|
40
|
+
|
|
41
|
+
from pptx import Presentation
|
|
42
|
+
from pptx.chart.data import CategoryChartData
|
|
43
|
+
from pptx.dml.color import RGBColor
|
|
44
|
+
from pptx.enum.chart import XL_CHART_TYPE
|
|
45
|
+
from pptx.enum.shapes import MSO_SHAPE
|
|
46
|
+
from pptx.util import Inches, Pt
|
|
47
|
+
|
|
48
|
+
LAYOUTS = {"title": 0, "title_content": 1, "section": 2,
|
|
49
|
+
"two_content": 3, "title_only": 5, "blank": 6}
|
|
50
|
+
CHART_TYPES = {"bar": XL_CHART_TYPE.COLUMN_CLUSTERED,
|
|
51
|
+
"bar_h": XL_CHART_TYPE.BAR_CLUSTERED,
|
|
52
|
+
"line": XL_CHART_TYPE.LINE_MARKERS,
|
|
53
|
+
"pie": XL_CHART_TYPE.PIE}
|
|
54
|
+
SHAPE_TYPES = {"rectangle": MSO_SHAPE.RECTANGLE,
|
|
55
|
+
"rounded_rectangle": MSO_SHAPE.ROUNDED_RECTANGLE,
|
|
56
|
+
"oval": MSO_SHAPE.OVAL, "diamond": MSO_SHAPE.DIAMOND,
|
|
57
|
+
"right_arrow": MSO_SHAPE.RIGHT_ARROW,
|
|
58
|
+
"chevron": MSO_SHAPE.CHEVRON}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def style_run(run, spec):
|
|
62
|
+
"""Apply font styling from a bullet/text spec dict to a run."""
|
|
63
|
+
font = run.font
|
|
64
|
+
if spec.get("size"):
|
|
65
|
+
font.size = Pt(spec["size"])
|
|
66
|
+
if spec.get("bold") is not None:
|
|
67
|
+
font.bold = spec["bold"]
|
|
68
|
+
if spec.get("italic") is not None:
|
|
69
|
+
font.italic = spec["italic"]
|
|
70
|
+
if spec.get("font"):
|
|
71
|
+
font.name = spec["font"]
|
|
72
|
+
if spec.get("color"):
|
|
73
|
+
font.color.rgb = RGBColor.from_string(spec["color"])
|
|
74
|
+
if spec.get("link"):
|
|
75
|
+
run.hyperlink.address = spec["link"]
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def add_bullets(text_frame, bullets):
|
|
79
|
+
text_frame.clear()
|
|
80
|
+
for i, item in enumerate(bullets):
|
|
81
|
+
if isinstance(item, str):
|
|
82
|
+
item = {"text": item}
|
|
83
|
+
para = text_frame.paragraphs[0] if i == 0 else text_frame.add_paragraph()
|
|
84
|
+
para.level = int(item.get("level", 0))
|
|
85
|
+
run = para.add_run()
|
|
86
|
+
run.text = item.get("text", "")
|
|
87
|
+
style_run(run, item)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def copy_layout_placeholder(slide, ph_idx):
|
|
91
|
+
"""Copy a layout placeholder (footer=11, slide number=12) onto the
|
|
92
|
+
slide so it actually renders; returns the shape or None if the layout
|
|
93
|
+
does not provide it."""
|
|
94
|
+
for ph in slide.slide_layout.placeholders:
|
|
95
|
+
if ph.placeholder_format.idx == ph_idx:
|
|
96
|
+
slide.shapes._spTree.append(copy.deepcopy(ph._element))
|
|
97
|
+
for shape in slide.placeholders:
|
|
98
|
+
if shape.placeholder_format.idx == ph_idx:
|
|
99
|
+
return shape
|
|
100
|
+
return None
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def build_slide(prs, spec):
|
|
104
|
+
layout_idx = LAYOUTS.get(spec.get("layout", "title_content"), 1)
|
|
105
|
+
slide = prs.slides.add_slide(prs.slide_layouts[layout_idx])
|
|
106
|
+
|
|
107
|
+
if spec.get("background"):
|
|
108
|
+
fill = slide.background.fill
|
|
109
|
+
fill.solid()
|
|
110
|
+
fill.fore_color.rgb = RGBColor.from_string(spec["background"])
|
|
111
|
+
if spec.get("slide_number"):
|
|
112
|
+
copy_layout_placeholder(slide, 12)
|
|
113
|
+
if spec.get("footer"):
|
|
114
|
+
shape = copy_layout_placeholder(slide, 11)
|
|
115
|
+
if shape is not None:
|
|
116
|
+
shape.text_frame.text = spec["footer"]
|
|
117
|
+
|
|
118
|
+
if spec.get("title") is not None and slide.shapes.title is not None:
|
|
119
|
+
slide.shapes.title.text = spec["title"]
|
|
120
|
+
if spec.get("subtitle") is not None:
|
|
121
|
+
for ph in slide.placeholders:
|
|
122
|
+
if ph.placeholder_format.idx == 1:
|
|
123
|
+
ph.text = spec["subtitle"]
|
|
124
|
+
break
|
|
125
|
+
if spec.get("bullets"):
|
|
126
|
+
body = next((ph for ph in slide.placeholders
|
|
127
|
+
if ph.placeholder_format.idx != 0), None)
|
|
128
|
+
if body is None:
|
|
129
|
+
body = slide.shapes.add_textbox(Inches(0.5), Inches(1.5),
|
|
130
|
+
Inches(9), Inches(5))
|
|
131
|
+
add_bullets(body.text_frame, spec["bullets"])
|
|
132
|
+
|
|
133
|
+
for img in spec.get("images", []):
|
|
134
|
+
kwargs = {}
|
|
135
|
+
if img.get("width"):
|
|
136
|
+
kwargs["width"] = Inches(img["width"])
|
|
137
|
+
if img.get("height"):
|
|
138
|
+
kwargs["height"] = Inches(img["height"])
|
|
139
|
+
slide.shapes.add_picture(img["path"], Inches(img.get("left", 1)),
|
|
140
|
+
Inches(img.get("top", 1)), **kwargs)
|
|
141
|
+
|
|
142
|
+
for tbl in spec.get("tables", []):
|
|
143
|
+
rows = tbl["rows"]
|
|
144
|
+
shape = slide.shapes.add_table(
|
|
145
|
+
len(rows), len(rows[0]), Inches(tbl.get("left", 1)),
|
|
146
|
+
Inches(tbl.get("top", 2)), Inches(tbl.get("width", 6)),
|
|
147
|
+
Inches(tbl.get("height", 2)))
|
|
148
|
+
for r, row in enumerate(rows):
|
|
149
|
+
for c, val in enumerate(row):
|
|
150
|
+
shape.table.cell(r, c).text = str(val)
|
|
151
|
+
|
|
152
|
+
for shp in spec.get("shapes", []):
|
|
153
|
+
shape = slide.shapes.add_shape(
|
|
154
|
+
SHAPE_TYPES.get(shp.get("type", "rectangle"), MSO_SHAPE.RECTANGLE),
|
|
155
|
+
Inches(shp.get("left", 1)), Inches(shp.get("top", 1)),
|
|
156
|
+
Inches(shp.get("width", 2)), Inches(shp.get("height", 1)))
|
|
157
|
+
if shp.get("fill"):
|
|
158
|
+
shape.fill.solid()
|
|
159
|
+
shape.fill.fore_color.rgb = RGBColor.from_string(shp["fill"])
|
|
160
|
+
if shp.get("text"):
|
|
161
|
+
shape.text_frame.text = shp["text"]
|
|
162
|
+
if shp.get("text_color"):
|
|
163
|
+
run = shape.text_frame.paragraphs[0].runs[0]
|
|
164
|
+
run.font.color.rgb = RGBColor.from_string(shp["text_color"])
|
|
165
|
+
|
|
166
|
+
for cht in spec.get("charts", []):
|
|
167
|
+
data = CategoryChartData()
|
|
168
|
+
data.categories = cht["categories"]
|
|
169
|
+
for name, values in cht["series"].items():
|
|
170
|
+
data.add_series(name, values)
|
|
171
|
+
frame = slide.shapes.add_chart(
|
|
172
|
+
CHART_TYPES.get(cht.get("type", "bar"),
|
|
173
|
+
XL_CHART_TYPE.COLUMN_CLUSTERED),
|
|
174
|
+
Inches(cht.get("left", 1)), Inches(cht.get("top", 2)),
|
|
175
|
+
Inches(cht.get("width", 6)), Inches(cht.get("height", 4)), data)
|
|
176
|
+
if cht.get("title"):
|
|
177
|
+
frame.chart.has_title = True
|
|
178
|
+
frame.chart.chart_title.text_frame.text = cht["title"]
|
|
179
|
+
|
|
180
|
+
if spec.get("notes"):
|
|
181
|
+
slide.notes_slide.notes_text_frame.text = spec["notes"]
|
|
182
|
+
return slide
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
def main(argv=None):
|
|
186
|
+
if hasattr(sys.stdout, "reconfigure"):
|
|
187
|
+
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
188
|
+
parser = argparse.ArgumentParser(
|
|
189
|
+
description="Create a .pptx deck from a JSON spec.",
|
|
190
|
+
epilog=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
|
191
|
+
parser.add_argument("spec", help="path to JSON deck spec")
|
|
192
|
+
parser.add_argument("output", help="output .pptx path")
|
|
193
|
+
args = parser.parse_args(argv)
|
|
194
|
+
|
|
195
|
+
with open(args.spec, encoding="utf-8") as fh:
|
|
196
|
+
spec = json.load(fh)
|
|
197
|
+
|
|
198
|
+
prs = Presentation()
|
|
199
|
+
if spec.get("slide_size", "16:9") == "16:9":
|
|
200
|
+
prs.slide_width, prs.slide_height = Inches(13.333), Inches(7.5)
|
|
201
|
+
else:
|
|
202
|
+
prs.slide_width, prs.slide_height = Inches(10), Inches(7.5)
|
|
203
|
+
|
|
204
|
+
for slide_spec in spec.get("slides", []):
|
|
205
|
+
build_slide(prs, slide_spec)
|
|
206
|
+
|
|
207
|
+
prs.save(args.output)
|
|
208
|
+
print(json.dumps({"ok": True, "output": args.output,
|
|
209
|
+
"slides": len(prs.slides._sldIdLst)}))
|
|
210
|
+
return 0
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
if __name__ == "__main__":
|
|
214
|
+
sys.exit(main())
|