build/glossaries

This commit is contained in:
Marc Beninca 2020-04-26 23:36:40 +02:00
parent 5bff3dfd1d
commit 4fbf4356c7

View file

@ -7,6 +7,15 @@ DOCUMENTS = [
'document', 'document',
'présentation', 'présentation',
] ]
PURGE = [
'.acn',
'.aux',
'.glo',
'.glsdefs',
'.ist',
'.log',
'.toc',
]
def build(directory): def build(directory):
@ -22,7 +31,7 @@ def clean(directory):
_, _, files = next(os.walk(directory)) _, _, files = next(os.walk(directory))
for file in files: for file in files:
name, ext = os.path.splitext(file) name, ext = os.path.splitext(file)
if ext in ['.aux', '.log', '.toc']: if ext in PURGE:
os.remove(file) os.remove(file)