Re: Status of the yelp man-page parser



Brent Smith <gnome nextreality net>:
> I was probably the last one to touch that code, and I must say that it 
> is all rather hackish and basically ignores basically all conditional 
> commands.  Surprisingly it formats the majority of man pages fairly 
> well, but really it should be re-written the "right" way (I'm not quite 
> sure what the right way is). 

Ah. I do in fact know what the right way is, because I've implemented
it in my 'doclifter' program, which does a whole bunch of AI-like
pattern recognition hacks to lift man pages to XML-DocBook.

This was a royal pain in the ass to get right.  Took me five years of
work, off and on, to get it to really function, and there are still
probably edge cases it fluffs.  This is probably more effort than
anyone will or even should spend on yelp.

>                                     Ages ago there was a dependency on some 
> man2html program, but for reasons that are beyond me, it was re-written 
> to remove that dependency (I think I remember hearing maintainability as 
> being the major problem).

Yes, can I believe that.  I know man2html's history. It's decent code,
but long orphaned.

> I've lost interest in it, so anyone's efforts to improve it or 
> completely rewrite it are welcome.

You're actually confirming a suspicion I already held, which is that yelp 
(along with other programs like it that try to interpret manual pages on the
fly for display) is basically a bad idea.

I have a potential solution.  Lift manual pages to DocBook at RPM- or
.deb-creation time, and then render to HTML or print as needed.  In
effect, DocBook RefEntries become the new distribution format for man
pages, except upstream authors could still write in man markup if they
wanted to.

This pipeline would not be not practical for on-the-fly man-to-HTML
translation, because the man-page-to-DocBook translation can be slow.
But as a distro-level way of rearranging things so that all
documentation is presented through a browser, it would work.  Yelp
could be scrapped.

Is this a future people on this list would be happy with?
-- 
		<a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]