def doFile(filename, linkrel, ext, url, templ, options={}, outfileGenerator=getOutputFileName):
 doc = parseFileAndReport(filename)
 clonedNode = templ.cloneNode(1)
 munge(doc, clonedNode, linkrel, os.path.dirname(filename), filename, ext, url, options, outfileGenerator)
 newFilename = outfileGenerator(filename, ext)
 _writeDocument(newFilename, clonedNode)

def doFile ( filename , linkrel , ext , url , templ , options = { } , outfileGenerator = getOutputFileName ) : doc = parseFileAndReport ( filename ) clonedNode = templ . cloneNode ( 1 ) munge ( doc , clonedNode , linkrel , os . path . dirname ( filename ) , filename , ext , url , options , outfileGenerator ) newFilename = outfileGenerator ( filename , ext ) _writeDocument ( newFilename , clonedNode )
process the input document at c{filename} and write an output document .