#!/usr/bin/env python # -*- encoding: utf-8 -*- "Update the wiki pages to work with Jekyll" import os HEADER = """--- layout: default title: %s base_url: %s --- """ def process_dir (dn,base,rel): s = '\n' return s txt = HEADER % ('Wiki', '../') + '\n'; txt += "

Wiki index

\n" txt += process_dir ("wiki",'', '../../'); with open('wiki.html', 'w') as f: f.write(txt) print 'Done'