Menu

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

Download this file

39 lines (35 with data), 1.2 kB

 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
import os, sys
files = (
'matplotlib.afm.html',
'matplotlib.artist.html',
'matplotlib.axes.html',
'matplotlib.axis.html',
'matplotlib.backend_bases.html',
'matplotlib.backends.backend_gd.html',
'matplotlib.backends.backend_gtk.html',
'matplotlib.backends.backend_gtkgd.html',
'matplotlib.backends.backend_ps.html',
'matplotlib.backends.backend_template.html',
'matplotlib.backends.backend_wx.html',
'matplotlib.cbook.html',
'matplotlib.figure.html',
'matplotlib.legend.html',
'matplotlib.lines.html',
'matplotlib.matlab.html',
'matplotlib.mlab.html',
'matplotlib.patches.html',
'matplotlib.text.html',
'matplotlib.transforms.html',
)
devTree, thisDir = os.path.split( os.getcwd() )
for fname in files:
print '\tConverting %s to template' % fname
s = file('../docs/' + fname).read()
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(fname + '.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.