Templated version of newsletter HTML by Gahee Kim and SFU Women in Computing Science (WiCS).
Run only once.
$ python3 -m venv venv && source venv/bin/activate && python3 -m pip install -U -r requirements.txt
- Edit
newsletter.json
$ source venv/bin/activate && python3 newsletter.py && deactivate
- Use
build/build.html
{
"header": {
"title": "SSSS October Newsletter",
"description": "Newsletter description https://www.sfussss.org/"
},
"articles": [
{
"header": "Item 1",
"sections": [
{
"subheader": "January 1st, 12:00 PM @ SRYE 5050",
"text": ["Text goes here. Visit https://www.sfussss.org/ for more.", "Next Paragraph"]
}
]
}
],
"signature": {
"name": "Gahee Kim",
"position": "Secretary",
"endingNote": "And that's all from me! Peace!"
}
}
header.description
andarticles[i].sections[j].text
- Links supported (URL)
- Bold text supported
<b>...</b>
Implementation is intentionally outdated because SFU Mail tends to break new features. Don't turn the tables into flexboxes, nor use advanced CSS selectors. Images are referred by CDN because the email use-case necessitates support on a file-systemless reader; Images aren't embeddable inside HTML (investigate Base64 embedding) so they must be referred externally.