Menu

[r5327]: / trunk / htdocs / process_docs.py  Maximize  Restore  History

Download this file

21 lines (18 with data), 648 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
import os, sys
from hthelpers import modules
os.system('rm -rf docs matplotlib; mkdir docs')
for m in modules:
os.system('cd docs; pydoc -w %s' % m)
devTree, thisDir = os.path.split( os.getcwd() )
for modname in modules:
print '\tConverting %s to template' % modname
try: s = file('docs/' + modname + '.html').read()
except IOError: continue
s = s.replace('file:%s' % devTree, '')
s = s.replace(devTree, '')
lines = s.split('\n')
outLines = ['@header@']
outLines.extend(lines[5:-1])
outLines.append('@footer@')
outFile = file(modname + '.html.template', 'w')
outFile.write('\n'.join(outLines))
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.