Add the functions to the module index pages.

Call them moduleindex pages instead of classindex.
Use the fullname for function links.
This commit is contained in:
Robin Dunn
2016-05-23 23:28:16 -07:00
parent 6bd2ba6a4c
commit 68844e4b52
7 changed files with 85 additions and 28 deletions

View File

@@ -637,7 +637,7 @@ def pickleItem(description, current_module, name, kind):
if kind == 'function':
pickle_file = os.path.join(SPHINXROOT, current_module + 'functions.pkl')
else:
pickle_file = os.path.join(SPHINXROOT, current_module + '1classindex.pkl')
pickle_file = os.path.join(SPHINXROOT, current_module + '1moduleindex.pkl')
with PickleFile(pickle_file) as pf:
pf.items[name] = description
@@ -667,6 +667,18 @@ def pickleClassInfo(class_name, element, short_description):
pf.items[class_name] = (method_list, bases, short_description)
# ----------------------------------------------------------------------- #
def pickleFunctionInfo(fullname, short_description):
"""
Saves the short description for each function, used for generating the
summary pages later.
"""
pickle_file = os.path.join(SPHINXROOT, 'function_summary.pkl')
with PickleFile(pickle_file) as pf:
pf.items[fullname] = short_description
# ----------------------------------------------------------------------- #