Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.
/ fk-tiedotin Public archive
forked from summis/fk-tiedotin

Simple tool to make a weekly bulletin for Guild of Physics

Notifications You must be signed in to change notification settings

nikosavola/fk-tiedotin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FK-tiedotin 2020

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.

Installation

First, clone the repository.

Use Git Bash on Windows. Any other shell on any other OS should be fine.

Dependencies

FK-tiedotin is written in Python 3 and uses following libraries: PyQt5, TinyDB, Jinja2. These can be installed with

pip install -r requirements.txt

Usage

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.

Uploading .json for Fyysikkokilta website

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.

Screenshots

GUIBulletin

Remarks

  • 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.

To improve

  • 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

About

Simple tool to make a weekly bulletin for Guild of Physics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 66.8%
  • Python 32.1%
  • Shell 1.1%