Intermediate commit.

This commit is contained in:
Michael Lazar
2015-09-27 16:23:34 -07:00
parent cb2de5965a
commit dfc5ddef1a
7 changed files with 171 additions and 28 deletions

29
scripts/build_manpage.py Normal file
View File

@@ -0,0 +1,29 @@
"""
Internal tool used to automatically generate an up-to-date version of the rtv
man page. Currently this script should be manually ran after each version bump.
In the future, it would be nice to have this functionality built into setup.py.
Usage:
$ python scripts/build_manpage.py
"""
from datetime import datetime
from rtv import docs, config
parser = config.build_parser()
help = parser.format_help()
help_sections = help.split('\n\n')
data = {}
data['version'] = docs.__version__
data['release_date'] = datetime.utcnow().strftime('%B %d, %Y')
data['synopsis'] = help_sections[0].replace('usage: ', '')
data['description'] = help_sections[1]
options = ''
arguments = help_sections[2].split('\n')[:1]
for argument in arguments:
options += ''
pass