25 ms·
It's offtopic, but man pages should really adopt a new format (e.g. markdown) instead of roff. roff is a terrible way to write a document. Its format is ancien
by euske 6y ago
It's offtopic, but man pages should really adopt a new format (e.g. markdown) instead of roff.
roff is a terrible way to write a document. Its format is ancient and not well documented. Its behavior is not consistent across different implementations. Worst of all, no proper i18n support.
There's a tool like roff2html, but again it's pretty sketchy in terms of reliability and i18n support. I wrote my own converter when I was translating OpenBSD manpages [1], but I hope more people recognize this issue.
[1] https://github.com/euske/openssh-jman/blob/master/roff2html.py https://github.com/euske/openssh-jman/blob/master/roff2html....
- reidjs 6y agoI really like cht.sh curl cht.sh/grep
- kseistrup 6y agoYou can use scdoc(1) to produce man-pages from something that resembles a subset of markdown: ⌘ https://git.sr.ht/~sircmpwn/scdoc https://git.sr.ht/~sircmpwn/scdoc
- kseistrup 6y agoPS: You can see an example of scdoc sources here: ⌘ https://github.com/kseistrup/timestamp/tree/master/src https://github.com/kseistrup/timestamp/tree/master/src The scdocs havde the extension .md because Microsoft Github thinks .sc is SuperCollider files, whatever that is. The .1 files are “compiled” from the .1.md sources.