forked from mist64/c64ref
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidate_html.sh
More file actions
executable file
·41 lines (26 loc) · 905 Bytes
/
validate_html.sh
File metadata and controls
executable file
·41 lines (26 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# #!/bin/sh
# Using https://validator.github.io/validator/
DIRECTORY_PATH="out"
REGEXP=".*(" # open regex
# TODO: XXX fix
# > duplicate ID
REGEXP="${REGEXP}Duplicate.ID|The.first.occurrence.of.ID"
# > unescaped <Akku> <STOP> from kernal txts
REGEXP="${REGEXP}|not.allowed.as.child.of.element|Unclosed.element|but.there.were.open.elements|Bad.character|violates.nesting.rules"
# > unescaped <> from c64mem
REGEXP="${REGEXP}|Probable.causes..Unescaped"
REGEXP="${REGEXP}).*" # close regex
#REGEXP="" # no filter, all errors/warnings
# show info/warnings and errors
PARAMS='--format gnu --asciiquotes '$DIRECTORY_PATH
# only show errors
#PARAMS='--errors-only '$PARAMS
HTML_PARAMS='--filterpattern '$REGEXP' '$PARAMS
echo $HTML_PARAMS
#echo "HTML:"
vnu --skip-non-html $HTML_PARAMS
# echo -e "\n\n\n CSS:"
# vnu --skip-non-css $PARAMS
#
# echo -e "\n\n\n SVG:"
# vnu --skip-non-svg $PARAMS