man2html

Jan Stary hans at stare.cz
Tue Jan 2 13:50:44 UTC 2018


On Jan 02 11:07:21, hans at stare.cz wrote:
> Hi Craig,
> 
> > > On Jan 1, 2018, at 6:40 PM, Jan Stary <hans at stare.cz> wrote:
> > > I would like to remove man2htl from macports.
> > > I see that liirc (which you maintain) requires it
> > > as a build dependency. Why exactly is it required please?
> 
> On Jan 01 21:00:03, ctreleaven at macports.org wrote:
> > lirc provides extensive documentation in html format
> > and uses man2html to produce some of it.
> 
> it seems to produce the html manpages (the API html documentation
> is produced differently). For example, as there is irexec(1), i.e.
> /opt/local/share/man/man1/irexec.1.gz, there is also
> /opt/local/share/doc/lirc/lirc.org/html/irexec.html
> - but this is what it says (viewing with lynx):
> 
>    LIRC icon LIRC logo
> 
>    Description: man2html takes formatted manpages from STDIN and converts
>    it to HTML sent to STDOUT. The -topm and -botm arguments are the number
>    of lines to the main body text and NOT to the running headers/footers.
>    Version: 3.0.1 Copyright (C) 1995-1997 Earl Hood,
>    ehood at medusa.acs.uci.edu man2html comes with ABSOLUTELY NO WARRANTY and
>    man2html may be copied only under the terms of the GNU General Public
>    License, which may be found in the man2html distribution.
> 
>    [[1]LIRC homepage]
> 
> That's not a html version of irexec(1), that's a failed run of man2html.
> Apparently, no-one hasn't looked at the html manpages; it doesn't work.

So I run the full build. This is a typical man2html call:

src=$(echo ./man-html/irexec.html | /opt/local/bin/gsed -e 's/man-html/man/' -e 's/\.html//'); \
	    man2html -M index.html -r ${src}.[1-8] | \
		/opt/local/bin/gsed \
	            -e '1,/^$/d' \
		    -e '/This document was created/i \
                        <p>'  \
		    -e '/^Time:/a \
                        </p>'  \
		    -e '/HREF/s|".*man[1-9]/\(.*\)[0-9]\.html|"\1html|' | \
			 xsltproc --html ./manpage.xsl - | \
			    /opt/local/bin/gsed -e '/href="\.\.\/index.html"/s|\.\./||' > man-html/irexec.html
Unknown option: m
Unknown option: r

It doesn't even call man2html properly;
apparently, lirc thinks it is calling the man port's man2html.

Let's remove this cruft entirely.
https://github.com/macports/macports-ports/pull/1189


	Jan


> We have the original manpages in the first place;
> why produce a boken html version?
> 
> Can we drop this entirely please?
> I am willing to do the work (with the intent
> of eventually removing man2html from the ports).
> 
> > Is there some other tool that replaces man2html that I should be using?  
> 
> There is groff -man -Thtml in the base system.
> The output is not very nice, but still superior to man2html.
> Try 'man2html /usr/share/man/man1/ls.1'
> vs 'groff -man -Thtml /usr/share/man/man1/ls.1'
> - it even lacks the NAME entry.
> 
> There is also a newer groff in ports; and there is mandoc,
> whose 'mandoc -Thtml' output is way superior to them both.
> 
> But as I said, can we please drop generating the html pages entirely?
> 
> 	Jan


More information about the macports-users mailing list