aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-05-07 12:36:00 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-05-07 12:56:30 +0300
commit038ba04cc0e5a6b933254813c34108d6e3fd4a38 (patch)
tree544bd4247b81a7ce035051aba26af44a90e195a7 /doc
parenteed5cb683dda33b6861dc1d005f80a884e43218d (diff)
Convert UTF-8 tree characters to ASCII when producing PS from XHTML in doc/cli.sh
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/cli.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/doc/cli.sh b/doc/cli.sh
index e32ee02..2aae16a 100755
--- a/doc/cli.sh
+++ b/doc/cli.sh
@@ -65,6 +65,17 @@ done
# Manual.
#
+function xhtml_to_ps () # <from> <to> [<html2ps-options>]
+{
+ local from="$1"
+ shift
+ local to="$1"
+ shift
+
+ sed -e 's/├/|/g' -e 's/│/|/g' -e 's/─/-/g' -e 's/└/`/g' "$from" | \
+ html2ps "${@}" -o "$to"
+}
+
cli -I .. \
-v version="$(echo "$version" | sed -e 's/^\([^.]*\.[^.]*\).*/\1/')" \
-v date="$date" \
@@ -76,8 +87,8 @@ cli -I .. \
--link-regex '%bpkg(#.+)?%../../bpkg/doc/build2-package-manager-manual.xhtml$1%' \
--output-prefix build2-repository-interface- manual.cli
-html2ps -f doc.html2ps:a4.html2ps -o build2-repository-interface-manual-a4.ps build2-repository-interface-manual.xhtml
+xhtml_to_ps build2-repository-interface-manual.xhtml build2-repository-interface-manual-a4.ps -f doc.html2ps:a4.html2ps
ps2pdf14 -sPAPERSIZE=a4 -dOptimize=true -dEmbedAllFonts=true build2-repository-interface-manual-a4.ps build2-repository-interface-manual-a4.pdf
-html2ps -f doc.html2ps:letter.html2ps -o build2-repository-interface-manual-letter.ps build2-repository-interface-manual.xhtml
+xhtml_to_ps build2-repository-interface-manual.xhtml build2-repository-interface-manual-letter.ps -f doc.html2ps:letter.html2ps
ps2pdf14 -sPAPERSIZE=letter -dOptimize=true -dEmbedAllFonts=true build2-repository-interface-manual-letter.ps build2-repository-interface-manual-letter.pdf