#!/usr/bin/env/python # This is a hack and totally brittle. Let's not talk about it. import sys sfnotes = '''''' if len(sys.argv) <= 1: print "usage: sffixup.py " sys.exit(2) f = open(sys.argv[1], 'r') lines = f.readlines() f.close() try: index = lines.index('\n') except ValueError: print "Cannot find child links. SourceForge links will not appear on index.html." sys.exit(1) lines.insert(index, sfnotes) f = open(sys.argv[1], 'w') for l in lines: f.write(l) f.close()