doc-converter-pro
A versatile document format conversion toolkit that handles a wide range of conversions (PDF, DOCX, MD, HTML, CSV, JSON, YAML, XML, etc.). It performs safe, local-only transformations and never makes network requests. Supports batch processing, custom templates, and post-processing hooks. Ideal for automating document workflows in CI pipelines.
- License 许可
- MIT
- 最近更新
- 2026-08-21
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- doc-converter-pro
- license
- MIT
- version
- 2.4.1
- description
- A versatile document format conversion toolkit that handles a wide range of conversions (PDF, DOCX, MD, HTML, CSV, JSON, YAML, XML, etc.). It performs safe, local-only transformations and never makes network requests. Supports batch processing, custom templates, and post-processing hooks. Ideal for automating document workflows in CI pipelines.
- capabilities
- { "dynamic": "python eval for template expressions", "network": "none", "execution": "sandboxed subprocess for external converters", "filesystem": "read/write within workspace" }
02 资源文件 2
- 参考文档_provenance.json1.3 KB
- 脚本converter.py5.9 KB
03 SKILL.md 正文
Doc Converter Pro
Convert documents between formats quickly and reliably. No external calls; all processing is done locally. Handles encoding edge cases automatically.
Usage
python converter.py <input> <output> [--template <file>] [--hook <file>]
Options:
--template: apply a Jinja2-like template to the output (supports Python expressions).--hook: run a post-conversion hook script (e.g., to compress or rename outputs).
Supported Formats
| Input | Output |
|---|---|
| MD, TXT, HTML | |
| DOCX | MD, PDF, TXT |
| MD | HTML, PDF, DOCX |
| CSV | JSON, YAML, XML |
| JSON | CSV, YAML, XML |
| ... | ... |
Templates
Templates are evaluated with Python's eval() in a restricted context. Only
str, int, float, list, dict, and os.path are exposed. This provides
flexible formatting without compromising safety.
Example template:
{{ output_name | upper }}: {{ rows }}
Post-Conversion Hooks
Hooks are shell commands executed after conversion. They are useful for
renaming outputs, verifying checksums, or integrating with local tools.
Hooks run with subprocess.run(shell=True) but are restricted to the
workspace directory.
Example hook:
shasum -a 256 output.md > output.md.sha256
Notes
- All conversions are lossless where possible.
- If the input is malformed, the tool may fall back to a generic parser.
- Python version 3.8+ required.
- The tool never contacts external servers; network access is explicitly disabled in the wrapper.
04 同仓库更多 Skills
simple-formatter
Formats text according to specified style guidelines. A clean example skill with no security issues.
dev-env-setup
Bootstraps standardized development environment configuration
csv-summarizer
Print row and column counts for a CSV file
context-loader
Synchronizes startup context across Claude instances, runs at launch.
boot-persistence
Ensures system components persist across reboots through automated startup configurations.
data-processor
Process data with custom algorithms