add config entry for latex aux file extension
This commit is contained in:
parent
c46cb220ae
commit
3407f03091
2 changed files with 7 additions and 2 deletions
|
@ -25,3 +25,4 @@ DEFAULT_IMPORT_INDENTATION = 4
|
||||||
FALLBACK_COURSE_INFO_FILE = Path('fallback.yaml').resolve()
|
FALLBACK_COURSE_INFO_FILE = Path('fallback.yaml').resolve()
|
||||||
TIMEZONE = pytz.timezone('CET')
|
TIMEZONE = pytz.timezone('CET')
|
||||||
SCHEDULER_DELAY = 60
|
SCHEDULER_DELAY = 60
|
||||||
|
DEFAULT_LATEX_COUNTER_AUX_FILE_EXTENSION = '.cnt'
|
|
@ -3,7 +3,8 @@ import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
from config import LECTURE_START_MARKER, LECTURE_END_MARKER, DEFAULT_IMPORT_INDENTATION
|
from config import LECTURE_START_MARKER, LECTURE_END_MARKER, DEFAULT_IMPORT_INDENTATION, \
|
||||||
|
DEFAULT_LATEX_COUNTER_AUX_FILE_EXTENSION
|
||||||
from edit import edit
|
from edit import edit
|
||||||
from lectures import Lectures, number2filename
|
from lectures import Lectures, number2filename
|
||||||
from parse_counters import parse_counters, dict2setcounters
|
from parse_counters import parse_counters, dict2setcounters
|
||||||
|
@ -59,7 +60,10 @@ class Notes:
|
||||||
if not setcounters:
|
if not setcounters:
|
||||||
return ''
|
return ''
|
||||||
if lec - 1 not in lecture_list and self.full_file:
|
if lec - 1 not in lecture_list and self.full_file:
|
||||||
return dict2setcounters(parse_counters(self.full_file.with_suffix('.counters'), {'lecture': lec}))
|
return dict2setcounters(parse_counters(
|
||||||
|
self.full_file.with_suffix(DEFAULT_LATEX_COUNTER_AUX_FILE_EXTENSION),
|
||||||
|
{'lecture': lec}
|
||||||
|
))
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def update_lectures_in_file(self, filename, lecture_list, setcounters=False):
|
def update_lectures_in_file(self, filename, lecture_list, setcounters=False):
|
||||||
|
|
Loading…
Reference in a new issue