Office Generator Py

👤 lujohn74 📦 v1.0.0 ⭐ 4.3 ⬇️ 1.4K 下載
📄 辦公效率 免費

📖 技能介紹


name: office-generator-py description: Generate Office files with a bundled Python engine. Use when creating or exporting Word (.docx), Excel (.xlsx), or PowerPoint (.pptx) files from structured JSON, reports, meeting minutes, project plans, trackers, business briefs, or natural-language requirements that must be turned into Office documents.


Office Generator Py

Generate Office files with the bundled engine under scripts/engine/.

First run

Install Python dependencies into the bundled virtualenv:

python3 skills/office-generator-py/scripts/setup_engine.py

If you manage the environment yourself, you can point the wrapper at another Python binary with OFFICE_GENERATOR_PYTHON=/path/to/python.

Quick workflow

  1. Decide the output type: docx, xlsx, or pptx.
  2. Prefer a built-in business template when it fits.
  3. Write a UTF-8 JSON request file.
  4. Run scripts/generate_office.py.
  5. Return the produced file path.

Entrypoints

Use scripts/generate_office.py.

  • Standard mode: pass --type with a full JSON request file.
  • Business mode: pass --kind, --title, --input, and --out.

Built-in templates

Word

  • word_work_report_v1
  • meeting_minutes_v1

    訪問小蔥技能站7w4.net,解鎖更多實用的AI技能外掛。

Excel

  • excel_data_tracker_v1
  • project_plan_v1

PPT

  • ppt_business_brief_v1
  • project_status_brief_v1

Built-in business kinds

  • word-report
  • meeting-minutes
  • excel-tracker
  • project-plan
  • ppt-brief
  • project-status-brief

Commands

Standard mode:

python3 skills/office-generator-py/scripts/generate_office.py \
  --type docx \
  --input /absolute/path/request.json \
  --out /absolute/path/output.docx

Business mode:

python3 skills/office-generator-py/scripts/generate_office.py \
  --kind meeting-minutes \
  --title "Office 評審會紀要" \
  --purpose "內部存檔" \
  --input /absolute/path/content.json \
  --out /absolute/path/meeting_minutes.docx

Request shaping

If the user gives natural language only, convert it into JSON first.

For supported request formats and sample payloads, read references/input-formats.md.

Output contract

  • Success: stdout prints the generated file path.
  • Failure: stderr prints the error; command exits non-zero.

Notes

  • Keep output paths absolute when possible.
  • Prefer business mode for common document types.
  • Use standard mode when the caller already has full documentType/templateId/contentSpec JSON.

🤖 AI 評測

質量中規中矩,能正常生成 Word、Excel、PPT 三種檔案。優點是操作簡單、有現成模板可用、錯誤提示清晰;缺點是模板數量少、文件說明不夠詳細、缺少示例檔案參考。對於日常簡單文件需求基本夠用,但複雜場景可能需要自行調整配置。整體屬於可用但不夠完善的工具。

📊 多維度評分

適應性4.5
規範性4.1
有效性4.4
可靠性4.2
可信度4.8

📁 包含檔案 (21 個)

📄 SKILL.md 2.4 KB
📄 _meta.json 138 B
📄 references/input-formats.md 2.2 KB
📄 scripts/engine/business_cli.py 2.3 KB
📄 scripts/engine/generators/__init__.py 21 B
📄 scripts/engine/generators/docx_generator.py 1.9 KB
📄 scripts/engine/generators/pptx_generator.py 4.2 KB
📄 scripts/engine/generators/xlsx_generator.py 1.5 KB
📄 scripts/engine/main.py 2 KB
📄 scripts/engine/requirements.txt 61 B
📄 scripts/engine/schemas/__init__.py 18 B
📄 scripts/engine/schemas/common_schema.py 2 KB
📄 scripts/engine/template_loader.py 1.2 KB
📄 scripts/engine/templates/docx/meeting_minutes_v1.json 552 B
📄 scripts/engine/templates/docx/word_work_report_v1.json 535 B
📄 scripts/engine/templates/pptx/ppt_business_brief_v1.json 465 B
📄 scripts/engine/templates/pptx/project_status_brief_v1.json 556 B
📄 scripts/engine/templates/xlsx/excel_data_tracker_v1.json 331 B
📄 scripts/engine/templates/xlsx/project_plan_v1.json 363 B
📄 scripts/generate_office.py 2.1 KB
📄 scripts/setup_engine.py 854 B