wangp / bower

A curses terminal client for the Notmuch email system
Other
119 stars 11 forks source link

Create a manpage from README #24

Closed ghost closed 6 years ago

ghost commented 6 years ago

This commit includes instructions to generate a manpage by patching README.md and running the result through pandoc document converter and gzip. Obviously it requires pandoc to be installed and in PATH. Basically, the sections Requirements and Compiling as well as the mention of screenshots will not show up on the manpage - otherwise it's really just README.md formated for man. To try it, just run make bower.1.gz or make manpage, which acts as an alias.

Hope you find this useful.

wangp commented 6 years ago

That's a good idea, thanks. I didn't want to maintain the diff so I implemented the filtering with an awk script. I also left the man page uncompressed; packagers can compress it however they like. For some reason -f markdown_github produces hard line breaks in the output, so I just used -f markdown.

ghost commented 6 years ago

Glad you liked it.

The reason -f markdown_github produces hard line breaks for newlines is that apparently github does the same. -f markdown will use pandoc's own variant of markdown which might conflict with github's depending on the constructs you use. It might be safer to use -f markdown_github-hard_line_breaks, which produces the exact same output as -f markdown with the current README.