Tool for making a structured weekly bulletin for the Guild of Physics. Forked from summila. Information about events are fed to the GUI (information includes header, date, category of event and date) and they are saved to a database. Formatted HTML-file is created from database entries that can be used in emails and websites.
First, clone the repository.
Use Git Bash on Windows. Any other shell on any other OS should be fine.
FK-tiedotin is written in Python 3 and uses following libraries: PyQt5, TinyDB, Jinja2. These can be installed with
pip install -r requirements.txt
Open GUI to add entries to database:
python gui.py
Create bulletin from database entries:
python bulletin.py
Entries are saved as JSON in the data-folder and finished emails are saved in the mails-folder. A new database and a new email are created for every week.
To upload the correct weekly .json
to the Fyysikkokilta website for the corresponding Telegram bot to work, set up permissions to ssh
to fk@otax.fi
and simply run
upload-to-otax.sh
Windows users NB: In order to support special characters, start the programs with the argument python -X utf8
or set the environment variable set PYTHONUTF8=1
.
bulletin.py
contains editable text variables for title and footer- HTML used in the email must be written in a style that it looks similar in (almost) all email clients.
- Add HTML bulletins to Guild website and maybe info about it with Kiltisbot
- Most URLs are followed by newline which is stored as \n and
urlize
treats it as part of the URL - (maybe) Add support for Opintovastaavan palsta