37 lines
1.1 KiB
Bash
Executable File
37 lines
1.1 KiB
Bash
Executable File
mkdir -p archive
|
|
|
|
echo -n "const programmes = " > programmes.js
|
|
curl "https://stag.tul.cz/StagPortletsJSR168/ProhlizeniPrint?stateClass=cz.zcu.stag.portlets168.prohlizeni.browser.BrowserFakultaSearchState&wservice=programy/getStudijniProgramy&outputFormat=CSV&pouzePlatne=true&lang=cs" | csvjson -e cp1250 | jq 'group_by(.fakulta | ascii_downcase) | [.[] | {
|
|
key: .[0].fakulta | ascii_downcase | if . == "fe" then "ef" else . end | if . == "fa" then "fua" else . end,
|
|
value: [.[] | {
|
|
code: .kod | ascii_upcase,
|
|
type: .typ | ascii_downcase // .titulZkr // .titul,
|
|
title: .titulZkr // .titul // "bez titulu",
|
|
form: .forma | ascii_downcase,
|
|
year: .platnyOd | round,
|
|
cs_name: .nazevCz // .nazev,
|
|
en_name: .nazevAn // .nazev
|
|
}]
|
|
}] | from_entries' >> programmes.js
|
|
|
|
if [ ! -d template_upstream ]; then
|
|
git clone git@gordon.zumepro.cz:tul/tultemplate2 template_upstream
|
|
else
|
|
cd template_upstream
|
|
git pull
|
|
cd ..
|
|
fi
|
|
|
|
cp -r \
|
|
template_upstream/template \
|
|
template_upstream/citations.bib \
|
|
template_upstream/Makefile \
|
|
assignment.pdf \
|
|
archive
|
|
|
|
rm template.zip
|
|
cd archive
|
|
zip -r ../template.zip *
|
|
cd ..
|
|
|