...
 
Commits (3)
......@@ -4,6 +4,7 @@
### Added
## Changed
- HTML pages generated with charset utf-8
- check for image files before generating directoy structure, so if none are
found, nothing will be written
- do not print version number and dates in html files so that an execution on
......
......@@ -82,7 +82,7 @@ htmlheader()
htmlprint "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\\n" "${2}"
htmlprint "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\\n" "${2}"
htmlprint "<head>\\n" "${2}"
htmlprint "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/>\\n" "${2}"
htmlprint "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\\n" "${2}"
htmlprint "<meta http-equiv=\"Generator\" content=\"easyGG\"/>\\n" "${2}"
htmlprint "<title>${1}</title>\\n" "${2}"
htmlprint "<style type=\"text/css\">\\n" "${2}"
......@@ -279,15 +279,15 @@ do
htmlprint "<div class=\"main\">\\n" "page_${FILENAME}"
# navigation
X="&lt;&mdash; prev&nbsp;"
X="&lt;&mdash; [prev]&nbsp;&nbsp;"
if [ ${i} -gt 0 ];
then
htmlprint "<a href=\"page_${FILENAMES[$((i-1))]}.html\">${X}</a>" "page_${FILENAME}"
else
htmlprint "<span class=\"hide\">${X}</span>" "page_${FILENAME}"
fi
htmlprint "<a href=\"index.html\">&nbsp;(index)&nbsp;</a>" "page_${FILENAME}"
X="&nbsp;next &mdash;&gt;"
htmlprint "<a href=\"index.html\">&nbsp;[index]&nbsp;</a>" "page_${FILENAME}"
X="&nbsp;&nbsp;[next] &mdash;&gt;"
if [ $((i+1)) -lt ${#FILES[@]} ];
then
htmlprint "<a href=\"page_${FILENAMES[$((i+1))]}.html\">${X}</a>\\n" "page_${FILENAME}"
......
......@@ -39,12 +39,8 @@ runtest "dataset1 files" "echo easygg/* | md5sum | grep \"14690a60ed80f7d53176e3
# tests if all *.html files produce no parsing errors
runtest "dataset1 html validation" "xmllint --noout --valid --html easygg/*.html 2>&1" "[ \$RET -eq 0 ] && [ -z \"\$OUTPUT\" ]"
cat << EOF > easygg/md5sums
3e3edcfdd60b2e7e543f830ade61cb95 easygg/index.html
EOF
# tests if same content is produced
runtest "dataset1 content" "md5sum --check easygg/md5sums" "[ \$RET -eq 0 ]"
# tests if all page links are generated
runtest "dataset1 content" "grep -e '<a href=\"page_.*\\.jpg.html\"><img src=\"thumb_.*\\.jpg\"' easygg/index.html | wc -l" "[ \$RET -eq 0 ] && [ \"\$OUTPUT\" = \"16\" ]"
rm -rf easygg
......