From eeebb6540509e89011058f80bd6f247ba360073a Mon Sep 17 00:00:00 2001 From: Philipp Fruck Date: Thu, 23 Mar 2023 17:04:09 +0100 Subject: [PATCH] add client_id and base_url to crawler section those two arguments are required for generic ilias instances --- PFERD/cli/command_ilias_web.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/PFERD/cli/command_ilias_web.py b/PFERD/cli/command_ilias_web.py index 1e34668..cb972d3 100644 --- a/PFERD/cli/command_ilias_web.py +++ b/PFERD/cli/command_ilias_web.py @@ -20,10 +20,17 @@ GROUP = SUBPARSER.add_argument_group( GROUP.add_argument( "--ilias-url", type=str, - metavar="ILIAS", + metavar="BASE_URL", help="The base url of the ilias instance" ) +GROUP.add_argument( + "--client-id", + type=str, + metavar="CLIENT_ID", + help="The client id of the ilias instance" +) + configure_common_group_args(GROUP) @@ -35,7 +42,11 @@ def load(args: argparse.Namespace, parser: configparser.ConfigParser) -> None: load_crawler(args, section) section["type"] = _PARSER_NAME - section["ilias_url"] = str(args.ilias_url) + + if args.ilias_url is not None: + section["base_url"] = args.ilias_url + if args.client_id is not None: + section["client_id"] = args.client_id ilias_common_load(section, args, parser)