[Privoxy-devel] docbook build changes
Lee
ler762 at gmail.com
Sat Oct 20 18:46:20 UTC 2018
Before I start commiting changes I'd like some feedback. See attached diff.txt
short story:
- docbook generated html files are straight ascii
- docbook generated text files are ascii if possible, utf-8 for AUTHORS
changes:
- GNUmakefile.in
W3M_DUMP =
W3M_DUMP_UTF8 =
specify the input & output character set
need the UTF8 variant for things like the AUTHORS text file where
ascii isn't enough
DB_TXT =
docbook call to create a text file instead of an html file
- doc/source/ldp.dsl.in
fix the 'html' section to leave &char; strings alone; the 'print'
section converts them to a latin1 character
(define %indent-screen-lines%
needs to be either "#f" or a string
anyone want one or two leading spaces automatically added in <screen> output?
<style-specification id="print-notoc" use="print">
needed for building text files without a table of contents
- doc/source/p-authors.sgml
use &char; strings instead of non-ascii chars like á
allows for creating html files that are ascii instead of requiring
utf-8 or latin1
- doc/webserver/user-manual/copyright.html
example of what you get with these changes
note that
$ git diff -- AUTHORS README INSTALL
shows no changes :)
still to do:
doc/source/ldp.dsl.in needs to be put thru dos2unix & have all the
trailing blanks removed
I tried it and didn't notice anything breaking; backed it out because
every single line showed as a change when looking at diffs
Lee
-------------- next part --------------
diff --git a/GNUmakefile.in b/GNUmakefile.in
index c135eb08..1d1f1074 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -130,11 +130,18 @@ CHMOD = chmod
CHOWN = chown
CHGRP = chgrp
GROUPS = groups
-W3M_DUMP = env -u LANG LC_ALL=C @W3M@ -dump
-W3M_DUMP_UTF8 = @W3M@ -dump
+W3M_DUMP = @W3M@ -I ISO-8859 -O ASCII -dump
+W3M_DUMP_UTF8 = @W3M@ -I ISO-8859 -O UTF-8 -dump
+# docbook output is ISO-8859-1
JADECAT = @JADECAT@
JADEBIN = @JADEBIN@
DB = $(JADEBIN) $(JADECAT) -ihtml -t sgml -D.. -d ldp.dsl\#html
+DB_TXT = $(JADEBIN) $(JADECAT) -ihtml -t sgml -D.. -d ldp.dsl\#print
+# ldp.dsl#html : keep '&char;' strings as is
+# ldp.dsl#print : convert '&char;' strings to ISO-8859 equivalent
+# NOTE: '-d ldp.dsl\#whatever' _MUST_ be last and _MUST NOT_ have
+# a trailing space so that '$(DB)-notoc' or '$(DB_TXT)-notoc' pulls
+# in the correct dsl stylesheet
DB2HTML = @DB2HTML@
MAN2HTML = @MAN2HTML@
G2H_CMD = groff -mandoc -Thtml
@@ -143,9 +150,11 @@ PERL = perl
DOC_DIR = doc/source
DOC_TMP = $(DOC_DIR)/tmp
DOC_STATUS = @DOC_STATUS@
-TIDY = tidy -latin1 -q -modify -indent -wrap 120 --tidy-mark no --mute MISSING_ATTRIBUTE --mute TRIM_EMPTY_ELEMENT
+TIDY = tidy -latin1 -q -modify -indent -wrap 120 --tidy-mark no --preserve-entities yes \
+ --mute MISSING_ATTRIBUTE --mute TRIM_EMPTY_ELEMENT
# -latin1
-# docbook output is ISO-8859-1 and tidy assumes ASCII
+# use ISO-8859-1 for both input and output
+# docbook output is ISO-8859-1 and tidy assumes UTF-8 for input
# -q
# suppress nonessential output
# -modify
@@ -546,9 +555,9 @@ groff2html:
# readme page and INSTALL file
dok-readme: dok-release
- cd doc/source && $(DB)-notoc -V nochunks readme.sgml > tmp.html &&\
+ cd doc/source && $(DB_TXT)-notoc -V nochunks readme.sgml > tmp.html &&\
$(W3M_DUMP) tmp.html > ../../README ;\
- $(DB)-notoc -V nochunks install.sgml > tmp.html &&\
+ $(DB_TXT)-notoc -V nochunks install.sgml > tmp.html &&\
$(W3M_DUMP) tmp.html > ../../INSTALL ;\
$(RM) tmp.*
@@ -580,8 +589,8 @@ dok: dok-release dok-devel dok-user dok-faq dok-readme dok-webserver dok-authors
## Make AUTHORS file
dok-authors:
- cd doc/source && $(DB) -V nochunks authors.sgml > tmp.html && $(W3M_DUMP_UTF8) \
- tmp.html > ../../AUTHORS && $(RM) tmp.html
+ cd doc/source && $(DB_TXT) -V nochunks authors.sgml > tmp.html && \
+ $(W3M_DUMP_UTF8) tmp.html > ../../AUTHORS && $(RM) tmp.html
# Set doc entities for VERSION and CODE_STATUS in sgml docs. Toggle content
# exceptions accordingly. This needs to go before any doc building (doh).
@@ -619,7 +628,7 @@ config-file: dok-release generate-config-file
@$(ECHO) "****************************************************"
generate-config-file:
- cd doc/source && $(DB)-notoc -iconfig-file -V nochunks config.sgml > ../../config.html
+ cd doc/source && $(DB_TXT)-notoc -iconfig-file -V nochunks config.sgml > ../../config.html
$(W3M_DUMP) -cols 67 config.html > config
$(PERL) -i.bak utils/prepare-configfile.pl config
diff --git a/doc/source/ldp.dsl.in b/doc/source/ldp.dsl.in
index ccbea7d1..989b0050 100644
--- a/doc/source/ldp.dsl.in
+++ b/doc/source/ldp.dsl.in
@@ -31,7 +31,8 @@
(define %indent-screen-lines%
;; Indent lines in a 'Screen'?
- #t)
+ ;; WAS #t needs to be either "#f" or a string like " "
+ "")
(define %callout-fancy-bug%
;; Use fancy callout bugs?
@@ -47,6 +48,9 @@
;; this is necessary because right now jadetex does not understand
;; symbolic entities, whereas things work well with numeric entities.
+;; -- LER
+;; this is the 'print' portion of the stylesheet so we want to
+;; convert ampersand-code strings to character values
(declare-characteristic preserve-sdata?
"UNREGISTERED::James Clark//Characteristic::preserve-sdata?"
#f)
@@ -72,7 +76,7 @@
(define %section-autolabel% #t)
;; For enumerated sections (1.1, 1.1.1, 1.2, etc.)
-
+
;; HB changed TOC depth to 3 levels.
(define (toc-depth nd)
3)
@@ -245,6 +249,22 @@
</style-specification>
+<style-specification id="print-notoc" use="print">
+<style-specification-body>
+
+;; ===================================================
+;; Vairant without TOC for the Homepage --oes 24/05/02
+;; ===================================================
+
+(define %generate-article-toc%
+ ;; Should a Table of Contents be produced for Articles?
+ ;; If true, a Table of Contents will be generated for each 'Article'.
+ #f)
+
+</style-specification-body>
+</style-specification>
+
+
<!--
;; ===================================================
;; customize the html stylesheet; borrowed from Cygnus
@@ -257,9 +277,12 @@
;; this is necessary because right now jadetex does not understand
;; symbolic entities, whereas things work well with numeric entities.
+;; -- LER
+;; this is the 'html' portion of the stylesheet so we want to keep
+;; the ampersand-code strings and let the browser convert them to characters
(declare-characteristic preserve-sdata?
"UNREGISTERED::James Clark//Characteristic::preserve-sdata?"
- #f)
+ #t)
;; put the legal notice in a separate file
(define %generate-legalnotice-link%
diff --git a/doc/source/p-authors.sgml b/doc/source/p-authors.sgml
index ae248a9e..e1f897d1 100644
--- a/doc/source/p-authors.sgml
+++ b/doc/source/p-authors.sgml
@@ -51,7 +51,7 @@ Current Privoxy Team:
Karsten Hopp
Alexander Lazic
Daniel Leite
- Gábor Lipták
+ Gábor Lipták
Adam Lock
Guy Laroche
Justin McMurtry
@@ -61,7 +61,7 @@ Current Privoxy Team:
Haroon Rafique
Georg Sauthoff
Thomas Steudten
- Jörg Strohmayer
+ Jörg Strohmayer
Rodney Stromlund
Sviatoslav Sviridov
Sarantis Paskalis
@@ -94,7 +94,7 @@ Current Privoxy Team:
Sam Chen
Ramkumar Chinchani
Billy Crook
- Frédéric Crozat
+ Frédéric Crozat
Matthew Daley
Michael T. Davis
Markus Dittrich
@@ -111,7 +111,7 @@ Current Privoxy Team:
Danny Goossen
Lizik Grelier
Daniel Griscom
- Felix Gröbert
+ Felix Gröbert
Bernard Guillot
Jeff H.
Tim H.
@@ -153,10 +153,10 @@ Current Privoxy Team:
Mark Nelson
Tobias Netzel
Adam Piggott
- Petr Písar
+ Petr Písar
Dan Price
Roberto Ragusa
- Félix Rauch
+ Félix Rauch
Kai Raven
Marvin Renich
Chris John Riley
@@ -184,7 +184,7 @@ Current Privoxy Team:
David Wagner
Glenn Washburn
Song Weijia
- Jörg Weinmann
+ Jörg Weinmann
Darren Wiebe
Anduin Withers
Eduard Wulff
diff --git a/doc/webserver/user-manual/copyright.html b/doc/webserver/user-manual/copyright.html
index e40ff33b..b1d3e055 100644
--- a/doc/webserver/user-manual/copyright.html
+++ b/doc/webserver/user-manual/copyright.html
@@ -83,7 +83,7 @@ NAME="COPYRIGHT"
>12. Privoxy Copyright, License and History</A
></H1
><P
-> Copyright © 2001-2017 by Privoxy Developers <CODE
+> Copyright © 2001-2017 by Privoxy Developers <CODE
CLASS="EMAIL"
><<A
HREF="mailto:privoxy-devel at lists.privoxy.org"
@@ -91,7 +91,7 @@ HREF="mailto:privoxy-devel at lists.privoxy.org"
>></CODE
></P
><P
-> Some source code is based on code Copyright © 1997 by Anonymous Coders
+> Some source code is based on code Copyright © 1997 by Anonymous Coders
and Junkbusters, Inc. and licensed under the <I
CLASS="CITETITLE"
>GNU General Public
@@ -565,7 +565,7 @@ CLASS="LITERALLAYOUT"
Karsten Hopp<br>
Alexander Lazic<br>
Daniel Leite<br>
- Gábor Lipták<br>
+ Gábor Lipták<br>
Adam Lock<br>
Guy Laroche<br>
Justin McMurtry<br>
@@ -575,7 +575,7 @@ CLASS="LITERALLAYOUT"
Haroon Rafique<br>
Georg Sauthoff<br>
Thomas Steudten<br>
- Jörg Strohmayer<br>
+ Jörg Strohmayer<br>
Rodney Stromlund<br>
Sviatoslav Sviridov<br>
Sarantis Paskalis<br>
@@ -605,7 +605,7 @@ CLASS="LITERALLAYOUT"
Sam Chen<br>
Ramkumar Chinchani<br>
Billy Crook<br>
- Frédéric Crozat<br>
+ Frédéric Crozat<br>
Matthew Daley<br>
Michael T. Davis<br>
Markus Dittrich<br>
@@ -622,7 +622,7 @@ CLASS="LITERALLAYOUT"
Danny Goossen<br>
Lizik Grelier<br>
Daniel Griscom<br>
- Felix Gröbert<br>
+ Felix Gröbert<br>
Bernard Guillot<br>
Jeff H.<br>
Tim H.<br>
@@ -664,10 +664,10 @@ CLASS="LITERALLAYOUT"
Mark Nelson<br>
Tobias Netzel<br>
Adam Piggott<br>
- Petr Písar<br>
+ Petr Písar<br>
Dan Price<br>
Roberto Ragusa<br>
- Félix Rauch<br>
+ Félix Rauch<br>
Kai Raven<br>
Marvin Renich<br>
Chris John Riley<br>
@@ -695,7 +695,7 @@ CLASS="LITERALLAYOUT"
David Wagner<br>
Glenn Washburn<br>
Song Weijia<br>
- Jörg Weinmann<br>
+ Jörg Weinmann<br>
Darren Wiebe<br>
Anduin Withers<br>
Eduard Wulff<br>
More information about the Privoxy-devel
mailing list