Doc Forge — Document Generation
Create professional documents from markdown or templates. Supports PDF, DOCX, and PPTX formats with customizable styling.
Installation
bash
# Install dependencies pip install -r requirements.txt # Or use setup script bash /a0/usr/skills/setup.sh # Note: weasyprint requires system dependencies on some Linux distributions: # Debian/Ubuntu: apt-get install libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 # AlmaLinux/RHEL: yum install pango pango-devel
When to Use
Use this skill when you need to:
- •Create PDF documents from markdown
- •Generate DOCX reports
- •Create PowerPoint presentations
- •Convert between document formats
- •Apply templates to structured data
Supported Formats
| Format | Extension | Features |
|---|---|---|
| Print-ready, styled with CSS | ||
| DOCX | .docx | Editable Word documents |
| PPTX | .pptx | PowerPoint presentations |
Usage
Via Python Script
bash
python /a0/usr/skills/doc-forge/scripts/doc_forge.py --format pdf --input document.md --output report.pdf --title "Report Title"
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
--format | str | required | Output format: pdf/docx/pptx |
--input | str | required | Input markdown file path |
--output | str | required | Output file path |
--title | str | "Document" | Document title |
--template | str | optional | Template file path |
Examples
- •
PDF from markdown:
bashpython /a0/usr/skills/doc-forge/scripts/doc_forge.py --format pdf --input report.md --output report.pdf --title "Q4 Report"
- •
DOCX document:
bashpython /a0/usr/skills/doc-forge/scripts/doc_forge.py --format docx --input notes.md --output notes.docx --title "Meeting Notes"
- •
PowerPoint presentation:
bashpython /a0/usr/skills/doc-forge/scripts/doc_forge.py --format pptx --input slides.md --output presentation.pptx --title "Project Proposal"
Markdown Support
- •Headers (H1-H6)
- •Lists (ordered/unordered)
- •Tables
- •Code blocks
- •Bold/italic text
- •Links
- •Images
Requirements
- •
markdown>=3.5.0 - •
python-docx>=1.1.0 - •
python-pptx>=0.6.23 - •
weasyprint>=60.0 - •
Jinja2>=3.1.0 - •
Pillow>=10.0.0
Files
code
/a0/usr/skills/doc-forge/ ├── scripts/ │ └── doc_forge.py ├── requirements.txt └── SKILL.md