From 3116927ee702fd6b0390ec131b8ae9e3b4705722 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 13 Apr 2021 09:37:40 +0200 Subject: [PATCH] fix: si rep SAE definitives vide --- python/export_yaml_to_latex.py | 4 ++-- yaml/saes/README.md | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 yaml/saes/README.md diff --git a/python/export_yaml_to_latex.py b/python/export_yaml_to_latex.py index 7e876ce..29674ea 100644 --- a/python/export_yaml_to_latex.py +++ b/python/export_yaml_to_latex.py @@ -56,8 +56,8 @@ for sem in ressources: ressources[sem] = sorted(ressources[sem], key=lambda r: r.ressource["code"]) # Chargement des saé et des exemples -fichiers_definitifs = os.listdir(REPERTOIRE_SAE_DEFINITIVES) -fichiers_temp = os.listdir(REPERTOIRE_TEMP) +fichiers_definitifs = [ os.path.split(x)[1] for x in glob.glob(REPERTOIRE_SAE_DEFINITIVES+'/*.yml') ] +fichiers_temp = [ os.path.split(x)[1] for x in glob.glob(REPERTOIRE_TEMP+'/*.yml') ] fichiers_saes = [REPERTOIRE_SAE_DEFINITIVES + "/" + f for f in fichiers_definitifs if "exemple" not in f] fichiers_exemples = [REPERTOIRE_SAE_DEFINITIVES + "/" + f for f in fichiers_definitifs if "exemple" in f] for f in fichiers_temp: diff --git a/yaml/saes/README.md b/yaml/saes/README.md new file mode 100644 index 0000000..17fa6bc --- /dev/null +++ b/yaml/saes/README.md @@ -0,0 +1,2 @@ +Répertoire pour les fiches SAE éditées à la main, +qui ont priorité sur celle générées dans `python/export/S*yml`