- # options object, with default values
- opt = struct()
-
- parse_options(argv, version, opt)
-
- header, body = [], []
-
- read_file(header, body, opt)
-
- initial_version = read_version(header)
-
- opt.textclass = get_value(header, "\\textclass", 0)
- opt.backend = get_backend( opt.textclass)
- opt.format = read_format(header, opt)
- opt.language = get_value(header, "\\language", 0)
- if opt.language == "":
- opt.language = "english"
-
- mode, convertion_chain = chain(opt, initial_version)
- opt.warning("convertion chain: " + str(convertion_chain), 3)
+def main(argv):
+ end_format, input, output, error, debug, try_hard, cjk_encoding = parse_options(argv)
+ file = LyX.File(end_format, input, output, error, debug, try_hard, cjk_encoding)