From 9ee86c545e14ade1fd14b7068bdda6cf5a7c47a9 Mon Sep 17 00:00:00 2001 From: Dylan Garrett Date: Sun, 13 Jun 2021 14:20:15 -0700 Subject: Move base_url to config. Add README info about config override --- roka.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'roka.py') diff --git a/roka.py b/roka.py index 9ac88d1..b7fc849 100755 --- a/roka.py +++ b/roka.py @@ -97,17 +97,11 @@ if __name__ == '__main__': parser.add_argument('--generate', dest='static_path', type=str, action='store', help='Output directory to generate static files', required=False) - parser.add_argument('--base_url', dest='base_url', type=str, action='store', - help='Base URL to use in static files', - required=False) parser.add_argument('--config', dest='config', type=str, action='store', help='Json configuration instead of app.cfg', required=False) args = parser.parse_args() - if args.static_path and not args.base_url or args.base_url and not args.static_path: - parser.error('--generate and --base_url must be included together') - if args.config: class objectview(object): def __init__(self, d): @@ -124,6 +118,6 @@ if __name__ == '__main__': books.scan_books(root_path) books.write_cache() elif args.static_path: - generate(args.static_path, args.base_url, root_path) + generate(args.static_path, app.config['BASE_URL'], root_path) else: app.run(host='127.0.0.1', port='8085', threaded=True) -- cgit v1.2.3-54-g00ecf