MartinPaulEve/meTypeset — pull request #28 by withanage (2013-12-12 23:41:59+00:00)
Title: Parser scripts

added helper functions for presentation:
e.g will replace the tei Header using new value

def replace_value_of_tag(self, text, new_value):
obj = objectify.fromstring(text)
obj.teiHeader.fileDesc.titleStmt.title._setText(new_value)
return etree.tostring(obj.getroottree())

will take a list of regex and try them till a matching is found
def try_list_of_regex(self, filestring, *regex):