Easily generate and distribute bulk certificates with a custom template and CSV input using GDSC-Certificator.
Here is a video showing how to GDSC-Certificator.
- Download/clone the repository by running
git clone https://github.com/cocomo29/GDSC-Certificator.git
. - Go to the directory by running
cd GDSC-Certificator
. - Install the requirements by running
pip install -r requirements.txt
.
-
Create a template for the certificate. If your template is in pdf you can easily convert it to an image by using this website.
-
Download the csv file from the google form. The csv file should have the following columns:
Name: This will be used to fill the name in certificate.
Email: This will be used to send the certificate to the participant. (not necessary if you don't want to send the certificate via email)If you have an xlsx file you can easily convert it to a csv file by using this website.
-
Move the template and the csv file to the project's directory and rename them to
template.png
anddata.csv
respectively. (this is not necessary but it will make your life easier)
- Run main.py.
- Fill the required fields.
- When filling the coordinates, open the template image with paint and make a rough guess of the point where you want to fill the name. Move your mouse to that point and note the coordinates from the bottom left corner of the screen. (you can also use this website to get the coordinates)
- Remember that the coordinates are in the format (x, y) and the coordinates you choose will be the center of the text.
- Don't worry if you dont see the text in the expexted place on first try, you can always change the coordinates and try again.
- Click on the
Generate
button to generate the certificates. - The generated certificates will be saved in the
Generated Certificates
directory.
Tip: If you want, you can also change the font of the text by replacing arial.ttf
with the font of your choice in line 42 of main.py.
Note: New font must be installed in your system, you can use following script to check the installed fonts in your system.
import matplotlib.font_manager as fm
font_list = fm.findSystemFonts()
for font in font_list:
print(font)
- Go to mail.py.
- Change the name of csv file in line 9 to the name of your csv file.
- Add your email and app password in line 13 and 14 respectively.
- Do remember that this is not your email password, it is the app password generated by google. You can generate it by following this guide.
- In simple steps:
- Go to manage your google account > security.
- Turn on 2-step verification.
- Click on App Passwords.
- Generate a new app password.
- Copy the app password and paste it in the code.
- Edit the subject and body of the email in line 15 and 16 respectively.
- Run mail.py and wait for the magic to happen.
Contributions, issues and feature requests are welcome. After cloning & setting up project locally, you can just submit a PR to this repo and it will be deployed once it's accepted.
Give a βοΈ if this project helped you or if you liked it :)