D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Problem with nroff output

 

Mike Martin wrote:
> 
> I'm doing a man gateway in CGI and I cant do anything with the
> characters when I get it into perl.
> 
> The closest I have got to so far is using nroff -man|col -b, but then
> I lose out on bold formatting.

Lots of packages exist for this. Debian has;

man2html

(and many others).

The "obvious" way to do a CGI for a man page is to use groff to convert
the man page markup into html directly. In Debian you need "groff",
"groff-base" and the other packages mentioned in the "groff" package
description (all recommended packages of "groff" should do the job).

zcat bash.1.gz | groff -man -Thtml - >/tmp/a.html

The html isn't a thing of beauty., tidy spat 17231 errors on the bash
manual page alone! (Okay most of them were the same two messages over
and over again).

The tools score a 2/10 on the usability stakes, and 2 of those points
are for behaving properly with pipes.

There are almost certain better places to start from ;)

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html