Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update manpages #22

Closed
dharple opened this issue Feb 3, 2021 · 2 comments
Closed

Update manpages #22

dharple opened this issue Feb 3, 2021 · 2 comments
Assignees
Projects

Comments

@dharple
Copy link
Owner

dharple commented Feb 3, 2021

Look in to a tool to assist with managing the man pages for detox. Ronn (https://github.com/rtomayko/ronn) looks interesting.

@dharple dharple added this to To do in detox v2.0 via automation Feb 3, 2021
@dharple
Copy link
Owner Author

dharple commented Feb 12, 2021

To go from *roff to markdown, I was considering writing a sed script. This looks like it might do most of the work:

https://github.com/mle86/man-to-md

also, pandoc might work?!

https://github.com/ueberdosis/alldocs.app

@dharple dharple moved this from To Do to In Progress in detox v2.0 Feb 12, 2021
@dharple
Copy link
Owner Author

dharple commented Feb 12, 2021

man-to-md does not support mdoc (mandoc) macros, but at least has the decency to say so.

pandoc doesn't support them, either, but it just skips them silently, resulting in half a manpage being exported.

mandoc appears to work, and get close enough for this purpose.

http://man.openbsd.org/mandoc.1


That works, and generates a file that can be cleaned up and formatted for use with ronn-ng. (https://github.com/apjanke/ronn-ng).

I'm no longer convinced that it's the correct way to go, though. The man pages that come out of ronn-ng look decent enough, but it's generating straight *roff output, not mandoc output, and my concern is that some functionality might not work. For example, the references to other man pages are not written out as .Xr, and I'm not sure if that will still generate links when converting a man page to HTML.

e.g.

.SH "SEE ALSO"
inline\-detox(1), detoxrc(5), detox\.tbl(5)\.

vs the original

.Sh SEE ALSO
.Xr inline-detox 1 ,
.Xr detoxrc 5 ,
.Xr detox.tbl 5 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

1 participant