1
#!/usr/bin/env python2.3
4
from popen2 import popen4
9
template = glob('*.tpl')
12
filelist = glob('*.html')
14
print "\n\nlinting %s\n" % f
15
oe, i = popen4('/usr/bin/lore -o lint %s' % f)
16
for line in oe.readlines():
17
sys.stdout.write(line)
21
filelist = glob('*.html')
23
print "running lore for %s\n" %f
24
oe, i = popen4('/usr/bin/lore --config template=./%s %s' % (template[0], f))
25
for line in oe.readlines():
26
sys.stdout.write(line)
29
def make_index_link():
30
index_link = 'index.html'
31
if not os.path.islink(index_link):
32
if os.access(index_link, os.F_OK):
33
print 'index.html exists and points to: %S' % os.path.realpath('index.html')
35
print 'symlinking toc.xhtml to %s' % index_link
36
os.symlink('toc.xhtml', index_link)
40
filelist = glob('*.xhtml')
42
print 'removing %s' % f
47
if __name__ == "__main__":
48
if sys.argv[1] == 'lint':
50
if sys.argv[1] == 'lore':
52
if sys.argv[1] == 'clean':