manpage -> html

Fbsd8 fbsd8 at a1poweruser.com
Sun Jan 13 02:20:02 UTC 2013


Fbsd8 wrote:
> Polytropon wrote:
>> On Sat, 12 Jan 2013 19:52:06 -0500, Fbsd8 wrote:
>>> OK let me be more specific.
>>> Using just commands that are in the base system.
>>> IE; come with the 9.1 system
>>
>> Very well:
>>
>> zcat `man -w ls` | groff -Thtml -dpaper=a4 -P-pa4 > ls.html
>>
>> zcat `man -w ls` | groff -Thtml > ls.html
>>
>> However, the output looks a bit strange here (tested with lynx
>> and Opera), so maybe some additional options are required. I've
>> just derived this from my man2pdf script and read "man groff"
>> for the -T parameter.
>>
>>
> 
>       zcat `man -w ls` | groff -T html > ls.html
> 
> That kind of worked. It did create html code but it dropped all the 
> indentations and blank lines. .Pp commands in the man page source.
> 
> 
            zcat `man -w ls` | groff -mdoc -T html > ls.html

The -mdoc is the FBSD style and it worked.
Got indentations for all sections plus the high-intensity stuff
converted to bold. The blank lines also can out.

Thanks for the pointer.
You're da man.




More information about the freebsd-questions mailing list