[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tips
On Thu, 9 Mar 2000 Paul.Newman@pgen.com wrote:
> While we're on the subject of tips (cheesy tie in)
> can someone give me a tip how to write a bash script to use man2html to produce
> a single html file for each of the man pages sections? Why on earth the LDP or
It'd be huge ( I get 11MB with man1 ) ! Your browser will lock up. Anyway,
you wished for it, so
here it is :
for X in /usr/man/man1/*; do
man2html $X >> somefile
done
> some of the distribution packagers havent put the man pages into printable
> format is beyond me...
> Perhaps indy will want to include an RPM with the man pages in html?
Do you want "printable format" or html ? They are more printable in their
current format than html.
Try something like this for example:
man -t ls > ls.ps
Of course, if you want to do all pages, you need a way to loop through all
manpages. So it's better to use the "raw form"
groff -Tps -mandoc /usr/man/man1/ls.1 > ls.ps
you could even just pipe this into lpr ( instead of redirecting to ls.ps )
Obviously, to do all the manpages, just use the same for loop
for X in /usr/man/man1/*; do
...
done
BTW, maybe we should make a hint about printing manpages.
HTH
--
Donovan