#!/usr/bin/env python import os import sys sys.stdout = file('index.html', 'w') HEAD = """
"""
# PIL http://www.pythonware.com/products/pil/ http://undefined.org/python/Imaging-1.1.5b3-py2.3-macosx10.3.zip 927789970f719966e66ceb57fffa7a49
f = file('packages.txt').readlines()
sections = []
cursection = None
for line in f:
if line.startswith('='):
section = line.strip('=').strip()
cursection = []
sections.append((section, cursection))
elif line.startswith('#'):
pass
else:
line = line.strip()
if line:
cursection.append(line.split())
print HEAD
def maplower(a):
return [s.lower() for s in a]
for section, packages in sections:
packages.sort(lambda a,b:cmp(maplower(a), maplower(b)))
print ' ' print ' %s ' print '' print ' '
print '%s' % (home, name)
print ' ' print ' bob@redivi.com ' print """ |