sumulige-claude 1.0.8 → 1.0.11
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/.claude/.version +1 -0
- package/.claude/AGENTS.md +9 -9
- package/.claude/commands/commit-push-pr.md +23 -3
- package/.claude/sessions/active-sessions.json +1 -359
- package/.claude/settings.local.json +31 -1
- package/.claude/skills/algorithmic-art/LICENSE.txt +202 -0
- package/.claude/skills/algorithmic-art/SKILL.md +405 -0
- package/.claude/skills/algorithmic-art/templates/generator_template.js +223 -0
- package/.claude/skills/algorithmic-art/templates/viewer.html +599 -0
- package/.claude/skills/brand-guidelines/LICENSE.txt +202 -0
- package/.claude/skills/brand-guidelines/SKILL.md +73 -0
- package/.claude/skills/canvas-design/LICENSE.txt +202 -0
- package/.claude/skills/canvas-design/SKILL.md +130 -0
- package/.claude/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/.claude/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/.claude/skills/doc-coauthoring/SKILL.md +375 -0
- package/.claude/skills/docx/LICENSE.txt +30 -0
- package/.claude/skills/docx/SKILL.md +197 -0
- package/.claude/skills/docx/docx-js.md +350 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/.claude/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/.claude/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/.claude/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/.claude/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/.claude/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/.claude/skills/docx/ooxml/schemas/mce/mc.xsd +75 -0
- package/.claude/skills/docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/.claude/skills/docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/.claude/skills/docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/.claude/skills/docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/.claude/skills/docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/.claude/skills/docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/.claude/skills/docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/.claude/skills/docx/ooxml/scripts/pack.py +159 -0
- package/.claude/skills/docx/ooxml/scripts/unpack.py +29 -0
- package/.claude/skills/docx/ooxml/scripts/validate.py +69 -0
- package/.claude/skills/docx/ooxml/scripts/validation/__init__.py +15 -0
- package/.claude/skills/docx/ooxml/scripts/validation/base.py +951 -0
- package/.claude/skills/docx/ooxml/scripts/validation/docx.py +274 -0
- package/.claude/skills/docx/ooxml/scripts/validation/pptx.py +315 -0
- package/.claude/skills/docx/ooxml/scripts/validation/redlining.py +279 -0
- package/.claude/skills/docx/ooxml.md +610 -0
- package/.claude/skills/docx/scripts/__init__.py +1 -0
- package/.claude/skills/docx/scripts/document.py +1276 -0
- package/.claude/skills/docx/scripts/templates/comments.xml +3 -0
- package/.claude/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/.claude/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/.claude/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/.claude/skills/docx/scripts/templates/people.xml +3 -0
- package/.claude/skills/docx/scripts/utilities.py +374 -0
- package/.claude/skills/frontend-design/LICENSE.txt +177 -0
- package/.claude/skills/frontend-design/SKILL.md +42 -0
- package/.claude/skills/internal-comms/LICENSE.txt +202 -0
- package/.claude/skills/internal-comms/SKILL.md +32 -0
- package/.claude/skills/internal-comms/examples/3p-updates.md +47 -0
- package/.claude/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/.claude/skills/internal-comms/examples/faq-answers.md +30 -0
- package/.claude/skills/internal-comms/examples/general-comms.md +16 -0
- package/.claude/skills/mcp-builder/LICENSE.txt +202 -0
- package/.claude/skills/mcp-builder/SKILL.md +236 -0
- package/.claude/skills/mcp-builder/reference/evaluation.md +602 -0
- package/.claude/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/.claude/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/.claude/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/.claude/skills/mcp-builder/scripts/connections.py +151 -0
- package/.claude/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/.claude/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/.claude/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/.claude/skills/pdf/LICENSE.txt +30 -0
- package/.claude/skills/pdf/SKILL.md +294 -0
- package/.claude/skills/pdf/forms.md +205 -0
- package/.claude/skills/pdf/reference.md +612 -0
- package/.claude/skills/pdf/scripts/check_bounding_boxes.py +70 -0
- package/.claude/skills/pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/.claude/skills/pdf/scripts/check_fillable_fields.py +12 -0
- package/.claude/skills/pdf/scripts/convert_pdf_to_images.py +35 -0
- package/.claude/skills/pdf/scripts/create_validation_image.py +41 -0
- package/.claude/skills/pdf/scripts/extract_form_field_info.py +152 -0
- package/.claude/skills/pdf/scripts/fill_fillable_fields.py +114 -0
- package/.claude/skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/.claude/skills/pptx/LICENSE.txt +30 -0
- package/.claude/skills/pptx/SKILL.md +484 -0
- package/.claude/skills/pptx/html2pptx.md +625 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/.claude/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/.claude/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/.claude/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/.claude/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/.claude/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/.claude/skills/pptx/ooxml/schemas/mce/mc.xsd +75 -0
- package/.claude/skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/.claude/skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/.claude/skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/.claude/skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/.claude/skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/.claude/skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/.claude/skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/.claude/skills/pptx/ooxml/scripts/pack.py +159 -0
- package/.claude/skills/pptx/ooxml/scripts/unpack.py +29 -0
- package/.claude/skills/pptx/ooxml/scripts/validate.py +69 -0
- package/.claude/skills/pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/.claude/skills/pptx/ooxml/scripts/validation/base.py +951 -0
- package/.claude/skills/pptx/ooxml/scripts/validation/docx.py +274 -0
- package/.claude/skills/pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/.claude/skills/pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/.claude/skills/pptx/ooxml.md +427 -0
- package/.claude/skills/pptx/scripts/html2pptx.js +979 -0
- package/.claude/skills/pptx/scripts/inventory.py +1020 -0
- package/.claude/skills/pptx/scripts/rearrange.py +231 -0
- package/.claude/skills/pptx/scripts/replace.py +385 -0
- package/.claude/skills/pptx/scripts/thumbnail.py +450 -0
- package/.claude/skills/skill-creator/LICENSE.txt +202 -0
- package/.claude/skills/skill-creator/SKILL.md +356 -0
- package/.claude/skills/skill-creator/references/output-patterns.md +82 -0
- package/.claude/skills/skill-creator/references/workflows.md +28 -0
- package/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
- package/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
- package/.claude/skills/skill-creator/scripts/quick_validate.py +95 -0
- package/.claude/skills/slack-gif-creator/LICENSE.txt +202 -0
- package/.claude/skills/slack-gif-creator/SKILL.md +254 -0
- package/.claude/skills/slack-gif-creator/core/easing.py +234 -0
- package/.claude/skills/slack-gif-creator/core/frame_composer.py +176 -0
- package/.claude/skills/slack-gif-creator/core/gif_builder.py +269 -0
- package/.claude/skills/slack-gif-creator/core/validators.py +136 -0
- package/.claude/skills/slack-gif-creator/requirements.txt +4 -0
- package/.claude/skills/template/SKILL.md +6 -0
- package/.claude/skills/theme-factory/LICENSE.txt +202 -0
- package/.claude/skills/theme-factory/SKILL.md +59 -0
- package/.claude/skills/theme-factory/theme-showcase.pdf +0 -0
- package/.claude/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/.claude/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/.claude/skills/theme-factory/themes/desert-rose.md +19 -0
- package/.claude/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/.claude/skills/theme-factory/themes/golden-hour.md +19 -0
- package/.claude/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/.claude/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/.claude/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/.claude/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/.claude/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/.claude/skills/web-artifacts-builder/LICENSE.txt +202 -0
- package/.claude/skills/web-artifacts-builder/SKILL.md +74 -0
- package/.claude/skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/.claude/skills/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/.claude/skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/.claude/skills/webapp-testing/LICENSE.txt +202 -0
- package/.claude/skills/webapp-testing/SKILL.md +96 -0
- package/.claude/skills/webapp-testing/examples/console_logging.py +35 -0
- package/.claude/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/.claude/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/.claude/skills/webapp-testing/scripts/with_server.py +106 -0
- package/.claude/skills/xlsx/LICENSE.txt +30 -0
- package/.claude/skills/xlsx/SKILL.md +289 -0
- package/.claude/skills/xlsx/recalc.py +178 -0
- package/.claude-plugin/marketplace.json +2 -2
- package/AGENTS.md +165 -86
- package/README.md +22 -0
- package/cli.js +7 -2
- package/development/todos/INDEX.md +10 -1
- package/jest.config.js +61 -0
- package/lib/commands.js +67 -0
- package/lib/migrations.js +154 -0
- package/package.json +7 -2
- package/scripts/fix-hooks.mjs +97 -0
- package/template/.claude/commands/commit-push-pr.md +23 -3
- package/template/.claude/hooks/conversation-logger.cjs +222 -0
- package/template/.claude/settings.json +114 -45
- package/tests/README.md +263 -0
- package/tests/commands.test.js +163 -0
- package/tests/config.test.js +100 -0
- package/tests/marketplace.test.js +304 -0
- package/tests/migrations.test.js +187 -0
- package/tests/utils.test.js +167 -0
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Create thumbnail grids from PowerPoint presentation slides.
|
|
4
|
+
|
|
5
|
+
Creates a grid layout of slide thumbnails with configurable columns (max 6).
|
|
6
|
+
Each grid contains up to cols×(cols+1) images. For presentations with more
|
|
7
|
+
slides, multiple numbered grid files are created automatically.
|
|
8
|
+
|
|
9
|
+
The program outputs the names of all files created.
|
|
10
|
+
|
|
11
|
+
Output:
|
|
12
|
+
- Single grid: {prefix}.jpg (if slides fit in one grid)
|
|
13
|
+
- Multiple grids: {prefix}-1.jpg, {prefix}-2.jpg, etc.
|
|
14
|
+
|
|
15
|
+
Grid limits by column count:
|
|
16
|
+
- 3 cols: max 12 slides per grid (3×4)
|
|
17
|
+
- 4 cols: max 20 slides per grid (4×5)
|
|
18
|
+
- 5 cols: max 30 slides per grid (5×6) [default]
|
|
19
|
+
- 6 cols: max 42 slides per grid (6×7)
|
|
20
|
+
|
|
21
|
+
Usage:
|
|
22
|
+
python thumbnail.py input.pptx [output_prefix] [--cols N] [--outline-placeholders]
|
|
23
|
+
|
|
24
|
+
Examples:
|
|
25
|
+
python thumbnail.py presentation.pptx
|
|
26
|
+
# Creates: thumbnails.jpg (using default prefix)
|
|
27
|
+
# Outputs:
|
|
28
|
+
# Created 1 grid(s):
|
|
29
|
+
# - thumbnails.jpg
|
|
30
|
+
|
|
31
|
+
python thumbnail.py large-deck.pptx grid --cols 4
|
|
32
|
+
# Creates: grid-1.jpg, grid-2.jpg, grid-3.jpg
|
|
33
|
+
# Outputs:
|
|
34
|
+
# Created 3 grid(s):
|
|
35
|
+
# - grid-1.jpg
|
|
36
|
+
# - grid-2.jpg
|
|
37
|
+
# - grid-3.jpg
|
|
38
|
+
|
|
39
|
+
python thumbnail.py template.pptx analysis --outline-placeholders
|
|
40
|
+
# Creates thumbnail grids with red outlines around text placeholders
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
import argparse
|
|
44
|
+
import subprocess
|
|
45
|
+
import sys
|
|
46
|
+
import tempfile
|
|
47
|
+
from pathlib import Path
|
|
48
|
+
|
|
49
|
+
from inventory import extract_text_inventory
|
|
50
|
+
from PIL import Image, ImageDraw, ImageFont
|
|
51
|
+
from pptx import Presentation
|
|
52
|
+
|
|
53
|
+
# Constants
|
|
54
|
+
THUMBNAIL_WIDTH = 300 # Fixed thumbnail width in pixels
|
|
55
|
+
CONVERSION_DPI = 100 # DPI for PDF to image conversion
|
|
56
|
+
MAX_COLS = 6 # Maximum number of columns
|
|
57
|
+
DEFAULT_COLS = 5 # Default number of columns
|
|
58
|
+
JPEG_QUALITY = 95 # JPEG compression quality
|
|
59
|
+
|
|
60
|
+
# Grid layout constants
|
|
61
|
+
GRID_PADDING = 20 # Padding between thumbnails
|
|
62
|
+
BORDER_WIDTH = 2 # Border width around thumbnails
|
|
63
|
+
FONT_SIZE_RATIO = 0.12 # Font size as fraction of thumbnail width
|
|
64
|
+
LABEL_PADDING_RATIO = 0.4 # Label padding as fraction of font size
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def main():
|
|
68
|
+
parser = argparse.ArgumentParser(
|
|
69
|
+
description="Create thumbnail grids from PowerPoint slides."
|
|
70
|
+
)
|
|
71
|
+
parser.add_argument("input", help="Input PowerPoint file (.pptx)")
|
|
72
|
+
parser.add_argument(
|
|
73
|
+
"output_prefix",
|
|
74
|
+
nargs="?",
|
|
75
|
+
default="thumbnails",
|
|
76
|
+
help="Output prefix for image files (default: thumbnails, will create prefix.jpg or prefix-N.jpg)",
|
|
77
|
+
)
|
|
78
|
+
parser.add_argument(
|
|
79
|
+
"--cols",
|
|
80
|
+
type=int,
|
|
81
|
+
default=DEFAULT_COLS,
|
|
82
|
+
help=f"Number of columns (default: {DEFAULT_COLS}, max: {MAX_COLS})",
|
|
83
|
+
)
|
|
84
|
+
parser.add_argument(
|
|
85
|
+
"--outline-placeholders",
|
|
86
|
+
action="store_true",
|
|
87
|
+
help="Outline text placeholders with a colored border",
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
args = parser.parse_args()
|
|
91
|
+
|
|
92
|
+
# Validate columns
|
|
93
|
+
cols = min(args.cols, MAX_COLS)
|
|
94
|
+
if args.cols > MAX_COLS:
|
|
95
|
+
print(f"Warning: Columns limited to {MAX_COLS} (requested {args.cols})")
|
|
96
|
+
|
|
97
|
+
# Validate input
|
|
98
|
+
input_path = Path(args.input)
|
|
99
|
+
if not input_path.exists() or input_path.suffix.lower() != ".pptx":
|
|
100
|
+
print(f"Error: Invalid PowerPoint file: {args.input}")
|
|
101
|
+
sys.exit(1)
|
|
102
|
+
|
|
103
|
+
# Construct output path (always JPG)
|
|
104
|
+
output_path = Path(f"{args.output_prefix}.jpg")
|
|
105
|
+
|
|
106
|
+
print(f"Processing: {args.input}")
|
|
107
|
+
|
|
108
|
+
try:
|
|
109
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
110
|
+
# Get placeholder regions if outlining is enabled
|
|
111
|
+
placeholder_regions = None
|
|
112
|
+
slide_dimensions = None
|
|
113
|
+
if args.outline_placeholders:
|
|
114
|
+
print("Extracting placeholder regions...")
|
|
115
|
+
placeholder_regions, slide_dimensions = get_placeholder_regions(
|
|
116
|
+
input_path
|
|
117
|
+
)
|
|
118
|
+
if placeholder_regions:
|
|
119
|
+
print(f"Found placeholders on {len(placeholder_regions)} slides")
|
|
120
|
+
|
|
121
|
+
# Convert slides to images
|
|
122
|
+
slide_images = convert_to_images(input_path, Path(temp_dir), CONVERSION_DPI)
|
|
123
|
+
if not slide_images:
|
|
124
|
+
print("Error: No slides found")
|
|
125
|
+
sys.exit(1)
|
|
126
|
+
|
|
127
|
+
print(f"Found {len(slide_images)} slides")
|
|
128
|
+
|
|
129
|
+
# Create grids (max cols×(cols+1) images per grid)
|
|
130
|
+
grid_files = create_grids(
|
|
131
|
+
slide_images,
|
|
132
|
+
cols,
|
|
133
|
+
THUMBNAIL_WIDTH,
|
|
134
|
+
output_path,
|
|
135
|
+
placeholder_regions,
|
|
136
|
+
slide_dimensions,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
# Print saved files
|
|
140
|
+
print(f"Created {len(grid_files)} grid(s):")
|
|
141
|
+
for grid_file in grid_files:
|
|
142
|
+
print(f" - {grid_file}")
|
|
143
|
+
|
|
144
|
+
except Exception as e:
|
|
145
|
+
print(f"Error: {e}")
|
|
146
|
+
sys.exit(1)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def create_hidden_slide_placeholder(size):
|
|
150
|
+
"""Create placeholder image for hidden slides."""
|
|
151
|
+
img = Image.new("RGB", size, color="#F0F0F0")
|
|
152
|
+
draw = ImageDraw.Draw(img)
|
|
153
|
+
line_width = max(5, min(size) // 100)
|
|
154
|
+
draw.line([(0, 0), size], fill="#CCCCCC", width=line_width)
|
|
155
|
+
draw.line([(size[0], 0), (0, size[1])], fill="#CCCCCC", width=line_width)
|
|
156
|
+
return img
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def get_placeholder_regions(pptx_path):
|
|
160
|
+
"""Extract ALL text regions from the presentation.
|
|
161
|
+
|
|
162
|
+
Returns a tuple of (placeholder_regions, slide_dimensions).
|
|
163
|
+
text_regions is a dict mapping slide indices to lists of text regions.
|
|
164
|
+
Each region is a dict with 'left', 'top', 'width', 'height' in inches.
|
|
165
|
+
slide_dimensions is a tuple of (width_inches, height_inches).
|
|
166
|
+
"""
|
|
167
|
+
prs = Presentation(str(pptx_path))
|
|
168
|
+
inventory = extract_text_inventory(pptx_path, prs)
|
|
169
|
+
placeholder_regions = {}
|
|
170
|
+
|
|
171
|
+
# Get actual slide dimensions in inches (EMU to inches conversion)
|
|
172
|
+
slide_width_inches = (prs.slide_width or 9144000) / 914400.0
|
|
173
|
+
slide_height_inches = (prs.slide_height or 5143500) / 914400.0
|
|
174
|
+
|
|
175
|
+
for slide_key, shapes in inventory.items():
|
|
176
|
+
# Extract slide index from "slide-N" format
|
|
177
|
+
slide_idx = int(slide_key.split("-")[1])
|
|
178
|
+
regions = []
|
|
179
|
+
|
|
180
|
+
for shape_key, shape_data in shapes.items():
|
|
181
|
+
# The inventory only contains shapes with text, so all shapes should be highlighted
|
|
182
|
+
regions.append(
|
|
183
|
+
{
|
|
184
|
+
"left": shape_data.left,
|
|
185
|
+
"top": shape_data.top,
|
|
186
|
+
"width": shape_data.width,
|
|
187
|
+
"height": shape_data.height,
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
if regions:
|
|
192
|
+
placeholder_regions[slide_idx] = regions
|
|
193
|
+
|
|
194
|
+
return placeholder_regions, (slide_width_inches, slide_height_inches)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def convert_to_images(pptx_path, temp_dir, dpi):
|
|
198
|
+
"""Convert PowerPoint to images via PDF, handling hidden slides."""
|
|
199
|
+
# Detect hidden slides
|
|
200
|
+
print("Analyzing presentation...")
|
|
201
|
+
prs = Presentation(str(pptx_path))
|
|
202
|
+
total_slides = len(prs.slides)
|
|
203
|
+
|
|
204
|
+
# Find hidden slides (1-based indexing for display)
|
|
205
|
+
hidden_slides = {
|
|
206
|
+
idx + 1
|
|
207
|
+
for idx, slide in enumerate(prs.slides)
|
|
208
|
+
if slide.element.get("show") == "0"
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
print(f"Total slides: {total_slides}")
|
|
212
|
+
if hidden_slides:
|
|
213
|
+
print(f"Hidden slides: {sorted(hidden_slides)}")
|
|
214
|
+
|
|
215
|
+
pdf_path = temp_dir / f"{pptx_path.stem}.pdf"
|
|
216
|
+
|
|
217
|
+
# Convert to PDF
|
|
218
|
+
print("Converting to PDF...")
|
|
219
|
+
result = subprocess.run(
|
|
220
|
+
[
|
|
221
|
+
"soffice",
|
|
222
|
+
"--headless",
|
|
223
|
+
"--convert-to",
|
|
224
|
+
"pdf",
|
|
225
|
+
"--outdir",
|
|
226
|
+
str(temp_dir),
|
|
227
|
+
str(pptx_path),
|
|
228
|
+
],
|
|
229
|
+
capture_output=True,
|
|
230
|
+
text=True,
|
|
231
|
+
)
|
|
232
|
+
if result.returncode != 0 or not pdf_path.exists():
|
|
233
|
+
raise RuntimeError("PDF conversion failed")
|
|
234
|
+
|
|
235
|
+
# Convert PDF to images
|
|
236
|
+
print(f"Converting to images at {dpi} DPI...")
|
|
237
|
+
result = subprocess.run(
|
|
238
|
+
["pdftoppm", "-jpeg", "-r", str(dpi), str(pdf_path), str(temp_dir / "slide")],
|
|
239
|
+
capture_output=True,
|
|
240
|
+
text=True,
|
|
241
|
+
)
|
|
242
|
+
if result.returncode != 0:
|
|
243
|
+
raise RuntimeError("Image conversion failed")
|
|
244
|
+
|
|
245
|
+
visible_images = sorted(temp_dir.glob("slide-*.jpg"))
|
|
246
|
+
|
|
247
|
+
# Create full list with placeholders for hidden slides
|
|
248
|
+
all_images = []
|
|
249
|
+
visible_idx = 0
|
|
250
|
+
|
|
251
|
+
# Get placeholder dimensions from first visible slide
|
|
252
|
+
if visible_images:
|
|
253
|
+
with Image.open(visible_images[0]) as img:
|
|
254
|
+
placeholder_size = img.size
|
|
255
|
+
else:
|
|
256
|
+
placeholder_size = (1920, 1080)
|
|
257
|
+
|
|
258
|
+
for slide_num in range(1, total_slides + 1):
|
|
259
|
+
if slide_num in hidden_slides:
|
|
260
|
+
# Create placeholder image for hidden slide
|
|
261
|
+
placeholder_path = temp_dir / f"hidden-{slide_num:03d}.jpg"
|
|
262
|
+
placeholder_img = create_hidden_slide_placeholder(placeholder_size)
|
|
263
|
+
placeholder_img.save(placeholder_path, "JPEG")
|
|
264
|
+
all_images.append(placeholder_path)
|
|
265
|
+
else:
|
|
266
|
+
# Use the actual visible slide image
|
|
267
|
+
if visible_idx < len(visible_images):
|
|
268
|
+
all_images.append(visible_images[visible_idx])
|
|
269
|
+
visible_idx += 1
|
|
270
|
+
|
|
271
|
+
return all_images
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def create_grids(
|
|
275
|
+
image_paths,
|
|
276
|
+
cols,
|
|
277
|
+
width,
|
|
278
|
+
output_path,
|
|
279
|
+
placeholder_regions=None,
|
|
280
|
+
slide_dimensions=None,
|
|
281
|
+
):
|
|
282
|
+
"""Create multiple thumbnail grids from slide images, max cols×(cols+1) images per grid."""
|
|
283
|
+
# Maximum images per grid is cols × (cols + 1) for better proportions
|
|
284
|
+
max_images_per_grid = cols * (cols + 1)
|
|
285
|
+
grid_files = []
|
|
286
|
+
|
|
287
|
+
print(
|
|
288
|
+
f"Creating grids with {cols} columns (max {max_images_per_grid} images per grid)"
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
# Split images into chunks
|
|
292
|
+
for chunk_idx, start_idx in enumerate(
|
|
293
|
+
range(0, len(image_paths), max_images_per_grid)
|
|
294
|
+
):
|
|
295
|
+
end_idx = min(start_idx + max_images_per_grid, len(image_paths))
|
|
296
|
+
chunk_images = image_paths[start_idx:end_idx]
|
|
297
|
+
|
|
298
|
+
# Create grid for this chunk
|
|
299
|
+
grid = create_grid(
|
|
300
|
+
chunk_images, cols, width, start_idx, placeholder_regions, slide_dimensions
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
# Generate output filename
|
|
304
|
+
if len(image_paths) <= max_images_per_grid:
|
|
305
|
+
# Single grid - use base filename without suffix
|
|
306
|
+
grid_filename = output_path
|
|
307
|
+
else:
|
|
308
|
+
# Multiple grids - insert index before extension with dash
|
|
309
|
+
stem = output_path.stem
|
|
310
|
+
suffix = output_path.suffix
|
|
311
|
+
grid_filename = output_path.parent / f"{stem}-{chunk_idx + 1}{suffix}"
|
|
312
|
+
|
|
313
|
+
# Save grid
|
|
314
|
+
grid_filename.parent.mkdir(parents=True, exist_ok=True)
|
|
315
|
+
grid.save(str(grid_filename), quality=JPEG_QUALITY)
|
|
316
|
+
grid_files.append(str(grid_filename))
|
|
317
|
+
|
|
318
|
+
return grid_files
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
def create_grid(
|
|
322
|
+
image_paths,
|
|
323
|
+
cols,
|
|
324
|
+
width,
|
|
325
|
+
start_slide_num=0,
|
|
326
|
+
placeholder_regions=None,
|
|
327
|
+
slide_dimensions=None,
|
|
328
|
+
):
|
|
329
|
+
"""Create thumbnail grid from slide images with optional placeholder outlining."""
|
|
330
|
+
font_size = int(width * FONT_SIZE_RATIO)
|
|
331
|
+
label_padding = int(font_size * LABEL_PADDING_RATIO)
|
|
332
|
+
|
|
333
|
+
# Get dimensions
|
|
334
|
+
with Image.open(image_paths[0]) as img:
|
|
335
|
+
aspect = img.height / img.width
|
|
336
|
+
height = int(width * aspect)
|
|
337
|
+
|
|
338
|
+
# Calculate grid size
|
|
339
|
+
rows = (len(image_paths) + cols - 1) // cols
|
|
340
|
+
grid_w = cols * width + (cols + 1) * GRID_PADDING
|
|
341
|
+
grid_h = rows * (height + font_size + label_padding * 2) + (rows + 1) * GRID_PADDING
|
|
342
|
+
|
|
343
|
+
# Create grid
|
|
344
|
+
grid = Image.new("RGB", (grid_w, grid_h), "white")
|
|
345
|
+
draw = ImageDraw.Draw(grid)
|
|
346
|
+
|
|
347
|
+
# Load font with size based on thumbnail width
|
|
348
|
+
try:
|
|
349
|
+
# Use Pillow's default font with size
|
|
350
|
+
font = ImageFont.load_default(size=font_size)
|
|
351
|
+
except Exception:
|
|
352
|
+
# Fall back to basic default font if size parameter not supported
|
|
353
|
+
font = ImageFont.load_default()
|
|
354
|
+
|
|
355
|
+
# Place thumbnails
|
|
356
|
+
for i, img_path in enumerate(image_paths):
|
|
357
|
+
row, col = i // cols, i % cols
|
|
358
|
+
x = col * width + (col + 1) * GRID_PADDING
|
|
359
|
+
y_base = (
|
|
360
|
+
row * (height + font_size + label_padding * 2) + (row + 1) * GRID_PADDING
|
|
361
|
+
)
|
|
362
|
+
|
|
363
|
+
# Add label with actual slide number
|
|
364
|
+
label = f"{start_slide_num + i}"
|
|
365
|
+
bbox = draw.textbbox((0, 0), label, font=font)
|
|
366
|
+
text_w = bbox[2] - bbox[0]
|
|
367
|
+
draw.text(
|
|
368
|
+
(x + (width - text_w) // 2, y_base + label_padding),
|
|
369
|
+
label,
|
|
370
|
+
fill="black",
|
|
371
|
+
font=font,
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
# Add thumbnail below label with proportional spacing
|
|
375
|
+
y_thumbnail = y_base + label_padding + font_size + label_padding
|
|
376
|
+
|
|
377
|
+
with Image.open(img_path) as img:
|
|
378
|
+
# Get original dimensions before thumbnail
|
|
379
|
+
orig_w, orig_h = img.size
|
|
380
|
+
|
|
381
|
+
# Apply placeholder outlines if enabled
|
|
382
|
+
if placeholder_regions and (start_slide_num + i) in placeholder_regions:
|
|
383
|
+
# Convert to RGBA for transparency support
|
|
384
|
+
if img.mode != "RGBA":
|
|
385
|
+
img = img.convert("RGBA")
|
|
386
|
+
|
|
387
|
+
# Get the regions for this slide
|
|
388
|
+
regions = placeholder_regions[start_slide_num + i]
|
|
389
|
+
|
|
390
|
+
# Calculate scale factors using actual slide dimensions
|
|
391
|
+
if slide_dimensions:
|
|
392
|
+
slide_width_inches, slide_height_inches = slide_dimensions
|
|
393
|
+
else:
|
|
394
|
+
# Fallback: estimate from image size at CONVERSION_DPI
|
|
395
|
+
slide_width_inches = orig_w / CONVERSION_DPI
|
|
396
|
+
slide_height_inches = orig_h / CONVERSION_DPI
|
|
397
|
+
|
|
398
|
+
x_scale = orig_w / slide_width_inches
|
|
399
|
+
y_scale = orig_h / slide_height_inches
|
|
400
|
+
|
|
401
|
+
# Create a highlight overlay
|
|
402
|
+
overlay = Image.new("RGBA", img.size, (255, 255, 255, 0))
|
|
403
|
+
overlay_draw = ImageDraw.Draw(overlay)
|
|
404
|
+
|
|
405
|
+
# Highlight each placeholder region
|
|
406
|
+
for region in regions:
|
|
407
|
+
# Convert from inches to pixels in the original image
|
|
408
|
+
px_left = int(region["left"] * x_scale)
|
|
409
|
+
px_top = int(region["top"] * y_scale)
|
|
410
|
+
px_width = int(region["width"] * x_scale)
|
|
411
|
+
px_height = int(region["height"] * y_scale)
|
|
412
|
+
|
|
413
|
+
# Draw highlight outline with red color and thick stroke
|
|
414
|
+
# Using a bright red outline instead of fill
|
|
415
|
+
stroke_width = max(
|
|
416
|
+
5, min(orig_w, orig_h) // 150
|
|
417
|
+
) # Thicker proportional stroke width
|
|
418
|
+
overlay_draw.rectangle(
|
|
419
|
+
[(px_left, px_top), (px_left + px_width, px_top + px_height)],
|
|
420
|
+
outline=(255, 0, 0, 255), # Bright red, fully opaque
|
|
421
|
+
width=stroke_width,
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
# Composite the overlay onto the image using alpha blending
|
|
425
|
+
img = Image.alpha_composite(img, overlay)
|
|
426
|
+
# Convert back to RGB for JPEG saving
|
|
427
|
+
img = img.convert("RGB")
|
|
428
|
+
|
|
429
|
+
img.thumbnail((width, height), Image.Resampling.LANCZOS)
|
|
430
|
+
w, h = img.size
|
|
431
|
+
tx = x + (width - w) // 2
|
|
432
|
+
ty = y_thumbnail + (height - h) // 2
|
|
433
|
+
grid.paste(img, (tx, ty))
|
|
434
|
+
|
|
435
|
+
# Add border
|
|
436
|
+
if BORDER_WIDTH > 0:
|
|
437
|
+
draw.rectangle(
|
|
438
|
+
[
|
|
439
|
+
(tx - BORDER_WIDTH, ty - BORDER_WIDTH),
|
|
440
|
+
(tx + w + BORDER_WIDTH - 1, ty + h + BORDER_WIDTH - 1),
|
|
441
|
+
],
|
|
442
|
+
outline="gray",
|
|
443
|
+
width=BORDER_WIDTH,
|
|
444
|
+
)
|
|
445
|
+
|
|
446
|
+
return grid
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
if __name__ == "__main__":
|
|
450
|
+
main()
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|