- output_file = open(output_filename, 'w')
- text.transform(open(input_filename), output_file, parse_dublincore=options.parse_dublincore,
- wrapping=str(options.wrapping))
+ doc = WLDocument.from_file(input_filename,
+ parse_dublincore=options.parse_dublincore)
+ html = doc.as_text(wrapping=str(options.wrapping))
+ doc.save_output_file(html, output_path=output_filename)