Operating System - Linux
1752272 Members
4323 Online
108786 Solutions
New Discussion юеВ

Re: install man pages in HTML format and show them via Apache

 
SOLVED
Go to solution
'chris'
Super Advisor

install man pages in HTML format and show them via Apache

hi

is it any way to install man pages in HTML format and show them via Apache ?
I have Debian Sarge.

kind regards
chris

6 REPLIES 6
Pradeep_29
Frequent Advisor

Re: install man pages in HTML format and show them via Apache

You can follow this steps,

man command >command.txt

The above command produces non stop output of man. Create a simple html page calling this file in HTML body. Man pages under /usr/share/man are compressed files. You can also do gzcat /usr/share/man/command files to view the actual file. But the format is different.

Create a HTML page placing all commands and use href to reference to these man files.

I would like to know if there is any direct method for this.

And If I am in your place, i would place PDF file containing all HP-UX commands and reference this file. There is PDF file which has all commands.

Thx,
Pradeep.
Stuart Browne
Honored Contributor
Solution

Re: install man pages in HTML format and show them via Apache

'man2html' is your friend:

http://packages.debian.org/unstable/doc/man2html
One long-haired git at your service...
Gopi Sekar
Honored Contributor

Re: install man pages in HTML format and show them via Apache


as stuart mentioned, convert man pages to html using man2html.

Usage is: man2html

remember, the man page file has to be gunziped before feeding on to man2html.man2html can also do multiple files at a time.

if you do not want to do this, you can try accessing the man pages online, check this link: http://linux.ctyme.com/ there are lot more sites like this (eg: linux documentation project http://www.tldp.org/) which allows you to download the html-ized man pages.

Then its all matter of copying the html files to a particular directory in apache (/var/www/html) and accessing them through browser.

Regards,
Gopi
Never Never Never Giveup
'chris'
Super Advisor

Re: install man pages in HTML format and show them via Apache

thanks,

# apt-get install apache man2html

simply point your browser to this URL:

http://localhost/cgi-bin/man/man2html

and it works excellent !

greetings
chris
Mike Stroyan
Honored Contributor

Re: install man pages in HTML format and show them via Apache

If you are using debian you should also have a look at 'apt-get dwww'. It makes several documentation formats viewable with a web browser at http://localhost/dwww/ .
Guru Dutta
Frequent Advisor

Re: install man pages in HTML format and show them via Apache

There is a man2html tool which could be of use to you