Skip to content

A pandas and jinja2 implementation to take CSV data input and create html emails.

Notifications You must be signed in to change notification settings

kcaashish/html-email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

html-email

Project

.
├── data                  # keep the csv files here
├── references            # reference html and css (not required for this proejct CAN REMOVE)
├── site                  # generated / rendered html will be placed here 
├── templates             # the used html template is placed here
├── data.json             # will get generated while running email-maker.py
├── email-maker.py        # main file, only need to change the address / name of csv and run
├── requirements.txt
└── README.md

Setup virtual environment ".venv"

  • For Linux:
    $ python -m venv .venv
    $ source .venv/bin/activate
  • For Windows: Go to the folder, then open Git Bash, then:
    $ python -m venv .venv
    $ source .venv\Scripts\activate.bat

Installing requirements in .venv

$ pip install -r requirements.txt

How to run

After activating .venv and installing from the requirements, add the path to new csv file in email-maker.py and run.

if __name__ == "__main__":
    # add the path to the CSV file as argument
    email_maker('data/09172021_complete_data.csv')  #<--place new file in data/, change name and run

About

A pandas and jinja2 implementation to take CSV data input and create html emails.

Topics

Resources

Stars

Watchers

Forks

Languages