- Open PowerShell in the project directory
- Create and activate the virtual environment:
python -m venv .venv .\.venv\Scripts\Activate.ps1 - Install dependencies:
pip install -r requirements.txt
.\.venv\Scripts\python.exe main.pyOr simply:
python main.pyAll character sheets in the examples/ directory will be processed and PDFs will be generated in the output/ directory.
You can point the tool at any folder of .txt files (or a single .txt file):
# Folder of .txt files
python main.py --input "C:\path\to\my_sheets"
# Single file
python main.py --input "C:\path\to\my_sheets\my_character.txt"
# Custom output directory
python main.py --input "C:\path\to\my_sheets" --output "C:\path\to\exports"
# Use a custom file pattern (when input is a directory)
python main.py --input "C:\path\to\my_sheets" --pattern "*_final.txt"
# Enable debug previews (PNG) and whitespace metrics
python main.py --input "C:\path\to\my_sheets" --debugNotes:
- Defaults remain
--input examplesand--output output. - Debug is OFF by default. Use
--debugto generate PNG previews and whitespace metrics. - With
--debug, PNGs go to<output>/png_debug/and intermediate PDFs to<output>/_debug_pdf/.
- Place your formatted text file in the
examples/directory - Run
python main.py - Your PDF will be generated in the
output/directory
parser.py: Intelligent text file parsing that extracts structured data from formatted character sheetspdf_generator.py: Professional PDF generation with modern styling and layoutmain.py: Command-line entry point for batch processing
- Modern Color Palette: Professional blues and grays with accent colors
- Clean Typography: Hierarchical headings and readable body text
- Efficient Layout: Two-page format with attributes on page 1, background/notes on page 2
- Professional Tables: Attribute tables with alternating row colors
- Organized Sections: Clear visual separation of character information
✓ Character Header (Name, Type, Focus, Flavor, World) ✓ Attributes (Pools, Edges, Defenses, Initiative) ✓ Special Abilities ✓ Skills ✓ Attacks ✓ Cyphers ✓ Equipment ✓ Background ✓ Notes
Edit the color palette in pdf_generator.py:
self.colors = {
'primary': HexColor('#2C3E50'),
'secondary': HexColor('#3498DB'),
# ... add more colors
}- Add parsing logic in
parser.py(e.g.,_parse_new_section()) - Add PDF generation in
pdf_generator.py(e.g.,_add_new_section()) - Call the new method in the
generate()function
Modify page margins and styling in CypherCharacterSheetPDF.__init__():
self.doc = SimpleDocTemplate(
output_path,
pagesize=letter, # or A4
rightMargin=0.5 * inch,
# ... adjust margins as needed
)- Make sure Python is in your PATH
- Or use the full path:
.\.venv\Scripts\python.exe main.py
- Check that text files exist in the
examples/directory - Check console output for parsing errors
- Ensure file format matches the expected structure
- Review the input text file format
- Check parser output for parsing issues
- Verify section headers match expected names (e.g., "Special Abilities", "Skills")
- Command-line arguments for custom input/output directories
- Interactive GUI for character creation
- Template selection for different game systems
- Custom color scheme configuration
- Image/portrait support
- Multi-language support
- Export to other formats (HTML, JSON, XML)