lilydjwg / nvchecker

New version checker for software releases
MIT License
438 stars 70 forks source link

Adding man pages? #157

Closed yan12125 closed 4 years ago

yan12125 commented 4 years ago

https://nvchecker.readthedocs.io/en/latest/ is awesome, but some man pages (or maybe another pretty-formatted format not depending on heavy browser stuffs) will be even nicer.

As nvchecker already offers rst documents, rst2man from python-docutils might be an option. The result of rst2man /usr/share/doc/nvchecker/usage.rst | man -l - looks good-ish with a few warnings.

pandoc might be another option, but it seems not straightforward. pandoc -f rst -t man /usr/share/doc/nvchecker/usage.rst -o nvchecker.7 does not generate a readable man page.

P.S. This issue is based on some discussions on the #archlinux-tu IRC channel.

lilydjwg commented 4 years ago

This one nvchecker.1.txt seems ok?

yan12125 commented 4 years ago

Wow that looks good! How did you generate it?

lilydjwg commented 4 years ago

A custom version of rst2man: https://github.com/lilydjwg/nvchecker/blob/ccae7d8fcfd74f1c81bb3d0e0aa12e6892725738/docs/myrst2man.py

I didn't figure out how to override the man target sphinx comes with, though.

yan12125 commented 4 years ago

I didn't figure out how to override the man target sphinx comes with, though.

How about just adding the command to docs/Makefile?

lilydjwg commented 4 years ago

It works now.

yan12125 commented 4 years ago

Cool! Looking forward to the next version :)