diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2022-05-19 23:56:00 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2022-05-19 23:56:00 +0200 |
commit | 689779335977abca0c34635e9ca4451d7e005780 (patch) | |
tree | 3f0003ea4241d0a81343bec478b3ea9481c9bd8d /inf | |
parent | nem3 (diff) | |
download | sola-gimb-3-689779335977abca0c34635e9ca4451d7e005780.tar sola-gimb-3-689779335977abca0c34635e9ca4451d7e005780.tar.gz sola-gimb-3-689779335977abca0c34635e9ca4451d7e005780.tar.bz2 sola-gimb-3-689779335977abca0c34635e9ca4451d7e005780.tar.lz sola-gimb-3-689779335977abca0c34635e9ca4451d7e005780.tar.xz sola-gimb-3-689779335977abca0c34635e9ca4451d7e005780.tar.zst sola-gimb-3-689779335977abca0c34635e9ca4451d7e005780.zip |
Diffstat (limited to 'inf')
-rw-r--r-- | inf/.gitignore | 2 | ||||
-rwxr-xr-x | inf/26.5.sh | 20 |
2 files changed, 22 insertions, 0 deletions
diff --git a/inf/.gitignore b/inf/.gitignore new file mode 100644 index 0000000..e3bd28a --- /dev/null +++ b/inf/.gitignore @@ -0,0 +1,2 @@ +domain_users.grep +*.txt diff --git a/inf/26.5.sh b/inf/26.5.sh new file mode 100755 index 0000000..61682d6 --- /dev/null +++ b/inf/26.5.sh @@ -0,0 +1,20 @@ +#!/bin/bash +url=https://ucilnice.gimb.org +id=29761 +t=`mktemp -p/tmp 26.5.XXXXX` +c="--cookie $t --cookie-jar $t -k --location" +co="$c -i" +r=`curl $url/login/index.php $co` +logintoken=`grep logintoken <<<$r | cut -d\" -f6 | cut -d\" -f1` +sesskey=`curl $url/login/index.php $co --data-raw "logintoken=$logintoken&username=$GIMB_U&password=$GIMB_P" | grep sesskey | cut -d\" -f8 | cut -d\" -f1` +seznam=`echo seznam nazadnje posodobljen: $(date) && curl $url/mod/choice/report.php $c --data-raw "id=$id&download=txt&sesskey=$sesskey"` +se=`grep -v Skupina <<<$seznam | grep -v nazadnje` +sez=`cat <<<$se | grep -v "ni odgovora"` +vsi=`grep Dijaki domain_users.grep | grep 2019 | grep -v 2019Q | grep -v test | cut -f3` +razlika=`comm -13 <(cat <<<$sez | cut -f3 | cut -d@ -f1 | sort) <(cat <<<$vsi | sort)` +cat <<<$razlika > neprijavljeni.txt +cat <<<$sez > prijavljeni.txt +cat <<<$se > vpisani.txt +cat <<<$vsi > vsi.txt +echo "zadnja posodobitev: " `date` > stanje.txt +echo`wc -l {{ne,}prijavljeni,vpisani,vsi}.txt` >> stanje.txt |