Skip to content

mmulqueen/weasymerge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WeasyMerge is a utility for doing mail merges from a CSV file to multiple PDF files. The PDF is generated by WeasyPrint and templates can be built using HTML and CSS with Jinja2 templating.

Usage

weasymerge.py --data guests.csv --template invite.html.j2 --output "pdfs/Invite {row_number} {row[Name]}.pdf"

The first row of the CSV file is assumed to be the header row and the header is used as the key for the row dictionary.

HTML escaping is on by default in the Jinja2 template.

The row number for the first data row is 1.

WeasyMerge provides "safe" row data to the output filename template (ASCII letters, digits, space, underscore, hyphen, and dot). Non-ASCII letters are converted to their closest ASCII equivalent.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages