@@ -9,20 +9,33 @@ This repository keeps XMLTV TV guides up to date in order to be used with the Li
99
1010## Developers notes
1111
12- The ` update_all_tv_guides.sh ` can be used to automatically update TV guides files (` xxxxx.xml ` files).
13- The script automatically create a commit with the latest TV guides and it will push the modification on this GitHub repository.
14- This script is executed every night with a cron task but you can trigger it manually on your own computer.
15-
16- ## Fonctionnement (only in french ATM)
17-
18- * Si on est le jour J (par exemple le 19/06/2020)
19- * Toutes les nuits, le script bash ` update_all_tv_guides.sh ` est exécuté
20- * Ce que fait le script bash (` update_all_tv_guides.sh ` )
21- * Pull du dépôt GitHub
22- * Suppression des fichiers XMLTV de la racine
23- * Pour chaque pays, récupération du programme TV de la journée J+2 (par exemple le 21/06/2020) qu'on place dans le dossier ` raw `
24- * Appel du petit script Python (` post_treatment.py ` )
25- * Suppression, dans le dossier ` raw ` , des programmes TV trop anciens
26- * Fusion, pour chaque pays, des programmes TV de chaque jour présents dans le dossier ` raw `
27- * Post traitement des programmes TV (découpage par jour, avec heure locale ou UTC, ...)
28- * Push sur le dépôt GitHub des modifications
12+ Contrary to what the name suggests, the ` master ` branch is not the default
13+ branch in this repo. It contains no code, just EPG data files. The default
14+ branch is ` dev ` , which contains all code and no data. All PR's should target
15+ the ` dev ` branch.
16+
17+ The ` update_all_tv_guides.py ` script can be used to automatically update TV
18+ guides files (` xxxxx.xml ` files). This script is executed every night from a
19+ GitHub workflow that is triggered by a cron task, but you can run it manually
20+ on your own computer. The workflow automatically create a commit with the
21+ latest TV guides and it will push the modifications to the master branch on
22+ this GitHub repository.
23+
24+ ## How it works
25+
26+ * Every night at 22:00 the workflow runs.
27+ * Pull the ` dev ` branch from the GitHub repo.
28+ * Pull the ` master ` branch from the GitHub repo and copy the folder with raw
29+ files.
30+ * Python script ` update_all_tv_guides.py ` is executed
31+ * What the script does (` update_all_tv_guides.py ` ):
32+ * Delete XMLTV files from the root directory
33+ * Deletes outdated files from the ` raw ` folder
34+ * For each country, always retrieve the file with TV programmes for tomorrow
35+ and place it in the ` raw ` folder.
36+ * Determine how many days of EPG should be available for each country and
37+ retrieve the programmes for each day for which no raw file is yet available.
38+ * Calls the small Python script (` post_treatment.py ` )
39+ * Merges the TV programmes for each day in the ` raw ` folder for each country
40+ * Post-processes the TV programmes (divides them by day, with local time or UTC, etc.)
41+ * Pushes xmltv files and raw files to the master branch of the GitHub repository
0 commit comments