#!/usr/bin/env python """ homepage - Make the Whits Homepage Author: Sean B. Palmer, inamidst.com """ import sys, os os.chdir(sys.argv[1]) sys.path = ['.'] + sys.path from code.astraea.notes import notes def main(): template = open('code/astraea/home.txt', 'rb').read() text = '' for note in notes(): text += '
\n' text += '

' text += note.cite + ' —

\n' text += '

' + note.content + '

\n' text += '
\n' template = template.replace('$notes', text) open('index.html', 'wb').write(template) if __name__ == '__main__': main()