Resume Generator Clean
by @31504254
Professional resume generator with PDF, Word, and HTML export. Supports multiple templates, auto-layout, Chinese/English bilingual, and Markdown/HTML input....
clawhub install resume-generator-cleanš About This Skill
name: resume-generator version: 1.1.0 description: Professional resume generator with PDF, Word, and HTML export. Supports multiple templates, auto-layout, Chinese/English bilingual, and Markdown/HTML input. Perfect for academic and professional CVs. author: 31504254 license: MIT
Resume Generator
A professional resume generator skill for creating beautiful, print-ready resumes with multiple export formats (PDF, Word, HTML) and full Chinese character support.
Features
Installation
# Clone the repository
git clone https://github.com/yourusername/resume-generator.gitInstall dependencies
pip install reportlab pyyaml python-docx beautifulsoup4Optional: For better PDF quality from HTML
pip install weasyprint pdfkitRegister with OpenClaw
openclaw skills install resume-generator
Quick Start
Method 1: Generate from YAML Config
# Generate from config file
python generate_resume.py --config resume_config.yaml --output resume.pdfUse specific template
python generate_resume.py --config config.yaml --template modern_blue --output resume.pdf
Method 2: Convert HTML to PDF
# Convert HTML resume to PDF
python scripts/resume_to_pdf.py input.html output.pdfUse specific template
python scripts/resume_to_pdf.py input.html output.pdf --template modern
Method 3: Convert HTML/Markdown to Word
# Convert HTML to Word
python scripts/resume_to_docx.py input.html output.docxConvert Markdown to Word
python scripts/resume_to_docx.py input.md output.docx --markdown
Method 4: Python API
from scripts.resume_pdf import ResumePDFGeneratorCreate generator
gen = ResumePDFGenerator(theme='modern_blue')Add content
gen.add_header(
name="å¼ äø",
title="é«ēŗ§å·„ēØåø",
phone="138-0000-0000",
email="example@example.com",
address="åäŗ¬åøęµ·ę·åŗē¤ŗä¾č·Æ1å·"
)gen.add_section("å·„ä½ē»å", [
{
"title": "é«ēŗ§å·„ēØåø",
"org": "ęęē§ęęéå
¬åø",
"period": "2020-č³ä»",
"detail": "软件å¼å Ā· ē³»ē»ę¶ę设讔"
}
])
Generate PDF
gen.save("resume.pdf")
Export Methods
1. Direct PDF Generation (ReportLab)
Best for programmatic resume creation from Python:
from scripts.resume_pdf import ResumePDFGeneratorgen = ResumePDFGenerator(theme='modern_blue')
gen.add_header(...)
gen.add_section(...)
gen.save("output.pdf")
2. HTML to PDF Conversion
Best for converting existing HTML resumes:
# Tries multiple PDF backends automatically
python scripts/resume_to_pdf.py resume.html output.pdfSupported backends (auto-detected):
- WeasyPrint (best quality)
- pdfkit (requires wkhtmltopdf)
- ReportLab (fallback)
- FPDF (fallback)
3. Markdown/Word Export
Best for creating editable documents:
# Markdown to Word
python scripts/resume_to_docx.py resume.md output.docx --markdownHTML to Word
python scripts/resume_to_docx.py resume.html output.docx
Templates
modern_blue
classic
minimal
Configuration Format
name: "å¼ äø"
title: "é«ēŗ§å·„ēØåø Ā· ęęē§ęęéå
¬åø"
contact:
phone: "138-0000-0000"
email: "example@example.com"
address: "åäŗ¬åøęµ·ę·åŗē¤ŗä¾č·Æ1å·"sections:
- title: "å·„ä½ē»å"
items:
- title: "é«ēŗ§å·„ēØåø"
org: "ęęē§ęęéå
¬åø"
period: "2020-č³ä»"
detail: "软件å¼å Ā· ē³»ē»ę¶ę设讔"
- title: "ęč²čęÆ"
items:
- title: "č®”ē®ęŗē§å¦ē”士"
org: "ęę大å¦"
period: "2010-2013"
detail: "导åøļ¼ęęęę"
- title: "å蔨论ę"
type: "publications"
items:
- "[1] Author et al. Paper title[J]. Journal, Year."
- "[2] ..."
API Reference
ResumePDFGenerator Class
class ResumePDFGenerator:
def __init__(self, theme='modern_blue'):
"""Initialize with theme name."""
def add_header(self, name, title, phone, email, address):
"""Add resume header."""
def add_section(self, title, items):
"""Add a content section."""
def add_publications(self, papers):
"""Add publications section."""
def save(self, output_path):
"""Generate and save PDF."""
HTML to PDF Functions
from scripts.resume_to_pdf import generate_pdfConvert HTML file to PDF
generate_pdf('input.html', 'output.pdf', template='modern')Convert HTML string to PDF
html_content = "Name
Content...
"
generate_pdf(html_content, 'output.pdf', template='classic')
HTML/Markdown to Word
from scripts.resume_to_docx import generate_docx, generate_docx_from_markdownHTML to Word
generate_docx('input.html', 'output.docx', template='modern')Markdown to Word
generate_docx_from_markdown('input.md', 'output.docx', template='classic')
Examples
See examples/ directory for complete resume samples:
example_resume.yaml - Academic researcher CVacademic_cv.yaml - Academic CV with publicationsprofessional_resume.yaml - Industry resumeminimal_resume.yaml - One-page minimal designDirectory Structure
resume-generator/
āāā SKILL.md # Skill documentation
āāā README.md # Project readme
āāā LICENSE # MIT License
āāā generate_resume.py # Main CLI entry point
āāā requirements.txt # Python dependencies
āāā scripts/
ā āāā resume_pdf.py # Direct PDF generation (ReportLab)
ā āāā resume_to_pdf.py # HTML to PDF conversion
ā āāā resume_to_docx.py # HTML/Markdown to Word
āāā examples/
ā āāā example_resume.yaml
āāā assets/
āāā templates/ # HTML templates
Advanced Usage
Custom Styling
from scripts.resume_pdf import ResumePDFGeneratorUse custom colors
gen = ResumePDFGenerator(
theme='modern_blue',
primary_color='#1e3a5f',
accent_color='#2c5282'
)
Multi-page Layout
The generator automatically handles pagination:
Batch Processing
# Generate multiple resumes
for file in configs/*.yaml; do
python generate_resume.py --config "$file" --output "output/$(basename $file .yaml).pdf"
done
Troubleshooting
Chinese Characters Not Displaying
Ensure you have Chinese fonts installed:
/System/Library/Fonts/STHeiti Medium.ttcfonts-wqy-microheiPDF Generation Fails
The skill will automatically fallback to HTML output if PDF libraries are unavailable. Open the HTML in browser and print to PDF.
Word Export Issues
Make sure python-docx is installed:
pip install python-docx beautifulsoup4
Dependencies
Required:
reportlab - PDF generationpyyaml - YAML config parsingpython-docx - Word document generationbeautifulsoup4 - HTML parsingOptional (for better PDF quality):
weasyprint - High-quality HTML to PDFpdfkit - wkhtmltopdf wrapperLicense
MIT License - See LICENSE file for details.
Contributing
Pull requests welcome! Please follow the existing code style and add tests for new features.
Changelog
v1.1.0
v1.0.0
š” Examples
See examples/ directory for complete resume samples:
example_resume.yaml - Academic researcher CVacademic_cv.yaml - Academic CV with publicationsprofessional_resume.yaml - Industry resumeminimal_resume.yaml - One-page minimal designš Tips & Best Practices
Chinese Characters Not Displaying
Ensure you have Chinese fonts installed:
/System/Library/Fonts/STHeiti Medium.ttcfonts-wqy-microheiPDF Generation Fails
The skill will automatically fallback to HTML output if PDF libraries are unavailable. Open the HTML in browser and print to PDF.
Word Export Issues
Make sure python-docx is installed:
pip install python-docx beautifulsoup4