From 41de28fae4c54ad7cc52131e3a0366554590c285 Mon Sep 17 00:00:00 2001 From: Foxo Date: Tue, 11 Jul 2023 19:39:59 +0000 Subject: [PATCH] Added readme.md --- readme.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..8c3981f --- /dev/null +++ b/readme.md @@ -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. \ No newline at end of file