#
# replace a string of redundant credits pages with a single one
###

import re
import os
import glob

filelist = glob.glob('*.html')
for filename in filelist:
	f = open(filename,'rw')
        contents = f.read()
	newcontents = re.sub('<a href="XO_Credits.*Main_Credits', '<a href="Main_Credits', contents)
	f.close()
	f = open(filename,'w')
	f.write(newcontents)
	print "writing to" , filename 

### EOF
