viewing man pages in different format
is there any way to convert man pages into HTML or any other better readable format
for example the text output i get with
man fseek
i want to re-format the text into html or something else
there seems to be a tool called man2html.. i just cant get it to work... could anyone plz show with example
Z
It's not exactly an answer to your question but you can try 'xman' to display manual pages. It provides scrollbars, section browsing etc... Maybe it looks ugly, but it provides information.
[edit1]: I looked up the man2html manpage (read it!). Suppose you have the manpage that you want to convert to html, for example the manpage of 'cp'. You'll have to know the exact location of it. Most probably it sits somewhere in /usr/man/, for me (Slackware 10) it's /usr/man/man1/cp.1.gz. (Note that the file is gzipped)
You'll have to uncompress it, pass it to man2html and redirect the output of man2html to a file because man2html outputs to stdout by default.
$ gunzip -c /usr/man/man1/cp.1.gz | man2html > cp-manpage.html
should do all this. The -c option decompresses the manpage to stdout.
If someone has a simpler way, let me know. I don't have much time right now to search for better alternatives.
[edit2]: You can get the exact filename with the -w option:
$ man -w cp
/usr/man/man1/cp.1.gz
$ man -w xterm
/usr/X11R6/man/man1/xterm.1x.gz
[Edited by - SwSh on August 23, 2004 7:47:55 AM]
[edit1]: I looked up the man2html manpage (read it!). Suppose you have the manpage that you want to convert to html, for example the manpage of 'cp'. You'll have to know the exact location of it. Most probably it sits somewhere in /usr/man/, for me (Slackware 10) it's /usr/man/man1/cp.1.gz. (Note that the file is gzipped)
You'll have to uncompress it, pass it to man2html and redirect the output of man2html to a file because man2html outputs to stdout by default.
$ gunzip -c /usr/man/man1/cp.1.gz | man2html > cp-manpage.html
should do all this. The -c option decompresses the manpage to stdout.
If someone has a simpler way, let me know. I don't have much time right now to search for better alternatives.
[edit2]: You can get the exact filename with the -w option:
$ man -w cp
/usr/man/man1/cp.1.gz
$ man -w xterm
/usr/X11R6/man/man1/xterm.1x.gz
[Edited by - SwSh on August 23, 2004 7:47:55 AM]
Hello browny,
If you have Vim you can do a use its Man command.
It does a good job of formating the man page.
Didn't know about man2html, I have to try to find it.
Lord Bart
If you have Vim you can do a use its Man command.
It does a good job of formating the man page.
Didn't know about man2html, I have to try to find it.
Lord Bart
Thanx to SwSh.. Taking ur suggestions i have made a small shell script .. and WOW
reading man has never been so NICER for me...
thanx again. Here's the code of my shell-script. By the way, in my system all man pages are bzip2-ed that's why i used "bunzip2" below
reading man has never been so NICER for me...
thanx again. Here's the code of my shell-script. By the way, in my system all man pages are bzip2-ed that's why i used "bunzip2" below
bunzip2 -c `man -w $1` | man2html > $1.htmlmozilla $1.htmlrm -f $1.html
Z
Quote: Original post by browny
is there any way to convert man pages into HTML or any other better readable format
for example the text output i get with
man fseek
i want to re-format the text into html or something else
there seems to be a tool called man2html.. i just cant get it to work... could anyone plz show with example
Konquerer can also display man pages, for fseek, just type
man:fseek
in the address bar.
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
Here's some fun trivia about man:
the PAGER environment variable defines a command to pipe the (nroffed) man page into. On most (all?) linux distributions it's set to less, but you could do arbitrarily obnoxious things with it -- like :
will give you a rot13 "encoded" view of the man manpage,
will make your machine read you the page... and so on, ad nauseum.
Have fun!
KB
the PAGER environment variable defines a command to pipe the (nroffed) man page into. On most (all?) linux distributions it's set to less, but you could do arbitrarily obnoxious things with it -- like :
PAGER="rot13 | less" man man
will give you a rot13 "encoded" view of the man manpage,
PAGER="festival --tts" man man
will make your machine read you the page... and so on, ad nauseum.
Have fun!
KB
__KB
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement