if o in ("-q", "--quiet"):
debug = 0
if o in ("-l", "--list"):
- # list available formats
+ print LyX.formats_list()
sys.exit()
if o in ("-o", "--output"):
output = a
return end_format, input, output, error, debug
-if __name__ == "__main__":
- end_format, input, output, error, debug = parse_options(sys.argv)
- file = LyX.FileInfo(end_format, input, output, error, debug)
-
- mode, convertion_chain = file.chain()
- file.warning("convertion chain: " + str(convertion_chain), 3)
-
- for step in convertion_chain:
- convert = getattr(__import__("lyx_" + step), mode)
- convert(file)
+def main(argv):
+ end_format, input, output, error, debug = parse_options(argv)
+ file = LyX.File(end_format, input, output, error, debug)
+ file.convert()
file.write()
+
+if __name__ == "__main__":
+ main(sys.argv)