summaryrefslogtreecommitdiff
path: root/api-docs
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2021-03-26 16:03:51 -0400
committerJordan Wiens <jordan@psifertex.com>2021-03-26 16:03:51 -0400
commit89fa6e3b285f2f83ff0e5d1c5b9907b1f4c33410 (patch)
tree71945d3cf828c004b8b6b85878919448fd9df982 /api-docs
parent558ba0464a340514c7ba26b2f8ad458844ab92c3 (diff)
updating to latest sphinx-rtd theme and many doc formatting fixes
Diffstat (limited to 'api-docs')
-rw-r--r--api-docs/source/conf.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/api-docs/source/conf.py b/api-docs/source/conf.py
index 1d0cc019..39d67f78 100644
--- a/api-docs/source/conf.py
+++ b/api-docs/source/conf.py
@@ -38,7 +38,7 @@ binaryninja._init_plugins() #force license check
def modulelist(modulename):
modules = inspect.getmembers(modulename, inspect.ismodule)
- return sorted(set(x for x in modules if x[0] not in ("abc", "atexit", "binaryninja", "builtins", "ctypes", "core", "struct", "sys", "_binaryninjacore", "traceback", "code", "enum", "json", "numbers", "threading", "re", "requests", "os", "startup", "associateddatastore", "range", "pyNativeStr", "with_metaclass", "cstr", "fnsignature", "get_class_members", "datetime", "inspect")))
+ return sorted(set(x for x in modules if x[0] not in ("abc", "atexit", "binaryninja", "builtins", "ctypes", "core", "struct", "sys", "_binaryninjacore", "traceback", "code", "enum", "json", "numbers", "threading", "re", "requests", "os", "startup", "associateddatastore", "range", "pyNativeStr", "with_metaclass", "cstr", "fnsignature", "get_class_members", "datetime", "inspect", "subprocess")))
def classlist(module):
members = inspect.getmembers(module, inspect.isclass)
@@ -62,27 +62,28 @@ def generaterst():
''')
for modulename, module in modulelist(binaryninja):
- filename = 'binaryninja.{module}-module.rst'.format(module=modulename)
- pythonrst.write(' {module} <{filename}>\n'.format(module=modulename, filename=filename))
+ filename = f'binaryninja.{modulename}-module.rst'
+ pythonrst.write(f' {modulename} <{filename}>\n')
modulefile = open(filename, "w")
- modulefile.write('''{module} module
-=====================
+ underline = "="*len(f'{modulename} module')
+ modulefile.write(f'''{modulename} module
+{underline}
.. autosummary::
:toctree:
-'''.format(module=modulename))
+''')
for (classname, classref) in classlist(module):
- modulefile.write(" binaryninja.{module}.{classname}\n".format(module=modulename, classname=classname))
+ modulefile.write(f" binaryninja.{modulename}.{classname}\n")
modulefile.write('''\n.. toctree::
:maxdepth: 2\n''')
- modulefile.write('''\n\n.. automodule:: binaryninja.{module}
+ modulefile.write(f'''\n\n.. automodule:: binaryninja.{modulename}
:members:
:undoc-members:
- :show-inheritance:'''.format(module=modulename))
+ :show-inheritance:''')
modulefile.close()
pythonrst.write('''.. automodule:: binaryninja