Sabyasachi-Seal/Certificate-Generator-MLSA
Automatic Certificate Generation and Mailing for the MLSA Events
Microsoft Learn Student Ambassador Certificate Automation
Event done ? Ready to send certificates ?
Click here to access certificate generator: https://mlsa.sabyasachiseal.com/
Backup website: https://mlsa-2.sabyasachiseal.com/ (Takes time to load)
Tutorial
- Enter your name and event name, and select a CSV file (probably from registration form). Make sure the csv file you
upload has a "Name" and "Email" column.
- Click on Generate Certificates, it might take some time (it might feel like its stuck at 100%) but it will generate
all the certificates.
- You can now click on "Send emails" and send all the certificates to the participants. Remember, all the emails might
not reflect on the participants mails instantly, it might take upto 6 hours for a send email to reflect on the
participant's mailbox.
Example of what the participants receive on their mail:
And the certificates are attached as such:
Other event related details, links and rules: https://stdntpartners.sharepoint.com/sites/SAProgramHandbook/SitePages/Hosting-Events.aspx
Instructions Below are for you to run this project locally. Use master branch for the same
Tutorial Video for running locally:
This repo simply use a template certificate docx file and generates certificates
both docx and pdf.
Automatic Mail Working on Windows 10 only.
Prerequisite
We want give you some advices or tips before to run or execute the app locally, in order to follow python best practice
given by the community.
Instead, to install all the package required to run the app, locally we suggest you to use a virtual environment that
gives some advantage, like:
- Not create conflicts with previous library or package installed locally
- Resolve version library conflicts that can happen if a same library is installed with different version
- And all package installed in the venv(Virtual environment) are just for this project not other one so that can affect
the behavior of another app
So in order to install or create a virtual environment, you to follow this steps :
- Step 1
- Open the terminal(Cli: Command Line Interface) in order to execute some command there
- Verify if you are in the right directory before to execute any command, the end of path showed in the terminal, must
be the name of the project
- Step 2 : Create virtual environment
- Run this command to create a virtual environment :
If you haven't configured thePATHandPATHEXTvariables for your Python installation, use this command :
elsec:\>Python35\python -m venv c:\path\to\myenvc:\>python -m venv c:\path\to\myenv - Replace the
c:\path\to\myenvby the correct path of your virtual environment. - It's recommended to place the virtual environment at the parent directory of your project.
- Run this command to create a virtual environment :
- Step 3 : Activate the virtual environment
- Activation of a virtual environment depends on the platform you use.
- if you are using a posix based platform :
- bash/zsh :
$ source <venv>/bin/activate - fish :
$ source <venv>/bin/activate.fish - csh/tcsh :
$ source <venv>/bin/activate.csh - PowerShell :
$ <venv>/bin/Activate.ps1
- bash/zsh :
- If is Windows system :
- cmd.exe :
C:\> <venv>\Scripts\activate.bat - PowerShell :
PS C:\> <venv>\Scripts\Activate.ps1
- cmd.exe :
- if you are using a posix based platform :
- The
<venv>correspond to the entire path of virtual environment if you are in the root directory project instead
you can the relative path
- Activation of a virtual environment depends on the platform you use.
Be sure to activate the virtual environment before to run other command to install the required packages.
After you have created correctly created the virtual environment be sure to add that in the .gitignore file in order to
not version that. If you want to learn more about virtual environment or other good practices in python you can visit the official website of the python community Click Here
Run these commands in your terminal
git clone https://github.com/Sabyasachi-Seal/Certificate-Generator-MLSA
cd Certificate-Generator-MLSA
Now Copy your Participant List to the Data Folder and rename it as ParticipantList.csv.
The list must have the following fields: Name, Email. It may have more, but these 2 are essential.
pip install -r requirements.txt
python main_certificate.py
Important
Do not use this button to run your code:
Use python main_certificate.py to run your code
Customization
- You can change the certificate template file in the
Datafolder. - You can change the email template file in the
Datafolder.
How to send emails?
- You can use the
Mail.xlsmfile to send emails to the participants. Open this with Excel. PressAllow Content
if required. - Do not need to change anything in the file itself.
- All you need to do is to search for
View Macrosin Excel and then select theSend_Mailsmacro and then
click onRun. - Now open outlook and login.
- Click on outbox and see the mails being sent one by one.
Source Repo(I made some subtle improvements) : Click Here
