2018-05-31 21:31:56 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
maybeOK=0;
|
|
|
|
|
2021-02-07 19:28:13 +00:00
|
|
|
wget "https://jigsaw.w3.org/css-validator/validator?uri=https://www.eleicoes.mai.gov.pt/autarquicas2017/%2F&profile=css3&usermedium=all&warning=1&vextwarning=&lang=en" -o /dev/null -O - |grep \#errors|cut -d\> -f3|cut -d\< -f1 > aut
|
|
|
|
# TODO: check https://www.autarquicas2017.mai.gov.pt https certificate
|
2021-10-07 17:05:53 +00:00
|
|
|
# TODO: check if https://www.autarquicas2017.mai.gov.pt is pointing to https://www.eleicoes.mai.gov.pt/autarquicas2017/ again
|
|
|
|
# TODO: check if https://www.eleicoes.mai.gov.pt/autarquicas2017 and https://www.eleicoes.mai.gov.pt/autarquicas2017/ both work again
|
2020-06-22 23:22:49 +00:00
|
|
|
if [ ! "$(diff aut scripts/25/aut|wc -l)" -eq "0" ]; then
|
|
|
|
echo "css autarquicas: incumprimento pode já não existir";
|
2018-05-31 21:31:56 +00:00
|
|
|
maybeOK=1;
|
|
|
|
fi
|
2020-06-22 23:22:49 +00:00
|
|
|
rm aut
|
2018-05-31 21:31:56 +00:00
|
|
|
|
2020-06-22 23:22:49 +00:00
|
|
|
# TODO: check http://accessmonitor.acessibilidade.gov.pt/amp/results/eleicoes.mai.gov.pt%2Feuropeias2019%2Festrangeiro.html
|
2018-05-31 21:31:56 +00:00
|
|
|
|
|
|
|
if [ "$maybeOK" -eq "0" ]; then
|
2019-08-09 11:19:47 +00:00
|
|
|
echo "eleicoes: Incumprimento mantém-se, a actualizar o README (faça um git diff, valide, e commit!)";
|
2018-05-31 21:31:56 +00:00
|
|
|
while IFS='' read -r line || [[ -n "$line" ]]; do
|
2019-08-09 11:19:47 +00:00
|
|
|
test $(echo "$line"|grep -v eleicoes|wc -l) -eq "1" \
|
2018-05-31 21:31:56 +00:00
|
|
|
&& echo "$line" \
|
|
|
|
|| (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t");
|
|
|
|
done < README.md > new
|
|
|
|
mv new README.md
|
|
|
|
fi
|