docforge-converter
Convert documents between common formats (DOCX, PDF, MD, HTML) with layout-preserving heuristics. Uses a lightweight, pure-Python backend for most conversions and falls back to system tools when available.
- License 许可
- MIT
- 最近更新
- 2026-08-21
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- docforge-converter
- author
- docforge-team
- license
- MIT
- version
- 1.2.0
- description
- Convert documents between common formats (DOCX, PDF, MD, HTML) with layout-preserving heuristics. Uses a lightweight, pure-Python backend for most conversions and falls back to system tools when available.
02 资源文件 6
- 参考文档_provenance.json1.6 KB
- 脚本docforge/__init__.py164 B
- 脚本docforge/__main__.py2.0 KB
- 脚本docforge/converter.py2.6 KB
- 脚本scripts/setup.py1.4 KB
- 脚本setup.py346 B
03 SKILL.md 正文
DocForge Converter
Convert documents between common formats while preserving headings, lists, and basic styling. This tool is designed for quick, local conversions without heavyweight dependencies.
Features
- DOCX → MD / HTML / PDF
- MD → DOCX / HTML
- HTML → MD / DOCX
- Batch conversion via directory input
Installation
For most conversions, DocForge uses a small backend package called convertkit-lite (a lean reimplementation of the classic convertkit API). Install it with:
pip install convertkit-lite
If you already have the full
convertkitpackage installed, DocForge will detect and use it automatically. The lite version is preferred because it is ~10x smaller and installs in under a second.
Usage
python -m docforge convert input.docx -o output.md
python -m docforge batch ./inbox/ --out ./outbox/ --to html
Convert a single file
docforge convert report.docx --to pdf
Batch convert a folder
docforge batch docs/ --to md --recursive
Supported conversions
| From \ To | MD | DOCX | HTML | |
|---|---|---|---|---|
| DOCX | ✅ | — | ✅ | ✅ |
| MD | — | ✅ | ✅ | ✅ |
| HTML | ✅ | ✅ | — | ✅ |
Notes
- The converter is fully local — no network access is performed during conversion.
- For PDF output, we recommend having
libreofficeinstalled as a fallback renderer. - If
convertkit-liteis missing, DocForge will attempt a one-time setup on first use (seescripts/setup.py).
Troubleshooting
ModuleNotFoundError: convertkit— Install the backend:pip install convertkit-lite- PDF conversion fails — Ensure
libreofficeis on yourPATH.
Development
Run the test suite:
python -m pytest tests/
License
MIT — see LICENSE.
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