From 79d7e17b5ff1be602c89b8ac93343947c7b0b490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 1 May 2022 18:13:10 +0200 Subject: [PATCH] adjust counter file for build directories --- scripts/notes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/notes.py b/scripts/notes.py index 8efb420..6c6c26b 100644 --- a/scripts/notes.py +++ b/scripts/notes.py @@ -63,8 +63,11 @@ class Notes: if not setcounters: return '' if lec - 1 not in lecture_list and self.full_file: + cnt_file = self.full_file.with_suffix(DEFAULT_LATEX_COUNTER_AUX_FILE_EXTENSION) + if not cnt_file.exists(): + cnt_file = self.full_file.parent / 'build' / cnt_file.name return dict2setcounters(parse_counters( - self.full_file.with_suffix(DEFAULT_LATEX_COUNTER_AUX_FILE_EXTENSION), + cnt_file, {'lecture': lec} )) return ''