summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2005-11-29 21:42:28 +0000
committerTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2005-11-29 21:42:28 +0000
commitc87733e07cb2ef70ecd92142f71054c343f570de (patch)
tree5d8e6795ccf472d3e48f4de35da399554b950676
parent1d4fe9e09514d9c1bf631718452a270d425b8cb5 (diff)
downloadfedora-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.
-rw-r--r--Makefile.common12
-rwxr-xr-xbin/use-prod-css33
-rw-r--r--xsl/html-common-relnotes.xsl2
-rw-r--r--xsl/html-common.xsl2
4 files changed, 43 insertions, 6 deletions
diff --git a/Makefile.common b/Makefile.common
index 4b1ad3f..c397bda 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -64,7 +64,8 @@ ${TARGETS}::
# LANG=en.UTF-8 ${XMLTO} html -x $(XSLHTML) -o mydoc-en mydoc-en.xml
# mkdir -p mydoc-en/stylesheet-images
# cp ${FDPDIR}/docs-common/stylesheet-images/*.png mydoc-en/stylesheet-images/
-# cp ${FDPDIR}/docs-common/css/fedora.css mydoc-en/
+# cp ${FDPDIR}/docs-common/css/fedora*.css mydoc-en/
+# cp ${FDPDIR}/docs-common/images/watermark.png mydoc-en/
# mkdir -p mydoc-en/figs
# cp -p figs/*-${LANG}.* mydoc-en/figs
# but we do avoid copying EPS files since they are nonsense to the HTML world.
@@ -76,7 +77,8 @@ ${DOCBASE}-$(1)/index.html:: ${DOCBASE}-$(1).xml $$(XMLEXTRAFILES-$(1))
LANG=$(1).UTF-8 ${XMLTO} html -x $(XSLHTML) -o $(DOCBASE)-$(1) $(DOCBASE)-$(1).xml
mkdir -p $(DOCBASE)-$(1)/stylesheet-images/
cp ${FDPDIR}/docs-common/stylesheet-images/*.png $(DOCBASE)-$(1)/stylesheet-images
- cp ${FDPDIR}/docs-common/css/fedora.css $$(DOCBASE)-$(1)/
+ cp ${FDPDIR}/docs-common/css/fedora*.css $$(DOCBASE)-$(1)/
+ cp ${FDPDIR}/docs-common/images/watermark.png $${DOCBASE}-$(1)/
[ ! -d figs ] || ( \
mkdir -p ${DOCBASE}-$(1)/figs; \
find figs -type f -iname '*.*' -print | \
@@ -97,7 +99,8 @@ ${DOCBASE}-$(1).html:: ${DOCBASE}-$(1).xml $$(XMLEXTRAFILES-$(1))
${XMLTO} html-nochunks -x $(XSLHTMLNOCHUNKS) $(DOCBASE)-$(1).xml
mkdir -p stylesheet-images/
cp ${FDPDIR}/docs-common/stylesheet-images/*.png stylesheet-images/
- cp ${FDPDIR}/docs-common/css/fedora.css .
+ cp ${FDPDIR}/docs-common/css/fedora*.css .
+ cp ${FDPDIR}/docs-common/images/watermark.png .
endef
#
html-nochunks:: $(foreach LANG,${LANGUAGES},$(DOCBASE)-$(LANG).html)
@@ -133,9 +136,10 @@ $(foreach LANG,${LANGUAGES},$(eval $(call PDF_template,${LANG})))
define CLEAN_template
${DOCBASE}-$(1)-clean::
${RM} -r ${DOCBASE}-$(1)
- ${RM} -r ${DOCBASE}-$(1).html stylesheet-images fedora.css
+ ${RM} -r ${DOCBASE}-$(1).html stylesheet-images
${RM} -r ${DOCBASE}-$(1).pdf
${RM} -r ${DOCBASE}-$(1).tar.gz
+ ${RM} fedora*.css watermark.png
endef
#
distclean clean:: $(foreach LANG,${LANGUAGES},${DOCBASE}-${LANG}-clean)
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
diff --git a/xsl/html-common-relnotes.xsl b/xsl/html-common-relnotes.xsl
index 49564d9..c9ae686 100644
--- a/xsl/html-common-relnotes.xsl
+++ b/xsl/html-common-relnotes.xsl
@@ -30,7 +30,7 @@ disable for FC4
<xsl:param name="generate.legalnotice.link" select="1"></xsl:param>
-->
-<xsl:param name="html.stylesheet" select="'fedora.css'"></xsl:param>
+<xsl:param name="html.stylesheet" select="'fedora-draft.css'"></xsl:param>
<xsl:param name="html.stylesheet.type">text/css</xsl:param>
<xsl:param name="html.cleanup" select="1"></xsl:param>
diff --git a/xsl/html-common.xsl b/xsl/html-common.xsl
index 826b59c..41270ef 100644
--- a/xsl/html-common.xsl
+++ b/xsl/html-common.xsl
@@ -25,7 +25,7 @@ procedure after
<xsl:output method="html" indent="no"/>
-<xsl:param name="html.stylesheet" select="'fedora.css'"></xsl:param>
+<xsl:param name="html.stylesheet" select="'fedora-draft.css'"></xsl:param>
<xsl:param name="html.stylesheet.type">text/css</xsl:param>
<xsl:param name="html.cleanup" select="1"></xsl:param>