Operating System - HP-UX
1823062 Members
3157 Online
109645 Solutions
New Discussion юеВ

man page editor (txt/html to man converter)

 
Bill McNAMARA_1
Honored Contributor

man page editor (txt/html to man converter)

Hi,

I need to create man pages,
either from html markup or text.

Ideally a commandline based utility to do the conversion would be good.

Reason being, this will be scripted for depot creation.

I've got txt2man from the porting archive, but it return errors when converting - (even it's own help page)

Later,
Bill
It works for me (tm)
6 REPLIES 6
Tore_1
Regular Advisor

Re: man page editor (txt/html to man converter)

Hi, there is a tool which is called viman which you can use. I think you can find it a freshmeat.
Paula J Frazer-Campbell
Honored Contributor

Re: man page editor (txt/html to man converter)

Bill


man | col -b

Will struip out the formatting

So:_

man command | col -b > file.txt


HTH

Paula
If you can spell SysAdmin then you is one - anon
Paula J Frazer-Campbell
Honored Contributor

Re: man page editor (txt/html to man converter)

Bill


man | col -b

Will strip out the formatting

So:_

man command | col -b > file.txt


HTH

Paula
If you can spell SysAdmin then you is one - anon
Ralph Grothe
Honored Contributor

Re: man page editor (txt/html to man converter)

Bill,

I'd suggest you use Perl to this end, and especially Perl's Plain Old Documentation (aka POD).

If you have a Perl version >= 5.003 installed type at the shell
(beware, if you are root, and have a Perl >= 5.6 it won't let you execute perldoc as root, because there was an exploit, so do a su to another user before, or use the -U flag)

$ perldoc perldoc

and read the tutorial to POD's very straight forward kind of mark-up in

$ perldoc perlpod

From this you will learn the POD's mark-up tags in abt. half an hour.

Then you may easily write all your docs in POD and let perldoc do the nroff formatting (e.g. typical manpage layout with highlighting etc.)
There are even lots of Perl tools for conversion of POD to almost any format (e.g. html, roff, ps etc.)

HTH

Ralph
Madness, thy name is system administration
Bill McNAMARA_1
Honored Contributor

Re: man page editor (txt/html to man converter)

ping..
still no bunny answer..
Did anyone look at txt2man from the porting archive..

I'm finding recently that a lot of stuff there just doesn't work.

Later,
Bill
It works for me (tm)
Shannon Petry
Honored Contributor

Re: man page editor (txt/html to man converter)

Bill,

I have not seen anything like you need. I usually end up making my own and fudging the formatting from other man pages. I know, not a good answer, but...

You can put plain text as man pages, and last I checked anyway they are displayed in that format. Just make sure that they have the correct filename/extension in a current man page directory or define MANPATH to include your own.

HTML would take a bit more work, as you have to strip the HTML tags off to get text, or translate. Sorry, but noone wants to get to man from html any more, but I have some awsome cgi man to html converters ;)

Regards,
Shannon
Microsoft. When do you want a virus today?