Menu

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

Download this file

29 lines (24 with data), 1.1 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
import os, sys
files = ( 'matplotlib.cbook.html', 'matplotlib.afm.html',
'matplotlib.lines.html', 'matplotlib.patches.html',
'matplotlib.artist.html', 'matplotlib.axes.html',
'matplotlib.backend_bases.html', 'matplotlib.matlab.html',
'matplotlib.mlab.html',
'matplotlib.transforms.html',
'matplotlib.backends.backend_gd.html',
'matplotlib.backends.backend_gtk.html',
'matplotlib.backends.backend_ps.html',
'matplotlib.backends.backend_template.html',
'matplotlib.backends.backend_wx.html',
)
for fname in files:
print '\tConverting %s to template' % fname
s = file('../docs/' + fname).read()
s = s.replace('file:/hunter/jdhunter/python/projects/matplotlib/', '')
s = s.replace('/hunter/jdhunter/python/projects/matplotlib/', '')
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.