Added readme.md

This commit is contained in:
Foxo 2023-07-11 19:39:59 +00:00
parent 4ed3ecef04
commit 41de28fae4
1 changed files with 15 additions and 0 deletions

15
readme.md Normal file
View File

@ -0,0 +1,15 @@
# Badge Generator
Editing hundreds of badges by hand was a tedious and time consuming project, so it was automated with this script.
## Why not the Pretix badge generator?
Pretix badge generator was particularly hard to use and special cases (like the custom background based on role) was pretty much impossible.
## How does this work?
The script "gen_badges.py" will:
1. Fetch all orders from the pretix api
2. Fetch details from each order, and use it to edit a SVG template. Rather than using XML libraries, everything is done with python built-in ".replace()" function with no regards on potential XML corruption.
3. Render all the resultant SVG files to PDF (using inkscape)
4. Merge all the separate PDF files to a combined one (using pdfmerge)
## How do i create the template?
Just use Inkscape and then manually edit the paths of the *.svg file or find out how to replace them. Make sure to "vacuum document" and "export as a regular SVG" so that the file is simpler and easier to edit.