MCPcopy Create free account
hub / github.com/bspaans/python-mingus / generate_module_wikidocs

Method generate_module_wikidocs

scripts/api_doc_generator.py:107–136  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

105 self.generate_callable_wikidocs(element_string, element, e, is_class)
106
107 def generate_module_wikidocs(self):
108 self.reset()
109 header = '=' * len(self.module_string)
110 res = '.. module:: %s\n\n' % self.module_string
111 res += '%s\n%s\n%s\n\n' % (header, self.module_string, header)
112
113 if self.module.__doc__ is not None:
114 res += self.module.__doc__ + '\n\n'
115
116 # Gather all the documentation
117 self.process_element_recursively(self.module_string, self.module)
118
119 # Order it
120 self.functions.sort()
121 self.attributes.sort()
122
123 # Present classes
124 for c in self.classes:
125 res += c
126
127 # Present attributes
128 for a in self.attributes:
129 res += a
130
131 # Present functions
132 for f in self.functions:
133 res += f
134 res += '----\n\n'
135 res += '\n\n:doc:`Back to Index</index>`\n'
136 return res
137
138 def generate_non_callable_docs(self, module_string, element_string, evaled, is_class = False):
139 if element_string[0] != '_' and type(evaled) != types.ModuleType:

Callers 1

output_wikiMethod · 0.95

Calls 3

resetMethod · 0.95
sortMethod · 0.80

Tested by

no test coverage detected