History of Unix Manpages (2011)
manpages.bsd.lv
manpages.bsd.lv
We wouldn't want to break existing pages, and surely it would have to be a cross-distro effort, and maybe Markdown isn't the perfect format without modifications. But it's always felt like a natural evolution to me. I suspect some developers (like: most Go program authors) would gladly supply a manual if the workflow were more familiar to people.
That said, a markdown front end is probably not a bad idea. It would address editability and approachability for people who get anxious around old formats.
Anyway, you should probably ask the author/maintainer of groff about these matters: James Clark, whose homepage is http://www.jclark.com/
Perl's POD is also a pretty natural starting point that generates md and man pages from a reasonable source format.
But this is not so bad as a temporary measure - instead of having man render the troff and pipe it into pager, pandoc will render the markdown into troff, pipe it to man (I guess), then to pager. Shouldn't be terribly difficult to set up.
Also, for Windows, Microsoft made something similar: https://docs.microsoft.com/en-us/powershell/module/microsoft...
mktotext ()
{
pandoc --standalone --from markdown --to html -o - $1 | /usr/bin/w3m -dump -T text/html | ${PAGER:-less}
}
Tune to preferred utilities. Invoking a console browser directly on the HTML rather than dumping ASCII is another option.A tool or family of tools that convert various other formats to the groff format might be a more accessible project.
I don't even have any idea what it says or means anymore.. There's no reason (anymore) for macros to only be at the beginning of the line. But will this requirement ever go away? I doubt it.
No. Each person that wants to write a manpage just needs to decide on their own what format they want to write it in and use a tool that converts that format to nroff. There's no need for coordination amongst anyone, and this way there's no risk of breaking existing manpages.
There's multiple such tools. Here's one:
https://github.com/mvertes/txt2man
It's in the main repos of at least Archlinux and Debian.
> maybe Markdown isn't the perfect format without modifications. But it's always felt like a natural evolution to me
I don't think Markdown supports the indentation conventions of manpages.
It seems like ronn[0] does roughly what I want, as mentioned below.
Similar to Windows CHM (for which there are cross platform tools to create and view - e.g. Free Pascal and Lazarus have their own CHM generator and viewer) and other similar documentation formats that provide some form of organization and metadata.
Terminal emulators don't handle markdown natively, but *roff is alive and well.
Plan 9 even uses roff.
https://github.com/mkdoc/mkcli
And a generic man page output is here:
https://github.com/mkdoc/mkout/blob/master/README.md#mkman
It does make the experience much nicer than writing TROFF!
Notice that there's also mdoc [0], which is a saner format, specifical for manpages. I'm not sure that writing manpages in markdown would be a good idea (or make too much of a difference for the author). A fundamental point of man pages is their very strict format, which is enforced by the markup.
A good way to produce manpages is not to write them, but produce them automatically from your code. One of the best tools for that is GNU's help2man [1], where you only have to write the "--help" and "--version" options on your program, and help2man creates a manpage from that.
[0] http://rtomayko.github.io/ronn/ronn.1 [1] https://github.com/apjanke/ronn-ng