- We have python scripts (in
assets/DBmanage/
) that interacts with data on Google Drive:getDriveTree.py
It uses an API key and pulls info about Drive files. It generates theautoGenerated/notesTree.yml
(at the_data/
dir)updateDBs.py
It processes thenotesTree.yml
file and extracts info about- lecturers surnames,
- notes names,
- subject names.
After that script search names that are not in the database yet and writes them inautoGenerated/newLecturers.yml
andautoGenerated/newSubjects.yml
. Notes with strange names go intoautoGenerated/badNamedNotesAndSubjects.log
.
addNewNames.py
This script allows easily add new names in databases (by hand). Just run make addNames (fromassets/DBmanage/
dir) and follow instructions.
- Every day the GitHub actions run our scripts to update databases (except
addNewNames.py
).
Scripts while run produces descriptive comments about new names, bad naming and etc, so don't be shy to see the actions log.
lecturers.yml
,subjects.yml
: aliases strings for lectureres family names and subject names.
The content looks like this:The- "|$ООП|object oriented programming|oop|объектно-ориентированное программирование|" - "|$Алгебра и геометрия|algebra and geometry|алгем|"
$
char at the beggining means that this name will be choosed when displaying at webpage.autoGenerated/
: files generated bygetDriveTree.py
andupdateDBs.py
scripts.notesTree.yml
: tree of pdfs and folders from Google Drive.badNamedNotesAndSubjects.log
: strange names (automatic check).newLecturers.yml
,newSubjects.yml
: names that wasn't found inlecturers.yml
orsubjects.yml
, but exists on Google DrivenotesList.yml
,subjectsList.yml
: files for js script at home page. It uses only their info for generating html.
-
Install or update your
Docker
. -
Start docker container with:
$ docker-compose up # will take some time to download dependencies at first time, but then will run quickly.
After it is done please check the
localhost:4000
. Changed made in your folder will automatically (within few seconds) appear at the local webpage. -
After you push changesin files (like
markdown
andhtml
) GitHub Pages may need up to hour to fully deploy it. -
For adding
LaTeX
equations in yourmarkdown
andhtml
you can check upmath.me.
Install python dependencies with:
$ pip install -r requirements.txt
For testing the interaction with Google Drive you need to create your API key (it is not necessary to generate one to work with other sections, because Google Drive data automatically updates every day by GitHub Actions). After that run:
$ echo 'YOUR_API_KEY' > assets/DBmanage/apiKey.txt
After you edit files you can wait when actions updates autoGenerated
files or update them manually with:
$ cd assets/DBmanage/
$ make # will pull info from Google Drive as well
or
$ make update # will just update based on current info from drive
To make an update of names (when new notes with new names were added on the Google Drive) you can run:
$ make add # will run an CLI, that allows to easily add new names