diff options
author | Tommy Reynolds <Tommy.Reynolds@MegaCoder.com> | 2005-11-29 21:42:28 +0000 |
---|---|---|
committer | Tommy Reynolds <Tommy.Reynolds@MegaCoder.com> | 2005-11-29 21:42:28 +0000 |
commit | c87733e07cb2ef70ecd92142f71054c343f570de (patch) | |
tree | 5d8e6795ccf472d3e48f4de35da399554b950676 /bin/use-prod-css | |
parent | 1d4fe9e09514d9c1bf631718452a270d425b8cb5 (diff) | |
download | fedora-doc-utils-c87733e07cb2ef70ecd92142f71054c343f570de.tar.gz fedora-doc-utils-c87733e07cb2ef70ecd92142f71054c343f570de.tar.xz fedora-doc-utils-c87733e07cb2ef70ecd92142f71054c343f570de.zip |
Change default to the HTML "fedora-draft.css" stylesheet to reinforce
that the rendering here is not meant to be the final production rendering.
Provided the "bin/use-prod-css" to locally change HTML files to minic
production-quality rendering. NOTE: draft watermarking does NOT PRINT
unless the browser preferences enable background image printing.
Diffstat (limited to 'bin/use-prod-css')
-rwxr-xr-x | bin/use-prod-css | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/bin/use-prod-css b/bin/use-prod-css new file mode 100755 index 0000000..5fa2a9e --- /dev/null +++ b/bin/use-prod-css @@ -0,0 +1,33 @@ +#!/bin/bash +######################################################################## +# Tommy.Reynolds <Tommy.Reynolds@MegaCoder.com> +# International copyright secured (C) 2005, All rights reserved. +# This software is licensed under the GPL. +######################################################################## +# Do surgery on the *.html files to reference the production CSS stylesheet +# +# Use like this: +# +# use-prod-css /path/to/docdir +# +######################################################################## +USAGE="usage: $(basename $0) /path/to/docdir" +SILENT=yes +while getopts v c +do + case "${c}" in + v ) SILENT="";; + * ) echo "${USAGE}" >&2; exit 1;; + esac +done +shift $(expr ${OPTIND} - 1) +if [ $# -gt 1 ]; then + echo "${USAGE}" >&2 + exit 1 +fi +find ${1:-.} -iname '*.html' -print | +while read f; do + [ "${SILENT}" ] || echo ${f} + sed 's/href="fedora-draft.css"/href="fedora.css"/' ${f} >${f}.tmp + mv ${f}.tmp ${f} +done |