Generate invoices using python, weasyprint and yaml.
Just add your data to documents/invoice/data.yml
and run the ./buildpdf.py
script.
Current template looks like this:
Usage see ./buildpdf.py --help
:
usage: buildpdf.py [-h] [--template TEMPLATE] [--yaml_file YAML_FILE]
[--output_pdf OUTPUT_PDF] [--locale LOCALE]
Convert HTML template to pdf with data from yaml
optional arguments:
-h, --help show this help message and exit
--template TEMPLATE The name of the template to use (e.g. invoice)
--yaml_file YAML_FILE
The yaml file to use for data
--output_pdf OUTPUT_PDF
The output pdf file
--locale LOCALE The locale to use
Docker
docker build -t invoice .
docker run -it --rm -v /Users/philippbraun/Desktop/invoice-generator:/root -p 8000:8000 invoice