-d, --debug level level=0..2 (O_ no debug information, 2_verbose)
default: level=1
-e, --err error_file name of the error file or else goes to stderr
+ -f, --from version initial version (optional)
-t, --to version final version (optional)
-o, --output name name of the output file or else goes to stdout
-q, --quiet same as --debug=0"""
usage()
sys.exit()
if o in ("-v", "--version"):
- print "lyx2lyx, version %s" %(LyX.version)
+ print "lyx2lyx, version %s" %(LyX.version_lyx2lyx)
print "Copyright (C) 2002-2004 José Matos and Dekel Tsur"
sys.exit()
if o in ("-d", "--debug"):
def main(argv):
end_format, input, output, error, debug = parse_options(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)
+ file = LyX.File(end_format, input, output, error, debug)
+ file.convert()
file.write()
if __name__ == "__main__":