This commit is contained in:
Marc Beninca 2020-05-01 22:01:50 +02:00
parent 28d5d34adf
commit 36d1488ea3
2 changed files with 9 additions and 7 deletions

View file

@ -5,8 +5,8 @@ import shutil
import subprocess import subprocess
DOCUMENTS = [ DOCUMENTS = [
'document', ('document', 'mémoire'),
'présentation', ('presentation', 'présentation'),
] ]
TMP = 'tmp' TMP = 'tmp'
@ -21,24 +21,26 @@ def errun(command):
def build(): def build():
for document in DOCUMENTS: for en, fr in DOCUMENTS:
command = ['xelatex', command = ['xelatex',
'-output-directory', TMP, '-output-directory', TMP,
document, en,
] ]
run(command) run(command)
run(['makeglossaries', run(['makeglossaries',
'-d', TMP, '-d', TMP,
document, en,
]) ])
run(['biber', run(['biber',
'--input-directory', TMP, '--input-directory', TMP,
'--output-directory', TMP, '--output-directory', TMP,
document, en,
]) ])
run(command) run(command)
run(command) run(command)
pdf = f'{document}.pdf' os.rename(os.path.join(TMP, f'{en}.pdf'),
os.path.join(TMP, f'{fr}.pdf'))
pdf = f'{fr}.pdf'
run(['gpg', run(['gpg',
'--armor', '--armor',
'--detach-sign', '--detach-sign',