mirror of
				https://github.com/Garmelon/PFERD.git
				synced 2025-10-31 04:42:42 +01:00 
			
		
		
		
	add client_id and base_url to crawler section
those two arguments are required for generic ilias instances
This commit is contained in:
		| @@ -20,10 +20,17 @@ GROUP = SUBPARSER.add_argument_group( | |||||||
| GROUP.add_argument( | GROUP.add_argument( | ||||||
|     "--ilias-url", |     "--ilias-url", | ||||||
|     type=str, |     type=str, | ||||||
|     metavar="ILIAS", |     metavar="BASE_URL", | ||||||
|     help="The base url of the ilias instance" |     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) | configure_common_group_args(GROUP) | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -35,7 +42,11 @@ def load(args: argparse.Namespace, parser: configparser.ConfigParser) -> None: | |||||||
|     load_crawler(args, section) |     load_crawler(args, section) | ||||||
|  |  | ||||||
|     section["type"] = _PARSER_NAME |     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) |     ilias_common_load(section, args, parser) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Philipp Fruck
					Philipp Fruck