Module documentation should have options sorted

This commit is contained in:
Michael DeHaan 2012-11-03 18:52:59 -04:00
parent c96f2c968e
commit 626203a7c9
7 changed files with 14 additions and 4 deletions

View file

@ -251,7 +251,7 @@ def main():
variable_start_string="@{",
variable_end_string="}@",
trim_blocks=True,
)
)
env.globals['xline'] = rst_xline
@ -334,6 +334,12 @@ def main():
if not doc is None:
all_keys = []
for (k,v) in doc['options'].iteritems():
all_keys.append(k)
all_keys = sorted(all_keys)
doc['option_keys'] = all_keys
doc['filename'] = fname
doc['docuri'] = doc['module'].replace('_', '-')
doc['now_date'] = datetime.date.today().strftime('%Y-%m-%d')