Nononononono!

This runs on your machine! It would be a tremendous waste of bandwindth and resources to run it online, especially since you have everything you need right there!  Man2Html will use your OS X1 built-in Apache to serve up the pages.

Man2html was written almost a million years ago by Earl Hood, who says..

man2html is a Perl program to convert formatted nroff output to HTML.

It's has found it's way into all sorts of linux distributions, but sadly, not yet OS X; an omission; when I'm using the terminal I don't want the man pages in the terminal, that's crazy. No I will not open another terminal window! Web pages are far easier to read, and search, and (sorry trees) print; by a mile. Okay, after you install the man2html package you'll get a big ole page of nicely formatted HTML..


Except about some other command, of course. Just like you get using man in the terminal, but in your big web browser. Very neat, and if you use the terminal a lot, an essential part of your kit-bag, for sure. The BSD man pages are a real treasure, the result of much care and work, and the OS X engineers have added significantly to this wealth, some truly excellent manuals. Having this lot on tap makes a breeze of finding the information you need.

It comes in two parts; a simple cgi to submit your queries, and a perl program. You can use the program alone in the terminal too, sending your HTML output to a file, or whatever, instead of the web browser. Of course it comes with its own man page. Once you get it up and running, do a search for "man2html"!

But first, you have to get the package. Grab one of these..

automatic install of the man2html package, for folks that have not customised
	their apache install in any way. click here to download.
automatic install

for folks that have not  customised their apache install in any way
manual install of the man2html package, for folks that have customised
	their apache install in some way. click here to download.
manual install

for folks that have customised their apache install in some way

a php man page viewer is also available
(though it won't funtion on this server)

refs:
1:
man2html also runs on Unix, Linux, Solaris, etc, etc. All the real operating systems.


Welcome to the comments facility!


Daniel - 18.09.04 5:33 am

On both of my OS X 10.3.5 machines, I've found that the web pages generated can drop sets of lines. For example, showing the man page for "ssh" gives you a well-formatted web page, but if you compare it to a terminal-based man output you'll find that lines 60 to 68, 126 to 134, 192 to 200, 258 to 266, etc. are missing from the web page.

To fix this, edit man.cgi to change

@ConvArgs = ("-compress");

to

@ConvArgs = ("-compress", "-topm", "0", "-botm", "0");

It's possible that the output is still flawed, but at the moment I can't find anything.


Thanks for the code,
Dan


cor - 17.10.04 6:37 pm

ah! here it is! I knew there were a couple of comments that had slipped through the net.

I've found a few interesting formatting foibles in the man page presentation. Originally it would chop big sections out of all the pages. Thanks for pinning this down, Dan. I'll put these changes into the distro at some point.

I have a php manpage viewer kicking around too, should be here. The output is much more basic, but shouldn't suffer from any formatting issues. I guess I should put a link to that further up the page somewhere.

Thanks again for the code.

;o) Cor


MAINTENANCE MODE!
Posting is currently disabled while I switch servers.

Welcome to corz.org!

If something isn't working, I'm probably improving it, try again in a minute. If it's still not working, please mail me!