From c2fc097124a4a979a1397fd6784d929e2cab4e42 Mon Sep 17 00:00:00 2001 From: Joscha Date: Fri, 14 Dec 2018 09:28:29 +0000 Subject: [PATCH] Adapt to different LA1 folder structure --- example_config.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/example_config.py b/example_config.py index 07d5a05..7638a1b 100644 --- a/example_config.py +++ b/example_config.py @@ -113,12 +113,19 @@ def la1_transform(path): return new_path # Übungs-Gedöns in Übung/* - if path.match("Informatikervorlesung/Übung_*"): - return pathlib.PurePath("Übung", *path.parts[1:]) + new_path = PFERD.move(path, ("Informatikervorlesung", "Übungsfolien"), ("Übung",)) + if new_path is not None: + return new_path # Vorlesungsfolien-Gedöns in Folien/* - new_path = PFERD.move(path, ("Informatikervorlesung",), ("Folien",)) - if new_path is not None: return new_path + new_path = PFERD.move(path, ("Informatikervorlesung", "Folien.Notizen"), ("Folien",)) + if new_path is not None: + return new_path + + # Rest in Hauptverzeichnis + new_path = PFERD.move(path, ("Informatikervorlesung",), ()) + if new_path is not None: + return new_path return path