-
Notifications
You must be signed in to change notification settings - Fork 1
/
generate
executable file
·56 lines (47 loc) · 1.36 KB
/
generate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
# ./generate_txt.py
(cd exos-divers && ./generate)
./generate_markdown calculette
DEFAULT_LANG=fr
LANGS='fr en'
if [ "$1" = fast ]; then
FAST=true
elif [ "$1" = total ] || [ "$1" = slow ] || [ "$1" = all ]; then
FAST=false
else
FAST=false
fi
python3 generate_multilang.py --langs $LANGS
if [ "$FAST" = false ]; then
# multilang py files
for n in progra_equivalences theorie1_egal_if; do
for l in $LANGS; do
python3 ./generate_html_from_py.py \
${n}_${l}.py \
--template pytext_template.html \
--out ${n}_${l}.html \
--langs $LANGS \
--lang-url=${n}_{lang}.html \
--lang $l
done
for ext in html py; do
rm -f ${n}.${ext}
cp ${n}_${DEFAULT_LANG}.${ext} ${n}.${ext}
done
done
# non multilang py files
for n in theorie2_liste_while theorie3_fonctions_et_objets; do
python3 ./generate_html_from_py.py \
${n}.py \
--template pytext_template.html \
--out ${n}.html
done
else
echo "FAST generation: skipping generate_html_from_py"
fi
python3 generate_html.py
# ./generate_ln.py
python3 generate_ls.py # keep last
# ./generate_zip
# ./generate_state_svg.py triangle-geometry.svg --layer-name
# ./generate_state_svg.py trigono.svg