<<< Date Index >>>     <<< Thread Index >>>

Re: Docbook patch



On Sunday, 11 September 2005 at 21:34, TAKAHASHI Tamotsu wrote:
> On Thu, 11 Aug 2005, Brendan Cully wrote:
> > On Thursday, 11 August 2005 at 03:10, Vincent Lefevre wrote:
> > > Perhaps html2text[*] from Martin Bayer, with a good html2textrc file?
> > > 
> > > * http://www.mbayer.de/html2text/
> > 
> > It supports less HTML than w3m, lynx, and links. It doesn't do a very
> > good job with the manual produced by the docbook xsl I'm using. links,
> > btw, doesn't produce output as good as w3m's, and doesn't do
> > bold/underline anyway.
> 
> I don't think it is so bad. It is the only one program
> natively supports bold/underline, isn't it?

Lynx does too, in fact. That's why it's currently the default renderer
in the Makefile.

> w3m is good if bold/underline is implemented.
> For example, a dirty hack:
> =======================
>  sed 's,<strong>,MsS,;s,</strong>,MsE,;s,<em>,MiS,;s,</em>,MiE,' \
>  manual.html | \
>  w3m -T text/html -O latin-1 -S -no-graph -dump | \
>  ruby strong-em.rb

As much as I like the language, I'm not inclined to add ruby to the
dependency list. On the other hand, docbook does drag in a pretty
motley crew all by itself...

this script of yours could probably be done in awk, or certainly
perl. Might not be a bad idea...

Attachment: pgpIDf2sMpNhn.pgp
Description: PGP signature