add build folder for notes into config file

This commit is contained in:
Maximilian Keßler 2022-05-01 22:49:48 +02:00
parent 6cba512c01
commit 2aa8cd2142
2 changed files with 3 additions and 1 deletions

View file

@ -17,6 +17,7 @@ literature:
notes: notes:
path: '.' path: '.'
texinputs: '.' texinputs: '.'
build_dir: '.'
master_file: 'master.tex' master_file: 'master.tex'
full_file: 'full.tex' full_file: 'full.tex'
lectures: lectures:

View file

@ -21,6 +21,7 @@ class Notes:
self.full_file: Path = self.root / self.info['full_file'] self.full_file: Path = self.root / self.info['full_file']
self.texinputs: Path = self.root / self.info['texinputs'] self.texinputs: Path = self.root / self.info['texinputs']
self._lectures = None self._lectures = None
self.build_dir: Path = self.root / self.info['build_dir']
@staticmethod @staticmethod
def get_header_footer(filepath): def get_header_footer(filepath):
@ -101,7 +102,7 @@ class Notes:
def open_full(self): def open_full(self):
result = subprocess.run( 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, stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL stderr=subprocess.DEVNULL
) )