www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - D man pages

reply kdevel <kdevel vogtner.de> writes:
For years I missed the man pages of the C++ standard library and 
now found out that some Linux distros provide them as extra 
package. The man pages are not generated by a default during a 
GCC bootstrap install but need an explicit make doc-install-man 
in the corresponding doc directory of libstdc++.

Is there any such mechanism to generate man pages for D/Phobos?

Stefan
Jan 05
parent reply "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Sat, Jan 05, 2019 at 09:59:27PM +0000, kdevel via Digitalmars-d-learn wrote:
 For years I missed the man pages of the C++ standard library and now
 found out that some Linux distros provide them as extra package. The
 man pages are not generated by a default during a GCC bootstrap
 install but need an explicit make doc-install-man in the corresponding
 doc directory of libstdc++.
 
 Is there any such mechanism to generate man pages for D/Phobos?
 
 Stefan
The current ddoc-based scheme may not be flexible enough to generate man pages (though I could be wrong). But something like Adam Ruppe's adrdox could possibly be the basis for translating individual module symbols into manpages perhaps? Though I have to warn, working with troff/groff syntax is probably not going to be pretty, esp. given the laxness / HTML-specificity of your typical Phobos doc comment. But perhaps it could be made to work... Question is, who's gonna do the grunt work? T -- Computers shouldn't beep through the keyhole.
Jan 05
parent reply Adam D. Ruppe <destructionator gmail.com> writes:
On Sunday, 6 January 2019 at 02:23:20 UTC, H. S. Teoh wrote:
 But something like Adam Ruppe's adrdox could possibly be the 
 basis for translating individual module symbols into manpages 
 perhaps?
The approach I'd take is actually converting my generated html to text and just piping it through less. Or if we specifically want man, convert the html into man syntax (there's enough semantic information there to do the conversion). http://arsdnet.net/arsd/dman.png But that's the result of about 5 mins of work... though I really like my hyperlinks and actually kinda prefer the browser for that reason (tho making a custom little terminal browser to handle the links is p tempting)
Jan 05
parent reply "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Sun, Jan 06, 2019 at 03:11:48AM +0000, Adam D. Ruppe via Digitalmars-d-learn
wrote:
[...]
 http://arsdnet.net/arsd/dman.png
 
 But that's the result of about 5 mins of work... though I really like
 my hyperlinks and actually kinda prefer the browser for that reason
 (tho making a custom little terminal browser to handle the links is p
 tempting)
Lately I've come to hate the modern graphical browser more and more. It's a single over-complex point of failure that simply tries to do too much and be too much. Instead of doing one thing well and delegating other tasks to other programs that do them better, it does everthing mediocrely and wants to take over everything else, and inevitably ends up being a minefield of security holes, excessive unexplained resource consumption, needless hidden complexity, and generally stinks of bad (or rather lack of) design. (My latest gripe is those pervasive evil svg/css spinners that consume ridiculous amounts of CPU for something completely irrelevant... once I dared to look at the related W3C specs, and found to my horror a completely ridiculously over-engineered mess that shows all the bad symptoms of design by committee with none of the benefits, along with the associated bloatware that cannot be anything *but* bloated and inefficient 'cos there's no other way to be spec-conformant. And all this just for some eye-candy. It's utterly insane, yet these days people swear by it.) A text-based links browser with a focused use case sounds like a far better idea. Though programs like elinks or pinfo may have already have you beat on this front. :-D T -- If I were two-faced, would I be wearing this one? -- Abraham Lincoln
Jan 07
parent Adam D. Ruppe <destructionator gmail.com> writes:
On Monday, 7 January 2019 at 14:25:26 UTC, H. S. Teoh wrote:
 A text-based links browser with a focused use case sounds like 
 a far better idea. Though programs like elinks or pinfo may 
 have already have you beat on this front. :-D
elinks does an ok job on dpldocs (of course, I partially designed it for such, but mostly it is just because my html is only partially crap), but a custom program can do better, and is really very little effort to write anyway...
Jan 07