Docbook Beautification

5 views
Skip to first unread message

dkp...@gmail.com

unread,
Oct 25, 2006, 11:24:32 PM10/25/06
to krusad...@googlegroups.com
Hey all,

First off, I wanted to introduce myself to the members of the krusader
documentation group. I got involved a few weeks ago by answering the
call for documentation help, and have since worked on commands.docbook.

I came up with a script that formats the docbook files, and am attaching
it to this email for whatever purpose you find fit. Basically, the
script takes docbook file names as inputs, and formats the docbook files
in a nice fashion. The script is in plain text if you are interested in
what it does more exactly. Please note that the script will change
poorly formatted docbooks quite drastically, so consider this when
attempting to diff against a previous revision of a given document.

If you experience any problems with it, please let me know.

Thanks all,

Dan Price

beautify_docbook

Frank Schoolmeesters

unread,
Oct 26, 2006, 2:53:23 AM10/26/06
to krusad...@googlegroups.com
Hi Dan,

Thanks!
I intend to use this script (the next time when i have found some time
to work at the docs ;)

bye,

Frank

Frank Schoolmeesters

unread,
Oct 28, 2006, 5:24:46 AM10/28/06
to krusad...@googlegroups.com
Hi Dan,

I have tried the script.
Could you check e.g. credits.docbook and index.docbook?
e.g. <bookinfo> and <itemizedlist>
becomes difficult to read for humans.

Thanks and bye,

Frank

credits.docbook
index.docbook

Frank Schoolmeesters

unread,
Nov 11, 2006, 12:32:13 PM11/11/06
to krusad...@googlegroups.com, Dan Price
Hi Dan,

I have used the script with tidy as alternative parser and comitted the
beatified *.docbook files in cvs.
http://krusader.cvs.sourceforge.net/krusader/krusader_kde3/doc/en/
Tidy gives much better formatting results than xmllint for Krusaders
docbook files.

Can you change the next issues:
- use by default tidy, and as alternative xmllint
- adapt the script that it will runs from the
krusader_kde3/doc directory and that it beatifies
krusader_kde3/doc/en/*.docbook

So
$~/krusader_kde3/doc/./beatify_docbook
sould reslult that all *.docbook files of
~/krusader_kde3/doc/en
are beatified with tidy.

When this is done the script will be added in cvs.

FYI
i have also updated command.docbook and added some missing menu entries
http://krusader.cvs.sourceforge.net/krusader/krusader_kde3/doc/en/commands.docbook?r1=1.40&r2=1.41

thanks and bye,

Frank

On 11/7/06, Dan Price <dkp...@gmail.com> wrote:
> I updated the beautification script so that you may specify an
> alternate pretty printer (tidy). This can invoked by a command line
> switch of -a or --alternate. If the experience with tidy is better
> than xmllint, I may switch over to it.

beautify_docbook

Frank Schoolmeesters

unread,
Nov 11, 2006, 2:36:34 PM11/11/06
to krusad...@googlegroups.com, Dan Price
Hi,

Unfortunately tidy kills the docbook files, and they don't compile anymore.
tidy replaces "&" by "&amp", in some cases this is ok, but at other places
"&" is requiered and it's not authorised to change it in something else.
I have tried to find out if it possible to stop this behavour, but i
haven't found one for the moment.
So currently tidy is unusable, since the docbook files compilation
gives a lot of errors due to these unwanted "&" replacements
The formatting output to improve the human readbility is ok.

So, i committed the old docbook files again in cvs without the tidy cleanup.

bye,

Frank

Reply all
Reply to author
Forward
0 new messages