-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmake_pydoc3.py
40 lines (27 loc) · 1.02 KB
/
make_pydoc3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# import sys
# sys.path.extend(['C:\\Users\\Ruben\\source\\repos\\o3d\\x64\\Release', 'C:\\DATA\\DAVE\\PUBLIC\\DAVE', 'C:\\DATA\\DAVE\\PUBLIC\\DAVE\\src', 'C:/Users/Ruben/source/repos/o3d/x64/Release'])
import pdoc
import DAVE
import DAVE.frequency_domain
import DAVE.marine
import DAVE.scene
import DAVE.io.simplify
context = pdoc.Context()
modules = [DAVE.scene, DAVE.frequency_domain, DAVE.marine, DAVE.io.simplify]
for m in modules:
module = pdoc.Module(m, context=context)
pdoc.link_inheritance(context)
def recursive_htmls(mod):
yield mod.name, mod.html()
for submod in mod.submodules():
yield from recursive_htmls(submod)
for module_name, html in recursive_htmls(module):
filename = module_name.split('.')
if len(filename) > 1:
filename = filename[1] + '.html'
else:
filename = 'index.html'
f = open('html/' + filename,'w+', encoding='UTF-8')
f.write(html)
f.close()
print(f"written {'html/' + filename}")