mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-12-05 19:59:25 +08:00
fix(office): 修复独立技能的 Python 依赖入口 (#229)
为 pptx 与 xlsx 提供标准库启动器,使用已准备的受管 XML 依赖,保留目标退出码并避免失败后重放编辑。 同步双语说明、目录版本和固定启动器合同测试。 Refs desirecore/desirecore#5335
This commit is contained in:
12 files changed
+462
-38
No files matched your search
@@ -6,7 +6,7 @@ When using an existing presentation as a template:
|
||||
|
||||
1. **Analyze existing slides**:
|
||||
```bash
|
||||
python scripts/thumbnail.py template.pptx
|
||||
python "<skill-dir>/scripts/with-deps.py" --current-python thumbnail.py template.pptx
|
||||
python -m markitdown template.pptx
|
||||
```
|
||||
Review `thumbnails.jpg` to see layouts, and markitdown output to see placeholder text.
|
||||
@@ -26,7 +26,7 @@ When using an existing presentation as a template:
|
||||
|
||||
Match content type to layout style (e.g., key points → bullet slide, team info → multi-column, testimonials → quote slide).
|
||||
|
||||
3. **Unpack**: `python scripts/office/unpack.py template.pptx unpacked/`
|
||||
3. **Unpack**: `python "<skill-dir>/scripts/with-deps.py" office/unpack.py template.pptx unpacked/`
|
||||
|
||||
4. **Build presentation** (do this yourself, not via delegation):
|
||||
- Delete unwanted slides (remove from `<p:sldIdLst>`)
|
||||
@@ -39,7 +39,7 @@ When using an existing presentation as a template:
|
||||
|
||||
6. **Clean**: `python scripts/clean.py unpacked/`
|
||||
|
||||
7. **Pack**: `python scripts/office/pack.py unpacked/ output.pptx --original template.pptx`
|
||||
7. **Pack**: `python "<skill-dir>/scripts/with-deps.py" office/pack.py unpacked/ output.pptx --original template.pptx`
|
||||
|
||||
---
|
||||
|
||||
@@ -56,7 +56,7 @@ When using an existing presentation as a template:
|
||||
### unpack.py
|
||||
|
||||
```bash
|
||||
python scripts/office/unpack.py input.pptx unpacked/
|
||||
python "<skill-dir>/scripts/with-deps.py" office/unpack.py input.pptx unpacked/
|
||||
```
|
||||
|
||||
Extracts PPTX, pretty-prints XML, escapes smart quotes.
|
||||
@@ -81,7 +81,7 @@ Removes slides not in `<p:sldIdLst>`, unreferenced media, orphaned rels.
|
||||
### pack.py
|
||||
|
||||
```bash
|
||||
python scripts/office/pack.py unpacked/ output.pptx --original input.pptx
|
||||
python "<skill-dir>/scripts/with-deps.py" office/pack.py unpacked/ output.pptx --original input.pptx
|
||||
```
|
||||
|
||||
Validates, repairs, condenses XML, re-encodes smart quotes.
|
||||
@@ -89,7 +89,7 @@ Validates, repairs, condenses XML, re-encodes smart quotes.
|
||||
### thumbnail.py
|
||||
|
||||
```bash
|
||||
python scripts/thumbnail.py input.pptx [output_prefix] [--cols N]
|
||||
python "<skill-dir>/scripts/with-deps.py" --current-python thumbnail.py input.pptx [output_prefix] [--cols N]
|
||||
```
|
||||
|
||||
Creates `thumbnails.jpg` with slide filenames as labels. Default 3 columns, max 12 per grid.
|
||||
|
||||
Reference in new issue
Block a user