annotate update-xml-to-html.sh @ 374:10d030b85117 misc tip

Switch Convent map to SVG version, add link to PNG render to the caption.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 01 Mar 2024 10:02:38 +0200
parents c3ab8a10dacb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
81f1abadda3e Renamed.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 #!/bin/sh
81f1abadda3e Renamed.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 XML="$1"
81f1abadda3e Renamed.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 HTML=`echo "$XML"|sed "s/\.xml$/.html/"`
3
a1c3b6c2be8c Added informative message.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
4 echo "Converting $XML to $HTML ..."
364
32a5a3a88f0a Do not hardcode http:// to the URL.
Matti Hamalainen <ccr@tnsp.org>
parents: 300
diff changeset
5 xsltproc --stringparam html.stylesheet "/~ccr/ggrtf/html/manual.css" \
59
1dc2f74c4b66 Fix generation and upload process to be more error resilient.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
6 --output "$HTML" \
1dc2f74c4b66 Fix generation and upload process to be more error resilient.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
7 /usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl "$XML" && \
300
ecad4df615cd Widen the HTML conversion.
Matti Hamalainen <ccr@tnsp.org>
parents: 65
diff changeset
8 tidy -w 200 -utf8 -asxhtml -i -m "$HTML"
59
1dc2f74c4b66 Fix generation and upload process to be more error resilient.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
9
1dc2f74c4b66 Fix generation and upload process to be more error resilient.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
10 if test -e "$HTML"; then
372
c3ab8a10dacb Don't upload XML source.
Matti Hamalainen <ccr@tnsp.org>
parents: 364
diff changeset
11 scp "$HTML" ccr@tnsp.org:public_html/bat/
59
1dc2f74c4b66 Fix generation and upload process to be more error resilient.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
12 fi
1dc2f74c4b66 Fix generation and upload process to be more error resilient.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
13