-
pruizf authored00067d87
publish.sh 1.53 KiB
#!/bin/bash
# convert to html ==============================================================
asciidoctor site/*adoc
# manual modifications to html created by asciidoctor ==========================
# english home -------------------------
# add home link to top entry in ToC
sed -i -e 's/"toctitle">Navigation<\/div>/"toctitle"><a href="https:\/\/methal.pages.unistra.fr\/en.html">Navigation<\/a><\/div>/' site/en.html
# make it clear where corpus is
sed -i -e 's/"#_outputs">Outputs<\/a>/"#_outputs">Corpus \& Outputs<\/a>/' site/en.html
# french home --------------------------
sed -i -e 's/<title>Objectifs<\/title>/<title>MeThAL<\/title>/' site/index.html
# add home link to top entry in ToC
for pname in index en ; do
sed -i -e 's/"toctitle">Navigation<\/div>/"toctitle"><a href="https:\/\/methal.pages.unistra.fr">Navigation<\/a><\/div>/' site/${pname}.html
sed -i -e 's/"toctitle">Navigation<\/div>/"toctitle"><a href="https:\/\/methal.pages.unistra.fr">Navigation<\/a><\/div>/' site/${pname}.html
sed -i -e 's/"toctitle">Navigation<\/div>/"toctitle"><a href="https:\/\/methal.pages.unistra.fr">Navigation<\/a><\/div>/' site/read/${pname}.html
sed -i -e 's/"toctitle">Navigation<\/div>/"toctitle"><a href="https:\/\/methal.pages.unistra.fr">Navigation<\/a><\/div>/' site/read/${pname}.html
done
# read-section
plays_done=$(ls read/tei/*xml | wc -l)
sed -i -e "s/##nbrPieces/${plays_done}/g"
# copy to public repo ==========================================================
cp -r site/*html public
cp -r site/{img,styles,docs,read} public/.