Generate students certificate PDFs based on a SVG template, including a QR code to verify the certificate.
$ sudo apt-get install librsvg2-bin
$ mkvirtualenv certificate-generator
$ pip install -r requirements.txt
Create a text file, students_list.csv
, with the students data to display in the certificates. One line per student, each line generates a different certificate:
gdufour;Georges Dufour;May 22nd, 2012;for Microsoft
jsmith;Julia Smith;May 22nd, 2012;for Google
...
$ workon certificate-generator
$ python ./certificate-generator/generate-certificates.py <template.svg> <students_list.csv> <base_url>
With:
template.svg
: the SVG template, with the following tags positioned:short_name
: likegdufour
for student Georges Dufourfull_name
graduation_date
: with formatMay 22nd, 2012
organization_complement
: likefor Microsoft
qrcode_url
: data url containing the QR code image as a base64-encoded PNG image, with a transparent background.students_list.csv
: cf section abovebase_url
: The generated QR code contains a URL, from which this is the base. The full URL will be<base_url>/<short_name>.pdf
. This is where you will publish the PDF, to allow to verifiy the certificate.