diff -r fcc07f6907a8 -r e4401bf4a387 webfront.py --- a/webfront.py Thu Aug 26 19:49:55 2021 +0300 +++ b/webfront.py Thu Aug 26 19:54:15 2021 +0300 @@ -1,14 +1,22 @@ #!/usr/bin/env python3 +import argparse, sys from flask import Flask, render_template, redirect, request from ldcheck import appname, version, version_string +from ldcheck import load_rcfile, postprocess_library_paths from parse import read_ldraw from testsuite import load_tests, check_model, problem_text, all_problem_types +parser = argparse.ArgumentParser() +parser.add_argument('-l', '--library', action = 'append') +parser.add_argument('--color', action = 'store_true') +args = parser.parse_args(load_rcfile() + sys.argv[1:]) +libraries = postprocess_library_paths(args.library) + app = Flask(appname) from ldcheck import LDrawContext try: - context = LDrawContext() + context = LDrawContext(libraries = libraries) except RuntimeError as error: from sys import stderr, exit print('error:', str(error), file = stderr)