def main(): """ Main method of ``pylatest-export`` command line tool. """ parser = argparse.ArgumentParser(description="pylatest xml export tool") # TODO: automatic output xml filename based on input filename parser.add_argument("rstfile", help="filename of testcase to be exported into xml form") args = parser.parse_args() # register plain html output with docutils register_plain() # TODO: except IOError with open(args.rstfile, "r") as src_file: rst_content = src_file.read() htmlbody_tree = rst2htmlbodytree(rst_content) xml_export = export_plainhtml(htmlbody_tree) print(xml_export.tostring())
def pylatest2htmlplain(): client.register_plain() client.publish_cmdline_html()