summaryrefslogtreecommitdiff
path: root/buildwiki.py
blob: 69b0110ab4119e9e4fcd74da89e5eb93b6709978 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python

import sys
import os

def main():
    print '==> Generating Python files'
    files = os.listdir('.')
    for file in files:
        if file.endswith('.tmpl'):
            os.system('cheetah compile %s' % file)
    print '==> Generating HTML files'
    for file in files:
        if file.endswith('.tmpl'):
            os.system('python %(file)s.py > %(file)s.html' % {'file' : file[:-5]})
    return 0

if __name__ == '__main__':
    rc = main()
    sys.exit(rc)