From 8855410087f81296ca4af9b754bb969a9aefbc3c Mon Sep 17 00:00:00 2001 From: Marcos Marado Date: Sat, 23 Jun 2018 01:13:21 +0100 Subject: [PATCH] script snirh melhorado MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit O xhtml não precisa de ter o mesmo número de erros que antes, basta ter algum. --- README.md | 2 +- scripts/26-snirh.sh | 7 +++---- scripts/26/xhtml | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 scripts/26/xhtml diff --git a/README.md b/README.md index c27e24e..9eca947 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Esta tabela mostra casos de incumprimento do regulamento: | http://www.matriznet.dgpc.pt/ | Flash | [conteúdo Flash](http://www.matriznet.dgpc.pt/) | 2018/06/23 || | http://www.matrizpix.dgpc.pt/ | Flash | [conteúdo Flash](http://www.matrizpix.dgpc.pt/) | 2018/06/23 || | https://www.autarquicas2017.mai.gov.pt/ | certificado SSL inválido, CSS inválido | [análise do CSS](https://jigsaw.w3.org/css-validator/validator?uri=https%3A%2F%2Fwww.autarquicas2017.mai.gov.pt%2F&profile=css3&usermedium=all&warning=1&vextwarning=&lang=en) | 2018/06/23 || -| https://snirh.apambiente.pt/ | XHTML inválido, CSS inválido | [análise do XHTML](https://validator.w3.org/check?uri=https%3A%2F%2Fsnirh.apambiente.pt&charset=%28detect+automatically%29&doctype=Inline&group=0), [análise do CSS](https://jigsaw.w3.org/css-validator/validator?uri=https%3A%2F%2Fsnirh.apambiente.pt&profile=css3&usermedium=all&warning=1&vextwarning=&lang=en) | 2018/06/21 || +| https://snirh.apambiente.pt/ | XHTML inválido, CSS inválido | [análise do XHTML](https://validator.w3.org/check?uri=https%3A%2F%2Fsnirh.apambiente.pt&charset=%28detect+automatically%29&doctype=Inline&group=0), [análise do CSS](https://jigsaw.w3.org/css-validator/validator?uri=https%3A%2F%2Fsnirh.apambiente.pt&profile=css3&usermedium=all&warning=1&vextwarning=&lang=en) | 2018/06/23 || | https://www.cnpd.pt | Formulário em XLSX | [link para o formulário](https://www.cnpd.pt/bin/notifica_rgpd/epd_dpo.htm) | 2018/06/21 || Este [template](template.txt) é utilizado pela ANSOL e pela Comunidade LibreOffice Portugal para enviar um pedido de resolução do problema. diff --git a/scripts/26-snirh.sh b/scripts/26-snirh.sh index e7a295a..27414ee 100755 --- a/scripts/26-snirh.sh +++ b/scripts/26-snirh.sh @@ -4,12 +4,11 @@ maybeOK=0; -wget "https://validator.w3.org/check?uri=https%3A%2F%2Fsnirh.apambiente.pt&charset=%28detect+automatically%29&doctype=Inline&group=0" -o /dev/null -O - |hxnormalize -x -l 1000|hxselect .invalid|hxselect h3 -c > xhtml -if [ ! "$(diff xhtml scripts/26/xhtml|wc -l)" -eq "0" ]; then - echo "xhtml snirh: incumprimento pode já não existir"; +xhtmlErrors=$(wget "https://validator.w3.org/check?uri=https%3A%2F%2Fsnirh.apambiente.pt&charset=%28detect+automatically%29&doctype=Inline&group=0" -o /dev/null -O - |hxnormalize -x -l 1000|hxselect .invalid|hxselect h3 -c|cut -d: -f2|cut -d" " -f2) +if [ "$xhtmlErrors" -eq "0" ]; then + echo "xhtml snirh: incumprimento já não existe"; maybeOK=1; fi -rm xhtml wget "https://jigsaw.w3.org/css-validator/validator?uri=https%3A%2F%2Fsnirh.apambiente.pt&profile=css3&usermedium=all&warning=1&vextwarning=&lang=en" -o /dev/null -O - |grep \#errors|cut -d\> -f3|cut -d\< -f1 > css if [ ! "$(diff css scripts/26/css|wc -l)" -eq "0" ]; then diff --git a/scripts/26/xhtml b/scripts/26/xhtml deleted file mode 100644 index 698c9cf..0000000 --- a/scripts/26/xhtml +++ /dev/null @@ -1 +0,0 @@ -Validation Output: 110 Errors \ No newline at end of file