HOW TO make man pages into html


Example: The yes command
man yes | man2html > ~/www/hgs.man/yes.html
 

You'll need the following files:
 
$HOME/bin/man2html
#!/bin/sh
sed -f $HOME/bin/man2html.sed $1 > /var/tmp/$USER$$.html
echo "</PRE></BODY></HTML>\n" >> /var/tmp/$USER$$.html
cat /home/hgs/bin/html.head /var/tmp/$USER$$.html
rm /var/tmp/$USER$$.html &0> /dev/null

 
$HOME/bin/man2html.sed
s@\(\)\1\1@\1@g;
s@\(_\)@<U>\1</U>@g;
s@\(.\)@<U>\1</U>@g;
s@\(.\)@<B>\1</B>@g;
s@<<@\&lt;<@g;
s@>>@>\&gt;@g;
s@^$@<BR>@;
s@M--@-@;
s@</B>\( *\)<B>@\1@g; s@</U>\( *\)<U>@\1@g;

Very simple, n'est-ce pas ?