Dateinamen angepasst, Code verallgemeinert

This commit is contained in:
KTuff 2024-07-15 10:12:13 +02:00
parent ec9d72a813
commit 53b2cbf59e
2 changed files with 10 additions and 7 deletions

View file

@ -1,12 +1,15 @@
#!/bin/sh #!/bin/sh
mkdir -p out/ mkdir -p out/
languages=("de" "en")
python3 generate.py de daten/stundenplan-bachelor.json out/stupla_bachelor stundenplan-vorlage.tex
python3 generate.py en daten/stundenplan-bachelor.json out/stupla_bachelor stundenplan-vorlage.tex
python3 generate.py de daten/stundenplan-master.json out/stupla_master stundenplan-vorlage.tex
python3 generate.py en daten/stundenplan-master.json out/stupla_master stundenplan-vorlage.tex
mkdir -p pdfs/ mkdir -p pdfs/
mv out/*.pdf pdfs/. for lang in "${languages[@]}"; do
python3 generate.py $lang daten/stundenplan-bachelor.json out/stundenplan-bachelor stundenplan-vorlage.tex
python3 generate.py $lang daten/stundenplan-master.json out/stundenplan-master stundenplan-vorlage.tex
mkdir -p pdfs/$lang
mv out/*.pdf pdfs/$lang/.
rm -R out/*
done
rm -R out/ rm -R out/

View file

@ -106,7 +106,7 @@ def main(argv):
with open('stundenplan-working-copy.tex', 'w') as f: with open('stundenplan-working-copy.tex', 'w') as f:
f.write(template) f.write(template)
os.system('xelatex --jobname={}_{} stundenplan-working-copy.tex'.format(output_path, language)) os.system('xelatex --jobname={} stundenplan-working-copy.tex'.format(output_path))
main(sys.argv) main(sys.argv)