#!/usr/bin/env python """ feed.py - Juno Feed Module Copyright 2008, Sean B. Palmer, inamidst.com Licensed under the Eiffel Forum License 2. http://inamidst.com/whits/code/juno/ """ import cgitb cgitb.enable() import itertools from entries import entries def main(options): print 'Content-Type: application/atom+xml' print print options['head'] first = True for uri, updated, title, content in itertools.islice(entries(), 15): if first: print ' ' + updated + '' first = False entry = options['entry'] entry = entry.replace('$uri', uri) entry = entry.replace('$updated', updated) entry = entry.replace('$title', title) entry = entry.replace('$content', content) print entry print options['tail'] if __name__ == '__main__': print __doc__