-
Go to "Turn Windows features on or off" in the control panel
-
Enable "Windows Subsystem for Linux" checkbox. You may have to restart your computer for changes to take effect
-
Install Ubuntu (It's on Microsoft Store).
-
Choose a location and create a folder to store the content for Plane Mail. You can use cd ~ to create the folder in a separate file system from your local drive.
-
Install python 3 and pip if you have not already done so. You can run "sudo apt update" and "sudo apt install python3-pip"
-
Create a virtual environment by running: "python3 -m venv {name}"
-
Activate environment by running: "source {name}/bin/activate"
-
Git clone the repository in the environment you have created (git clone https://github.com/ScottyLabs/plane.git). Move into the new branch you are editing on.
-
Install requirement files by running: "python3 -m pip install -r requirements.txt"
-
cd into the "plane" folder. You should see a secret_template.py file in there - rename it to "secrets.py", and insert your Mailgun API key in api_key.
-
Run plane.py for testing (You can do this in the plane directory with all the .py files by doing "python3 plane.py" in Command Prompt).
-
You've finished the setup! Whenever you want to access your environment do step 4, then you can cd into your plane folder and run the python files from there.
-
Create a new folder to store the contents of the Plane Mail Management repository.
-
In Terminal, cd into the folder you have just created
-
Create a virtual environment by running: "python3 -m venv {name}"
-
Activate environment by running: "source {name}/bin/activate"
-
Git clone the repository in the environment you have created (git clone https://github.com/ScottyLabs/plane.git). Move into the new branch you are editing on
-
Install requirement files by running: "python3 -m pip install -r requirements.txt"
-
cd into the "plane" folder. You should see a secret_template.py file in there - rename it to "secrets.py", and insert your Mailgun API key in api_key.
-
Run plane.py for testing (You can do this in the plane directory with all the .py files by doing "python3 plane.py" in your Terminal).
-
You've finished the setup! Whenever you want to access your environment do step 4, then you can cd into your plane folder and run the python files from there.
- In your terminal (Unix/macOS) or command prompt (Windows), cd into the plane folder
- Run "source env/bin/activate" (Unix/macOs) or ".\env\Scripts\activate" (Windows). This will activate the virtual environment
- Now, run "python3 plane.py" to begin the program.
- Use the arrow keys to move up and down between the available options at each prompt.
- Once you select which type of email you want to send, you will see the HTML template for the email in vim. To edit it directly, press "i".
- Once you are done editing the file, press "esc" and type ":wq". This will save your changes and open up a preview of the email in your browser.
- Go back to your terminal (Unix/macOS) or command prompt (Windows). To continue editing the file, type "n". To send out the email, enter "y". NOTE: entering "y" will automatically send out the email.
- To exit the program at any time, simply press "control + c" NOTE: be sure to exit out of editing before pressing "control + c"
- Be sure to deactivate the virtual environment at the end of your session by running "deactivate".
- In schema.py, create a new schema in following the form below:
schema_name = PlaneSchema(
'id', # this is what shows up in the options menu
'template',
'subject', # None if you want to manually input this every time
f(Day.DELIVERY_DAY), # either Day.DAYOFWEEK or Day.TODAY
{ # set containing the names and meetings of your message
'new1': m_new1,
'new2': m_new2,
},
)
-
Add your schema to the list of schemas at the bottom of the schema.py file
-
In meetings.py, create a new Meeting instance of the form:
m_new = Meeting(
'name',
get_next_datetime_formatted(Day.DAY), #either Day.DAYOFWEEK or Day.TODAY
'time',
'Zoom link',
)
-
Import your new Meeting instance at the top of the schema.py file
-
Create a new folder for your new email template name under HTML with the following files:
- body.html # HTML formatting for the email
- default.html # message body
- use
{meeting_name}
,{meeting_date}
,{meeting_time}
,{meeting_zoom}
respectively - example:
Come to our {new1_name} meeting on {new1_date} at {new1_time} over <a href="{reminder_zoom}">Zoom</a>!
- use
- note: the content.html and backup.html files will be created/updated every time you run the program
-
Now run plane.py in your terminal (macOS) or your command prompt (Windows) and make sure that your new template is an option!