codewave-openclaw-installer 2.1.10 → 2.1.12
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/bin/check.mjs +0 -0
- package/bin/install.mjs +0 -0
- package/package.json +2 -1
- package/skills/ppt-master/.env.example +35 -0
- package/skills/ppt-master/README.md +90 -0
- package/skills/ppt-master/SKILL.md +390 -17
- package/skills/ppt-master/audit_report_model_perf.md +213 -0
- package/skills/ppt-master/audit_report_portability.md +90 -0
- package/skills/ppt-master/audit_report_robustness.md +192 -0
- package/skills/ppt-master/audit_report_workflow.md +233 -0
- package/skills/ppt-master/fix_report_bid.md +51 -0
- package/skills/ppt-master/fix_report_scripts.md +41 -0
- package/skills/ppt-master/references/bid-content-example-netease.md +815 -0
- package/skills/ppt-master/references/bid-content-template.md +390 -0
- package/skills/ppt-master/references/bid-example-netease.md +339 -0
- package/skills/ppt-master/references/bid-presentation.md +384 -0
- package/skills/ppt-master/references/bid-svgs/03_toc.svg +38 -0
- package/skills/ppt-master/references/bid-svgs/04_chapter_company.svg +7 -0
- package/skills/ppt-master/references/bid-svgs/05_company_overview.svg +28 -0
- package/skills/ppt-master/references/bid-svgs/06_vision_business.svg +45 -0
- package/skills/ppt-master/references/bid-svgs/07_product_system.svg +52 -0
- package/skills/ppt-master/references/bid-svgs/08_codewave_timeline.svg +29 -0
- package/skills/ppt-master/references/bid-svgs/09_certifications.svg +33 -0
- package/skills/ppt-master/references/bid-svgs/10_client_logos.svg +25 -0
- package/skills/ppt-master/references/bid-svgs/11_brand_mission.svg +14 -0
- package/skills/ppt-master/references/bid-svgs/12_chapter_demand.svg +7 -0
- package/skills/ppt-master/references/bid-svgs/16_chapter_advantages.svg +7 -0
- package/skills/ppt-master/references/bid-svgs/18_platform_arch.svg +24 -0
- package/skills/ppt-master/references/bid-svgs/19_function_matrix.svg +35 -0
- package/skills/ppt-master/references/bid-svgs/20_dev_arch.svg +29 -0
- package/skills/ppt-master/references/bid-svgs/21_source_code.svg +25 -0
- package/skills/ppt-master/references/bid-svgs/22_ai_dev.svg +27 -0
- package/skills/ppt-master/references/bid-svgs/23_asset_market.svg +33 -0
- package/skills/ppt-master/references/bid-svgs/24_multi_org.svg +28 -0
- package/skills/ppt-master/references/bid-svgs/25_i18n.svg +22 -0
- package/skills/ppt-master/references/bid-svgs/26_multi_tenant.svg +25 -0
- package/skills/ppt-master/references/bid-svgs/27_integration.svg +27 -0
- package/skills/ppt-master/references/bid-svgs/28_permission.svg +31 -0
- package/skills/ppt-master/references/bid-svgs/29_security.svg +25 -0
- package/skills/ppt-master/references/bid-svgs/30_ai_capabilities.svg +21 -0
- package/skills/ppt-master/references/bid-svgs/31_product_combo.svg +25 -0
- package/skills/ppt-master/references/bid-svgs/32_digital_transform.svg +28 -0
- package/skills/ppt-master/references/bid-svgs/33_chapter_cases.svg +7 -0
- package/skills/ppt-master/references/bid-svgs/34_cummins_case.svg +23 -0
- package/skills/ppt-master/references/bid-svgs/35_cpq_cost.svg +22 -0
- package/skills/ppt-master/references/bid-svgs/36_tech_platform.svg +18 -0
- package/skills/ppt-master/references/bid-svgs/37_platform_value.svg +24 -0
- package/skills/ppt-master/references/bid-svgs/38_operation_plan.svg +25 -0
- package/skills/ppt-master/references/bid-svgs/39_zpmc_case.svg +21 -0
- package/skills/ppt-master/references/bid-svgs/40_zpmc_apps.svg +23 -0
- package/skills/ppt-master/references/bid-svgs/41_chapter_service.svg +7 -0
- package/skills/ppt-master/references/bid-svgs/42_tech_support.svg +24 -0
- package/skills/ppt-master/references/bid-svgs/43_knowledge_transfer.svg +25 -0
- package/skills/ppt-master/references/bid-svgs/44_operation_promotion.svg +20 -0
- package/skills/ppt-master/references/bid-svgs/45_custom_dev_guide.svg +24 -0
- package/skills/ppt-master/references/bid-svgs/46_sla_guarantee.svg +18 -0
- package/skills/ppt-master/references/bid-svgs/47_strategic_cooperation.svg +25 -0
- package/skills/ppt-master/references/bid-svgs/48_ecosystem.svg +24 -0
- package/skills/ppt-master/references/bid-svgs/49_chapter_delivery.svg +23 -0
- package/skills/ppt-master/references/bid-svgs/53_pm_intro.svg +24 -0
- package/skills/ppt-master/references/bid-svgs/54_after_sales.svg +27 -0
- package/skills/ppt-master/references/bid-svgs/55_ending.svg +8 -0
- package/skills/ppt-master/references/company_intro.md +93 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img00.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img01.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img02.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img03.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img04.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img05.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img06.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img07.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img08.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img09.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img10.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img11.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img12.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img13.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img14.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img15.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img16.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img17.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img18.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img19.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img20.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img21.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img22.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img23.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img24.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img25.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img26.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img27.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img28.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide1_img29.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide2_img30.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide2_img31.jpg +0 -0
- package/skills/ppt-master/references/company_intro_images/slide3_img32.png +0 -0
- package/skills/ppt-master/references/company_intro_images/slide3_img33.png +0 -0
- package/skills/ppt-master/references/drawio-integration.md +144 -0
- package/skills/ppt-master/references/executor-base.md +3 -4
- package/skills/ppt-master/references/image-generator.md +93 -6
- package/skills/ppt-master/references/strategist.md +8 -5
- package/skills/ppt-master/requirements.txt +19 -0
- package/skills/ppt-master/resources/backgrounds/chapter_bg.png +0 -0
- package/skills/ppt-master/resources/backgrounds/company_bg.png +0 -0
- package/skills/ppt-master/resources/backgrounds/cover_bg.png +0 -0
- package/skills/ppt-master/resources/backgrounds/index.json +40 -0
- package/skills/ppt-master/resources/backgrounds/tech_bg.png +0 -0
- package/skills/ppt-master/scripts/README.md +1 -1
- package/skills/ppt-master/scripts/__pycache__/config.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/__pycache__/error_helper.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/__pycache__/pptx_animations.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/__pycache__/project_utils.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/arch_diagram.py +370 -0
- package/skills/ppt-master/scripts/bid_init.py +79 -0
- package/skills/ppt-master/scripts/drawio_gen.py +366 -0
- package/skills/ppt-master/scripts/drawio_to_svg.py +458 -0
- package/skills/ppt-master/scripts/finalize_svg.py +14 -0
- package/skills/ppt-master/scripts/image_backends/__pycache__/__init__.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/image_backends/__pycache__/backend_aigw_gemini.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/image_backends/__pycache__/backend_common.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_finalize/__pycache__/__init__.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_finalize/__pycache__/crop_images.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_finalize/__pycache__/embed_icons.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_finalize/__pycache__/embed_images.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_finalize/__pycache__/fix_image_aspect.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_finalize/__pycache__/flatten_tspan.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_finalize/__pycache__/svg_rect_to_path.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_page_gen.py +871 -0
- package/skills/ppt-master/scripts/svg_quality_checker.py +169 -8
- package/skills/ppt-master/scripts/svg_to_pptx/__pycache__/__init__.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_to_pptx/__pycache__/drawingml_context.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_to_pptx/__pycache__/drawingml_converter.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_to_pptx/__pycache__/drawingml_elements.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_to_pptx/__pycache__/drawingml_paths.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_to_pptx/__pycache__/drawingml_styles.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_to_pptx/__pycache__/drawingml_utils.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_to_pptx/__pycache__/pptx_builder.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_to_pptx/__pycache__/pptx_cli.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_to_pptx/__pycache__/pptx_dimensions.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_to_pptx/__pycache__/pptx_discovery.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_to_pptx/__pycache__/pptx_media.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_to_pptx/__pycache__/pptx_notes.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_to_pptx/__pycache__/pptx_slide_xml.cpython-314.pyc +0 -0
- package/skills/ppt-master/scripts/svg_to_pptx/pptx_builder.py +7 -1
- package/skills/ppt-master/scripts/svg_to_pptx/pptx_cli.py +14 -0
- package/skills/ppt-master/projects/.gitkeep +0 -0
- /package/skills/ppt-master/templates/layouts/{/351/207/215/345/272/206/345/244/247/345/255/246/01_cover.svg" → Technology Blue Business/01_cover.svg} +0 -0
- /package/skills/ppt-master/templates/layouts/{/351/207/215/345/272/206/345/244/247/345/255/246/02_chapter.svg" → Technology Blue Business/02_chapter.svg} +0 -0
- /package/skills/ppt-master/templates/layouts/{/351/207/215/345/272/206/345/244/247/345/255/246/02_toc.svg" → Technology Blue Business/02_toc.svg} +0 -0
- /package/skills/ppt-master/templates/layouts/{/351/207/215/345/272/206/345/244/247/345/255/246/03_content.svg" → Technology Blue Business/03_content.svg} +0 -0
- /package/skills/ppt-master/templates/layouts/{/351/207/215/345/272/206/345/244/247/345/255/246/04_ending.svg" → Technology Blue Business/04_ending.svg} +0 -0
- /package/skills/ppt-master/templates/layouts/{/351/207/215/345/272/206/345/244/247/345/255/246/design_spec.md" → Technology Blue Business/design_spec.md} +0 -0
- /package/skills/ppt-master/templates/layouts/{/351/207/215/345/272/206/345/244/247/345/255/246//351/207/215/345/272/206/345/244/247/345/255/246logo.png" → Technology Blue Business//316/230c/314/247i/314/200/317/203/342/225/221a/314/212/317/203n/314/203/302/272/317/203/302/241/302/252logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts/{/351/207/215/345/272/206/345/244/247/345/255/246//351/207/215/345/272/206/345/244/247/345/255/246logo2.png" → Technology Blue Business//316/230c/314/247i/314/200/317/203/342/225/221a/314/212/317/203n/314/203/302/272/317/203/302/241/302/252logo2.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{346/213/233/345/225/206/351/223/266/350/241/214 → 302/265i/314/210/302/242/317/203o/314/200a/314/212/316/230o/314/202/342/225/242/316/246i/314/201i/314/202}/01_cover.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{346/213/233/345/225/206/351/223/266/350/241/214 → 302/265i/314/210/302/242/317/203o/314/200a/314/212/316/230o/314/202/342/225/242/316/246i/314/201i/314/202}/02_chapter.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{346/213/233/345/225/206/351/223/266/350/241/214 → 302/265i/314/210/302/242/317/203o/314/200a/314/212/316/230o/314/202/342/225/242/316/246i/314/201i/314/202}/02_toc.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{346/213/233/345/225/206/351/223/266/350/241/214 → 302/265i/314/210/302/242/317/203o/314/200a/314/212/316/230o/314/202/342/225/242/316/246i/314/201i/314/202}/03_content.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{346/213/233/345/225/206/351/223/266/350/241/214 → 302/265i/314/210/302/242/317/203o/314/200a/314/212/316/230o/314/202/342/225/242/316/246i/314/201i/314/202}/04_ending.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{346/213/233/345/225/206/351/223/266/350/241/214 → 302/265i/314/210/302/242/317/203o/314/200a/314/212/316/230o/314/202/342/225/242/316/246i/314/201i/314/202}/design_spec.md" +0 -0
- /package/skills/ppt-master/templates/layouts//{346/213/233/345/225/206/351/223/266/350/241/214//346/213/233/345/225/206/351/223/266/350/241/214/345/205/254/345/217/270/351/207/221/350/236/215.png" → 302/265i/314/210/302/242/317/203o/314/200a/314/212/316/230o/314/202/342/225/242/316/246i/314/201i/314/202//302/265i/314/210/302/242/317/203o/314/200a/314/212/316/230o/314/202/342/225/242/316/246i/314/201i/314/202/317/203a/314/200/302/274/317/203A/314/212/342/225/225/316/230c/314/247/303/246/316/246/342/202/247i/314/200.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/225/206/345/212/241 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203o/314/200a/314/212/317/203e/314/200i/314/201}/01_cover.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/225/206/345/212/241 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203o/314/200a/314/212/317/203e/314/200i/314/201}/02_chapter.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/225/206/345/212/241 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203o/314/200a/314/212/317/203e/314/200i/314/201}/02_toc.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/225/206/345/212/241 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203o/314/200a/314/212/317/203e/314/200i/314/201}/03_content.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/225/206/345/212/241 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203o/314/200a/314/212/317/203e/314/200i/314/201}/04_ending.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/225/206/345/212/241 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203o/314/200a/314/212/317/203e/314/200i/314/201}/design_spec.md" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/225/206/345/212/241//345/217/263/344/270/212/350/247/222 logo.png" → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203o/314/200a/314/212/317/203e/314/200i/314/201//317/203A/314/212/342/224/202/316/243/342/225/225e/314/200/316/246/302/272/303/206 logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/225/206/345/212/241//345/244/247/345/236/213 logo.png" → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203o/314/200a/314/212/317/203e/314/200i/314/201//317/203n/314/203/302/272/317/203/342/202/247i/314/210 logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/270/270/350/247/204 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210}/01_cover.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/270/270/350/247/204 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210}/02_chapter.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/270/270/350/247/204 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210}/02_toc.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/270/270/350/247/204 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210}/03_content.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/270/270/350/247/204 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210}/04_ending.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/270/270/350/247/204 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210}/design_spec.md" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/270/270/350/247/204//345/217/263/344/270/212/350/247/222 logo.png" → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210//317/203A/314/212/342/224/202/316/243/342/225/225e/314/200/316/246/302/272/303/206 logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/345/270/270/350/247/204//345/244/247/345/236/213 logo.png" → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210//317/203n/314/203/302/272/317/203/342/202/247i/314/210 logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/347/216/260/344/273/243 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201}/01_cover.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/347/216/260/344/273/243 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201}/02_chapter.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/347/216/260/344/273/243 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201}/02_toc.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/347/216/260/344/273/243 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201}/03_content.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/347/216/260/344/273/243 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201}/04_ending.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/347/216/260/344/273/243 → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201}/design_spec.md" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/347/216/260/344/273/243//345/217/263/344/270/212/350/247/222 logo.png" → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201//317/203A/314/212/342/224/202/316/243/342/225/225e/314/200/316/246/302/272/303/206 logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/346/261/275/347/240/224_/347/216/260/344/273/243//345/244/247/345/236/213 logo.png" → 316/243/342/225/225/302/241/302/265/342/226/222/342/225/234/317/204a/314/201o/314/210_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201//317/203n/314/203/302/272/317/203/342/202/247i/314/210 logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/345/270/270/350/247/204 → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210}/01_cover.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/345/270/270/350/247/204 → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210}/02_chapter.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/345/270/270/350/247/204 → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210}/02_toc.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/345/270/270/350/247/204 → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210}/03_content.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/345/270/270/350/247/204 → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210}/04_ending.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/345/270/270/350/247/204 → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210}/design_spec.md" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/345/270/270/350/247/204//346/260/264/347/224/265/344/270/211/345/261/200logo.png" → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210//302/265/342/226/221/342/224/244/317/204o/314/210/342/225/241/316/243/342/225/225e/314/210/317/203/342/226/222C/314/247logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/345/270/270/350/247/204//344/270/255/345/233/275/346/260/264/345/212/241logo.png" → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210//316/243/342/225/225/302/241/317/203/302/242/342/225/234/302/265/342/226/221/342/224/244/317/203e/314/200i/314/201logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/345/270/270/350/247/204//345/215/216/344/270/234/351/231/242logo.png" → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210//317/203i/314/200A/314/210/316/243/342/225/225/302/243/316/230O/314/210o/314/201logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/345/270/270/350/247/204//347/224/265/345/273/272logo.png" → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/203/342/225/225/342/225/225/316/246/302/272a/314/210//317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/347/216/260/344/273/243 → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201}/01_cover.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/347/216/260/344/273/243 → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201}/02_chapter.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/347/216/260/344/273/243 → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201}/02_toc.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/347/216/260/344/273/243 → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201}/03_content.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/347/216/260/344/273/243 → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201}/04_ending.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/347/216/260/344/273/243 → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201}/design_spec.md" +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/347/216/260/344/273/243//346/260/264/347/224/265/344/270/211/345/261/200logo.png" → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201//302/265/342/226/221/342/224/244/317/204o/314/210/342/225/241/316/243/342/225/225e/314/210/317/203/342/226/222C/314/247logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/347/216/260/344/273/243//344/270/255/345/233/275/346/260/264/345/212/241logo.png" → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201//316/243/342/225/225/302/241/317/203/302/242/342/225/234/302/265/342/226/221/342/224/244/317/203e/314/200i/314/201logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/347/216/260/344/273/243//345/215/216/344/270/234/351/231/242logo.png" → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201//317/203i/314/200A/314/210/316/243/342/225/225/302/243/316/230O/314/210o/314/201logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{344/270/255/345/233/275/347/224/265/345/273/272_/347/216/260/344/273/243//347/224/265/345/273/272logo.png" → 316/243/342/225/225/302/241/317/203/302/242/342/225/234/317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221_/317/204A/314/210/342/226/221/316/243/342/225/227u/314/201//317/204o/314/210/342/225/241/317/203/342/225/227/342/225/221logo.png"} +0 -0
- /package/skills/ppt-master/templates/layouts//{347/247/221/346/212/200/350/223/235/345/225/206/345/212/241 → 317/204/302/272/303/246/302/265e/314/200C/314/247/316/246o/314/202/302/245/317/203o/314/200a/314/212/317/203e/314/200i/314/201}/01_cover.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{347/247/221/346/212/200/350/223/235/345/225/206/345/212/241 → 317/204/302/272/303/246/302/265e/314/200C/314/247/316/246o/314/202/302/245/317/203o/314/200a/314/212/317/203e/314/200i/314/201}/02_chapter.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{347/247/221/346/212/200/350/223/235/345/225/206/345/212/241 → 317/204/302/272/303/246/302/265e/314/200C/314/247/316/246o/314/202/302/245/317/203o/314/200a/314/212/317/203e/314/200i/314/201}/02_toc.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{347/247/221/346/212/200/350/223/235/345/225/206/345/212/241 → 317/204/302/272/303/246/302/265e/314/200C/314/247/316/246o/314/202/302/245/317/203o/314/200a/314/212/317/203e/314/200i/314/201}/03_content.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{347/247/221/346/212/200/350/223/235/345/225/206/345/212/241 → 317/204/302/272/303/246/302/265e/314/200C/314/247/316/246o/314/202/302/245/317/203o/314/200a/314/212/317/203e/314/200i/314/201}/04_ending.svg" +0 -0
- /package/skills/ppt-master/templates/layouts//{347/247/221/346/212/200/350/223/235/345/225/206/345/212/241 → 317/204/302/272/303/246/302/265e/314/200C/314/247/316/246o/314/202/302/245/317/203o/314/200a/314/212/317/203e/314/200i/314/201}/design_spec.md" +0 -0
|
@@ -89,6 +89,18 @@ class SVGQualityChecker:
|
|
|
89
89
|
# 5. Check text wrapping methods
|
|
90
90
|
self._check_text_elements(content, result)
|
|
91
91
|
|
|
92
|
+
# 6. Check text overflow (beyond viewBox boundaries)
|
|
93
|
+
self._check_text_overflow(content, result)
|
|
94
|
+
|
|
95
|
+
# 7. Check bottom red line presence
|
|
96
|
+
self._check_bottom_line(content, result)
|
|
97
|
+
|
|
98
|
+
# 8. Check file size (warn if too large)
|
|
99
|
+
file_size = svg_path.stat().st_size
|
|
100
|
+
if file_size > 5 * 1024 * 1024: # 5MB
|
|
101
|
+
result['warnings'].append(f"Large SVG file: {file_size // 1024}KB (may slow down export)")
|
|
102
|
+
result['info']['file_size_kb'] = file_size // 1024
|
|
103
|
+
|
|
92
104
|
# Determine pass/fail
|
|
93
105
|
result['passed'] = len(result['errors']) == 0
|
|
94
106
|
|
|
@@ -206,7 +218,13 @@ class SVGQualityChecker:
|
|
|
206
218
|
if re.search(r'<g[^>]*\sopacity\s*=', content_lower):
|
|
207
219
|
result['errors'].append("Detected forbidden <g opacity> (set opacity on each child element individually)")
|
|
208
220
|
if re.search(r'<image[^>]*\sopacity\s*=', content_lower):
|
|
209
|
-
|
|
221
|
+
# Allow opacity on background images (first <image> child of <svg>)
|
|
222
|
+
# Only flag non-background images with opacity
|
|
223
|
+
image_opacity_matches = re.findall(r'<image[^>]*\sopacity\s*=\s*"([^"]*)"[^>]*/?\s*>', content, re.IGNORECASE)
|
|
224
|
+
bg_pattern = re.search(r'<svg[^>]*>\s*\n?\s*<image[^>]*opacity', content, re.IGNORECASE)
|
|
225
|
+
non_bg_opacity_count = len(image_opacity_matches) - (1 if bg_pattern else 0)
|
|
226
|
+
if non_bg_opacity_count > 0:
|
|
227
|
+
result['errors'].append(f"Detected {non_bg_opacity_count} non-background <image opacity> (use overlay mask approach)")
|
|
210
228
|
|
|
211
229
|
def _check_fonts(self, content: str, result: Dict):
|
|
212
230
|
"""Check font usage"""
|
|
@@ -268,6 +286,71 @@ class SVGQualityChecker:
|
|
|
268
286
|
f"Detected {len(text_matches)} potentially overly long single-line text(s) (consider using tspan for wrapping)"
|
|
269
287
|
)
|
|
270
288
|
|
|
289
|
+
def _check_text_overflow(self, content: str, result: Dict):
|
|
290
|
+
"""Check if text elements extend beyond viewBox boundaries"""
|
|
291
|
+
# Get viewBox dimensions
|
|
292
|
+
viewbox_match = re.search(r'viewBox="0 0 (\d+) (\d+)"', content)
|
|
293
|
+
if not viewbox_match:
|
|
294
|
+
return
|
|
295
|
+
vb_width = int(viewbox_match.group(1))
|
|
296
|
+
vb_height = int(viewbox_match.group(2))
|
|
297
|
+
|
|
298
|
+
overflow_count = 0
|
|
299
|
+
|
|
300
|
+
# Check <text> x/y coordinates
|
|
301
|
+
for m in re.finditer(r'<text[^>]*\bx="([^"]*)"[^>]*\by="([^"]*)"', content):
|
|
302
|
+
try:
|
|
303
|
+
x = float(m.group(1))
|
|
304
|
+
y = float(m.group(2))
|
|
305
|
+
if x < -10 or x > vb_width + 10:
|
|
306
|
+
overflow_count += 1
|
|
307
|
+
if y < -10 or y > vb_height + 50: # allow small bottom overflow for descenders
|
|
308
|
+
overflow_count += 1
|
|
309
|
+
except (ValueError, TypeError):
|
|
310
|
+
pass
|
|
311
|
+
|
|
312
|
+
# Check <tspan> y coordinates for vertical overflow
|
|
313
|
+
for m in re.finditer(r'<tspan[^>]*\by="([^"]*)"', content):
|
|
314
|
+
try:
|
|
315
|
+
y = float(m.group(1))
|
|
316
|
+
if y > vb_height + 20:
|
|
317
|
+
overflow_count += 1
|
|
318
|
+
except (ValueError, TypeError):
|
|
319
|
+
pass
|
|
320
|
+
|
|
321
|
+
if overflow_count > 0:
|
|
322
|
+
result['errors'].append(
|
|
323
|
+
f"Detected {overflow_count} text element(s) potentially overflowing viewBox ({vb_width}x{vb_height})")
|
|
324
|
+
|
|
325
|
+
def _check_bottom_line(self, content: str, result: Dict):
|
|
326
|
+
"""Check for bottom red line (required on every page)"""
|
|
327
|
+
# Look for a rect at y=716 with height=4 and red-ish fill
|
|
328
|
+
has_bottom_line = bool(re.search(
|
|
329
|
+
r'<rect[^>]*y="71[456]"[^>]*height="[3-6]"[^>]*fill="#[Cc]00000"',
|
|
330
|
+
content
|
|
331
|
+
)) or bool(re.search(
|
|
332
|
+
r'<rect[^>]*fill="#[Cc]00000"[^>]*y="71[456]"[^>]*height="[3-6]"',
|
|
333
|
+
content
|
|
334
|
+
))
|
|
335
|
+
# Also check for line at bottom
|
|
336
|
+
if not has_bottom_line:
|
|
337
|
+
has_bottom_line = bool(re.search(
|
|
338
|
+
r'<line[^>]*y1="71[456]"[^>]*y2="71[456]"[^>]*stroke="#[Cc]00000"',
|
|
339
|
+
content
|
|
340
|
+
))
|
|
341
|
+
if not has_bottom_line:
|
|
342
|
+
# More relaxed: any red rect near bottom
|
|
343
|
+
has_bottom_line = bool(re.search(
|
|
344
|
+
r'<rect[^>]*y="7[01]\d"[^>]*fill="#[Cc]00000"',
|
|
345
|
+
content
|
|
346
|
+
))
|
|
347
|
+
|
|
348
|
+
if not has_bottom_line:
|
|
349
|
+
result['warnings'].append("Missing bottom red line (expected <rect y=\"716\" height=\"4\" fill=\"#C00000\"/>)")
|
|
350
|
+
result['info']['has_bottom_line'] = False
|
|
351
|
+
else:
|
|
352
|
+
result['info']['has_bottom_line'] = True
|
|
353
|
+
|
|
271
354
|
def _categorize_issue(self, error_msg: str) -> str:
|
|
272
355
|
"""Categorize issue type"""
|
|
273
356
|
if 'viewBox' in error_msg:
|
|
@@ -424,24 +507,79 @@ class SVGQualityChecker:
|
|
|
424
507
|
print(f"\n[REPORT] Check report exported: {output_file}")
|
|
425
508
|
|
|
426
509
|
|
|
510
|
+
def auto_fix_svg(svg_file: str) -> Dict:
|
|
511
|
+
"""
|
|
512
|
+
Auto-fix common SVG issues.
|
|
513
|
+
Returns dict with fix counts.
|
|
514
|
+
"""
|
|
515
|
+
path = Path(svg_file)
|
|
516
|
+
with open(path, 'r', encoding='utf-8') as f:
|
|
517
|
+
content = f.read()
|
|
518
|
+
|
|
519
|
+
original = content
|
|
520
|
+
fixes = []
|
|
521
|
+
|
|
522
|
+
# Fix 1: Replace rgba() with rgb() + opacity
|
|
523
|
+
rgba_matches = re.findall(r'rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)', content)
|
|
524
|
+
for r, g, b, a in rgba_matches:
|
|
525
|
+
old = f'rgba({r},{g},{b},{a})'
|
|
526
|
+
# Also match with spaces
|
|
527
|
+
content = re.sub(
|
|
528
|
+
rf'rgba\(\s*{r}\s*,\s*{g}\s*,\s*{b}\s*,\s*{re.escape(a)}\s*\)',
|
|
529
|
+
f'rgb({r},{g},{b})',
|
|
530
|
+
content
|
|
531
|
+
)
|
|
532
|
+
fixes.append(f"rgba→rgb: rgba({r},{g},{b},{a})")
|
|
533
|
+
|
|
534
|
+
# Fix 2: Remove <style> blocks
|
|
535
|
+
if '<style' in content.lower():
|
|
536
|
+
content = re.sub(r'<style[^>]*>.*?</style>', '', content, flags=re.DOTALL | re.IGNORECASE)
|
|
537
|
+
fixes.append("Removed <style> block")
|
|
538
|
+
|
|
539
|
+
# Fix 3: Remove class attributes
|
|
540
|
+
if re.search(r'\bclass\s*=\s*"[^"]*"', content):
|
|
541
|
+
content = re.sub(r'\s*class\s*=\s*"[^"]*"', '', content)
|
|
542
|
+
fixes.append("Removed class attributes")
|
|
543
|
+
|
|
544
|
+
# Fix 4: Add missing bottom red line
|
|
545
|
+
has_bottom_line = bool(re.search(r'<rect[^>]*y="7[01]\d"[^>]*fill="#[Cc]00000"', content))
|
|
546
|
+
if not has_bottom_line:
|
|
547
|
+
# Insert before </svg>
|
|
548
|
+
bottom_line = '<rect x="0" y="716" width="1280" height="4" fill="#C00000"/>'
|
|
549
|
+
content = content.replace('</svg>', f'{bottom_line}\n</svg>')
|
|
550
|
+
fixes.append("Added bottom red line")
|
|
551
|
+
|
|
552
|
+
# Fix 5: Remove <g opacity="..."> by moving opacity to children
|
|
553
|
+
g_opacity_matches = re.findall(r'<g\s+opacity="([^"]+)">', content)
|
|
554
|
+
for op in g_opacity_matches:
|
|
555
|
+
# Simple removal of group opacity (conservative — just remove the opacity attr)
|
|
556
|
+
content = re.sub(r'<g\s+opacity="[^"]+"\s*>', '<g>', content, count=1)
|
|
557
|
+
fixes.append(f"Removed <g opacity=\"{op}\">")
|
|
558
|
+
|
|
559
|
+
if content != original:
|
|
560
|
+
with open(path, 'w', encoding='utf-8') as f:
|
|
561
|
+
f.write(content)
|
|
562
|
+
|
|
563
|
+
return {'file': path.name, 'fixes': fixes, 'changed': content != original}
|
|
564
|
+
|
|
565
|
+
|
|
427
566
|
def main() -> None:
|
|
428
567
|
"""Run the CLI entry point."""
|
|
429
568
|
if len(sys.argv) < 2:
|
|
430
569
|
print("PPT Master - SVG Quality Check Tool\n")
|
|
431
570
|
print("Usage:")
|
|
432
|
-
print(" python3 scripts/svg_quality_checker.py <
|
|
433
|
-
print(" python3 scripts/svg_quality_checker.py <directory>")
|
|
571
|
+
print(" python3 scripts/svg_quality_checker.py <svg_file_or_directory>")
|
|
572
|
+
print(" python3 scripts/svg_quality_checker.py <directory> --fix # Auto-fix common issues")
|
|
573
|
+
print(" python3 scripts/svg_quality_checker.py <directory> --fix --check # Fix then re-check")
|
|
434
574
|
print(" python3 scripts/svg_quality_checker.py --all examples")
|
|
435
|
-
print("\nExamples:")
|
|
436
|
-
print(" python3 scripts/svg_quality_checker.py examples/project/svg_output/slide_01.svg")
|
|
437
|
-
print(" python3 scripts/svg_quality_checker.py examples/project/svg_output")
|
|
438
|
-
print(" python3 scripts/svg_quality_checker.py examples/project")
|
|
439
575
|
sys.exit(0)
|
|
440
576
|
|
|
441
577
|
checker = SVGQualityChecker()
|
|
578
|
+
do_fix = '--fix' in sys.argv
|
|
579
|
+
do_check_after_fix = '--check' in sys.argv
|
|
442
580
|
|
|
443
581
|
# Parse arguments
|
|
444
|
-
target = sys.argv[1]
|
|
582
|
+
target = [a for a in sys.argv[1:] if not a.startswith('--')][0] if any(not a.startswith('--') for a in sys.argv[1:]) else sys.argv[1]
|
|
445
583
|
expected_format = None
|
|
446
584
|
|
|
447
585
|
if '--format' in sys.argv:
|
|
@@ -449,6 +587,29 @@ def main() -> None:
|
|
|
449
587
|
if idx + 1 < len(sys.argv):
|
|
450
588
|
expected_format = sys.argv[idx + 1]
|
|
451
589
|
|
|
590
|
+
# Auto-fix mode
|
|
591
|
+
if do_fix:
|
|
592
|
+
target_path = Path(target)
|
|
593
|
+
if target_path.is_file():
|
|
594
|
+
svg_files = [target_path]
|
|
595
|
+
else:
|
|
596
|
+
svg_output = target_path / 'svg_output' if (target_path / 'svg_output').exists() else target_path
|
|
597
|
+
svg_files = sorted(svg_output.glob('*.svg'))
|
|
598
|
+
|
|
599
|
+
print(f"\n[FIX] Auto-fixing {len(svg_files)} SVG file(s)...\n")
|
|
600
|
+
total_fixes = 0
|
|
601
|
+
for svg_file in svg_files:
|
|
602
|
+
result = auto_fix_svg(str(svg_file))
|
|
603
|
+
if result['changed']:
|
|
604
|
+
total_fixes += len(result['fixes'])
|
|
605
|
+
print(f" [FIXED] {result['file']}: {', '.join(result['fixes'])}")
|
|
606
|
+
print(f"\n[FIX] Total fixes applied: {total_fixes}")
|
|
607
|
+
|
|
608
|
+
if not do_check_after_fix:
|
|
609
|
+
print("\n[TIP] Run with --fix --check to verify fixes")
|
|
610
|
+
sys.exit(0)
|
|
611
|
+
print("\n--- Re-checking after fixes ---\n")
|
|
612
|
+
|
|
452
613
|
# Execute check
|
|
453
614
|
if target == '--all':
|
|
454
615
|
# Check all example projects
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -351,10 +351,16 @@ def create_pptx_with_native_svg(
|
|
|
351
351
|
arcname = file_path.relative_to(extract_dir)
|
|
352
352
|
zf.write(file_path, arcname)
|
|
353
353
|
|
|
354
|
+
failed_count = len(svg_files) - success_count
|
|
354
355
|
if verbose:
|
|
355
356
|
print()
|
|
356
357
|
print(f"[Done] Saved: {output_path}")
|
|
357
|
-
print(f" Succeeded: {success_count}, Failed: {
|
|
358
|
+
print(f" Succeeded: {success_count}, Failed: {failed_count}")
|
|
359
|
+
if failed_count > 0:
|
|
360
|
+
failed_indices = [i + 1 for i in range(len(svg_files))
|
|
361
|
+
if i + 1 not in range(1, success_count + failed_count + 1)]
|
|
362
|
+
# List failed slides by checking which ones threw exceptions
|
|
363
|
+
print(f" Note: {failed_count} slide(s) failed and were skipped.")
|
|
358
364
|
if use_compat_mode and has_any_image:
|
|
359
365
|
print(f" Mode: Office compatibility mode (supports all Office versions)")
|
|
360
366
|
if PNG_RENDERER == 'svglib' and renderer_hint:
|
|
@@ -15,6 +15,20 @@ from .pptx_slide_xml import TRANSITIONS
|
|
|
15
15
|
|
|
16
16
|
def main() -> None:
|
|
17
17
|
"""CLI entry point for the SVG to PPTX conversion tool."""
|
|
18
|
+
try:
|
|
19
|
+
_main_impl()
|
|
20
|
+
except KeyboardInterrupt:
|
|
21
|
+
print("\nInterrupted by user.")
|
|
22
|
+
sys.exit(130)
|
|
23
|
+
except SystemExit:
|
|
24
|
+
raise
|
|
25
|
+
except Exception as e:
|
|
26
|
+
print(f"Fatal error: {type(e).__name__}: {e}", file=sys.stderr)
|
|
27
|
+
sys.exit(1)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _main_impl() -> None:
|
|
31
|
+
"""Internal implementation of main CLI logic."""
|
|
18
32
|
transition_choices = (
|
|
19
33
|
['none'] + (list(TRANSITIONS.keys()) if TRANSITIONS
|
|
20
34
|
else ['fade', 'push', 'wipe', 'split', 'strips', 'cover', 'random'])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|