From 2aa8cd2142cfbfc83ad3adb6089f86e17a58ce24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 1 May 2022 22:49:48 +0200 Subject: [PATCH] add build folder for notes into config file --- scripts/fallback.yaml | 1 + scripts/notes.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/fallback.yaml b/scripts/fallback.yaml index 483957a..e2698a0 100644 --- a/scripts/fallback.yaml +++ b/scripts/fallback.yaml @@ -17,6 +17,7 @@ literature: notes: path: '.' texinputs: '.' + build_dir: '.' master_file: 'master.tex' full_file: 'full.tex' lectures: diff --git a/scripts/notes.py b/scripts/notes.py index 143e906..abc02a1 100644 --- a/scripts/notes.py +++ b/scripts/notes.py @@ -21,6 +21,7 @@ class Notes: self.full_file: Path = self.root / self.info['full_file'] self.texinputs: Path = self.root / self.info['texinputs'] self._lectures = None + self.build_dir: Path = self.root / self.info['build_dir'] @staticmethod def get_header_footer(filepath): @@ -101,7 +102,7 @@ class Notes: def open_full(self): result = subprocess.run( - ['zathura', str(self.full_file.with_suffix('.pdf'))], + ['zathura', str(self.build_dir / self.full_file.with_suffix('.pdf').name)], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL )