Skip to content

Sabyasachi-Seal/Certificate-Generator-MLSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  1. 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. image
  2. Click on Generate Certificates, it might take some time (it might feel like its stuck at 100%) but it will generate all the certificates. image image
  3. 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. image

Example of what the participants receive on their mail: image

And the certificates are attached as such: image



Instructions Below are for you to run this project locally. Use master branch for the same

Tutorial Video for running locally:

IMAGE ALT TEXT

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 the PATH and PATHEXT variables for your Python installation, use this command :
      c:\>Python35\python -m venv c:\path\to\myenv
      
      else
      c:\>python -m venv c:\path\to\myenv
      
    • Replace the c:\path\to\myenv by the correct path of your virtual environment.
    • It's recommended to place the virtual environment at the parent directory of your project.
  • 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
      • If is Windows system :
        • cmd.exe : C:\> <venv>\Scripts\activate.bat
        • PowerShell : PS C:\> <venv>\Scripts\Activate.ps1
    • The <venv> correspond to the entire path of virtual environment if you are in the root directory project instead you can the relative path

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:

Screenshot from 2023-08-26 10-36-02

Use python main_certificate.py to run your code

Customization

  • You can change the certificate template file in the Data folder.
  • You can change the email template file in the Data folder.

How to send emails?

  • You can use the Mail.xlsm file to send emails to the participants. Open this with Excel. Press Allow Content if required.
  • Do not need to change anything in the file itself.
  • All you need to do is to search for View Macros in Excel and then select the Send_Mails macro and then click on Run.
  • 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