This repository contains the first prototype of a teaching kit - an online, user-updatable, collaborative deposit of teaching material, together with some useful conversion scripts.
The online website is automatically generated from a folder of PowerPoint presentations.
By placing a new set of PowerPoint slides in the files/ppt_presentations
folder and running
python scripts/main.py
, you'll generate a suite of files under _posts/modules
which can then be
rendered using a static website generator, Jekyll, and displayed online.
The files listed under the _posts/modules
directory contain all the text and tables from the PowerPoint
presentations and are organised into files of the same name as the presentations.
Any images are stored under assets/img/<presentation name>
.
To see the prototype in action, visit the website at https://kth-desa.github.io/teaching_kit/
To use this repository the following software are needed:
- Git follow the installation guide at the link provided
- Python follow the installation guide at the link provided
- Jekyll follow the installation guide at the link provided (you will be asked to install Ruby)
Before installing any package in Python it is recommended to create a new environment using Conda:
conda create -n teaching_kit
conda activate teaching_kit
Then, install the following python packages to run the scripts:
conda install pathlib python-pptx
pip install frontmatter
In case of working from Windows it is useful setting up a Linux subsystem.
- Copy your PowerPoint presentations to
files/ppt_presentations
- Transform the presentations in modules.
Run the script
main.py
to convert PowerPoint presentations to markdown files, typepython scripts/main.py
. The modules will be saved in_posts/modules
To create lectures (collections of modules):
- Apply tags to the modules running the script
python scripts/tags.py
- Create lectures combining the modules imported using the scripts
python scripts/create_lecture.py
- You can preview the website locally at http://127.0.0.1:4000/teaching_kit/ typing
jekyll serve
(the first time usebundle exec jekyll serve
)
- Check which files would be uploaded with
git status
- Create new branch
git checkout -b BRANCHNAME
- Add files
git add .
- Commit
git commit -m "COMMIT MESSAGE
- Push
git push upstream BRANCHNAME