# ai_ppt_new **Repository Path**: dkb778/ai_ppt_new ## Basic Information - **Project Name**: ai_ppt_new - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-03 - **Last Updated**: 2026-07-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ai_ppt_new New AI PPT architecture built around mainstream template-driven generation: ```text Uploaded PPTX -> ai_ppt.template # low-level PPTX -> TemplateSchema -> ai_ppt.template_profile # Theme + Layout + Component + Content Pattern -> planning / layout_engine / rendering / quality ``` The uploaded PPT is treated as a **style and layout reference**, not as a raw shape-filling target. Strict shape filling should be implemented later as a separate manifest-based mode. ## Current Modules - `ai_ppt.template`: deterministic PPTX analyzer and low-level schema compiler. - `ai_ppt.template_profile`: high-level profile builder for: - Theme Template - Visual Asset Template - Layout Template - Component Template - Content Pattern Template - `ai_ppt.content_planner`: prompt-to-DeckIR planner with deterministic fallback and LLM JSON contract. - `ai_ppt.layout_engine`: deterministic Layout Pattern library, planner, and autofit layer. - `ai_ppt.rendering`: PPTX writer for `LayoutSpec` based generation. ## Example ```bash python -m ai_ppt.template.loader \ --input-dir /path/to/pptx_dir \ --output-dir /tmp/schema \ --cache-file /tmp/template_cache.json \ --force python -m ai_ppt.template_profile.demo_build_profile \ --template-schema /tmp/schema/风格4.schema.json \ --output /tmp/profile/风格4.profile.json \ --asset-output-dir /tmp/assets/风格4 ``` The profile builder exports reusable images from the uploaded PPTX into `theme.background_assets` and `theme.decorative_assets`. LayoutEngine then selects background and decorative assets by slide role before rendering. Generate a 10-slide demo using all built-in layout patterns: ```bash python -m ai_ppt.layout_engine.demo_generate \ --template-profile examples/profile/风格4.profile.json \ --output examples/output/layout_engine_demo.pptx ``` Generate a prompt-driven deck: ```bash python -m ai_ppt.content_planner.demo_generate_from_prompt \ --prompt "生成一份智能制造升级方案汇报,重点包括背景、核心能力、关键指标、实施路径和总结建议。" \ --template-profile examples/profile/风格4.profile.json \ --page-count 10 \ --output examples/output/content_planner_demo.pptx ``` Generate with the configured OpenAI-compatible LLM endpoint: ```bash python -m ai_ppt.content_planner.demo_generate_from_prompt \ --use-llm \ --llm-base-url http://111.203.213.68:3092/v1 \ --llm-model qwen3-32b-fp8 \ --prompt "生成一份智能制造升级方案汇报,重点包括背景、核心能力、关键指标、实施路径和总结建议。" \ --template-profile examples/profile/风格4.profile.json \ --page-count 10 \ --output examples/output/llm_content_demo.pptx ``` Generate with Qianfan web search context: ```bash python -m ai_ppt.content_planner.demo_generate_from_prompt \ --use-llm \ --enable-search \ --search-config /Users/liuxiaoyu/PycharmProjects/web_search/3d_fengzhi/config.json \ --llm-base-url http://111.203.213.68:3092/v1 \ --llm-model qwen3-32b-fp8 \ --prompt "生成一份北京两日博物馆游学计划,包含行程框架、四个博物馆安排、实用贴士、教育价值总结。" \ --template-profile examples/profile/风格4.profile.json \ --page-count 10 \ --output examples/output/search_llm_content_demo.pptx ``` Built-in layout patterns: - `cover_center` - `section_divider` - `title_bullets` - `three_cards` - `four_cards_grid` - `metrics_grid` - `comparison_columns` - `process_steps` - `timeline` - `summary_actions` - `agenda_grid` - `two_column` - `problem_solution` - `quote_focus` - `big_number_focus` - `swot_matrix` - `table_matrix` - `case_study` - `risk_matrix` - `contact_closing`