#!/usr/bin/env python import sys import re # Takes a list of property URLs and generates property-acks.rdfa markup string = "" with open(sys.argv[1], 'r') as file: for line in file.readlines(): if re.match("^\s",line): pass else: line = line.rstrip("\n") string += """
\n""" % line # string = string + '%s, ' % (line, line) print "
\n%s
\n\n" % string