{"skill":{"slug":"ai-ppt-generator","displayName":"Baidu Wenku AIPPT","summary":"Generate PPT with Baidu Wenku AI. Smart template selection based on content.","description":"---\nname: Baidu Wenku AIPPT\ndescription: Generate PPT with Baidu Wenku AI. Smart template selection based on content.\nmetadata: { \"openclaw\": { \"emoji\": \"📑\", \"requires\": { \"bins\": [\"python3\"], \"env\":[\"BAIDU_API_KEY\"]},\"primaryEnv\":\"BAIDU_API_KEY\" } }\n---\n\n# AI PPT Generator\n\nGenerate PPT using Baidu AI with intelligent template selection.\n\n## Smart Workflow\n1. **User provides PPT topic**\n2. **Agent asks**: \"Want to choose a template style?\"\n3. **If yes** → Show styles from `ppt_theme_list.py` → User picks → Use `generate_ppt.py` with chosen `tpl_id` and real `style_id`\n4. **If no** → Use `random_ppt_theme.py` (auto-selects appropriate template based on topic content)\n\n## Intelligent Template Selection\n`random_ppt_theme.py` analyzes the topic and suggests appropriate template:\n- **Business topics** → 企业商务 style\n- **Technology topics** → 未来科技 style  \n- **Education topics** → 卡通手绘 style\n- **Creative topics** → 创意趣味 style\n- **Cultural topics** → 中国风 or 文化艺术 style\n- **Year-end reports** → 年终总结 style\n- **Minimalist design** → 扁平简约 style\n- **Artistic content** → 文艺清新 style\n\n## Scripts\n- `scripts/ppt_theme_list.py` - List all available templates with style_id and tpl_id\n- `scripts/random_ppt_theme.py` - Smart template selection + generate PPT\n- `scripts/generate_ppt.py` - Generate PPT with specific template (uses real style_id and tpl_id from API)\n\n## Key Features\n- **Smart categorization**: Analyzes topic content to suggest appropriate style\n- **Fallback logic**: If template not found, automatically uses random selection\n- **Complete parameters**: Properly passes both style_id and tpl_id to API\n\n## Usage Examples\n```bash\n# List all templates with IDs\npython3 scripts/ppt_theme_list.py\n\n# Smart automatic selection (recommended for most users)\npython3 scripts/random_ppt_theme.py --query \"人工智能发展趋势报告\"\n\n# Specific template with proper style_id\npython3 scripts/generate_ppt.py --query \"儿童英语课件\" --tpl_id 106\n\n# Specific template with auto-suggested category\npython3 scripts/random_ppt_theme.py --query \"企业年度总结\" --category \"企业商务\"\n```\n\n## Agent Steps\n1. Get PPT topic from user\n2. Ask: \"Want to choose a template style?\" \n3. **If user says YES**:\n   - Run `ppt_theme_list.py` to show available templates\n   - User selects a template (note the tpl_id)\n   - Run `generate_ppt.py --query \"TOPIC\" --tpl_id ID`\n4. **If user says NO**:\n   - Run `random_ppt_theme.py --query \"TOPIC\"`\n   - Script will auto-select appropriate template based on topic\n5. Set timeout to 300 seconds (PPT generation takes 2-5 minutes)\n6. Monitor output, wait for `is_end: true` to get final PPT URL\n\n## Output Examples\n**During generation:**\n```json\n{\"status\": \"PPT生成中\", \"run_time\": 45}\n```\n\n**Final result:**\n```json\n{\n  \"status\": \"PPT导出结束\", \n  \"is_end\": true, \n  \"data\": {\"ppt_url\": \"https://image0.bj.bcebos.com/...ppt\"}\n}\n```\n\n## Technical Notes\n- **API integration**: Fetches real style_id from Baidu API for each template\n- **Error handling**: If template not found, falls back to random selection\n- **Timeout**: Generation takes 2-5 minutes, set sufficient timeout\n- **Streaming**: Uses streaming API, wait for `is_end: true` before considering complete\n","tags":{"latest":"1.1.5"},"stats":{"comments":3,"downloads":30521,"installsAllTime":264,"installsCurrent":264,"stars":56,"versions":14},"createdAt":1770484058130,"updatedAt":1778486075083},"latestVersion":{"version":"1.1.5","createdAt":1775033369430,"changelog":"- Skill name updated from \"ai-ppt-generator\" to \"Baidu Wenku AIPPT\"\n- Description clarified to reference \"Baidu Wenku AI\" instead of just \"Baidu AI\"\n- No changes to scripts, features, or core functionality\n- No file changes detected in this version","license":"MIT-0"},"metadata":{"setup":[{"key":"BAIDU_API_KEY","required":true}],"os":null,"systems":null},"owner":{"handle":"ide-rea","userId":"s17a4y7rpj2bmp94zpqe8r915h83gq6d","displayName":"ide-rea","image":"https://avatars.githubusercontent.com/u/30512600?v=4"},"moderation":null}