INNER CODE UNIT · Python
build_config
ImranR98/apps.obtainium.imranr.dev · scripts/generate_from_url.py:73
def build_config(app_config):
"""Keep only the keys that belong in a config file."""
config = {key: app_config[key] for key in CONFIG_KEYS}
for key in EXTRA_KEYS:
if app_config.get(key) is not None:
config[key] = app_config[key]
return config
def build_app_json(app_config):
"""Build the config file contents and the subfolder it belongs in."""
config = build_config(app_config)
if has_complex_settings(app_config):
return {
"configs": [config],
"icon": None,
"categories": ["other"],
"description": {"en": None}