INNER CODE UNIT · Python
main
ImranR98/apps.obtainium.imranr.dev · scripts/generate_from_url.py:238
def main():
"""Main function."""
parser = argparse.ArgumentParser(description="Generate an app config file from an Obtainium redirect URL.")
parser.add_argument("--dry-run", action="store_true", help="Show what would be written without modifying files.")
parsed_args = parser.parse_args()
global DRY_RUN
DRY_RUN = parsed_args.dry_run
print("1. Create new app config")
print("2. Add config to already existing app config file")
user_choice = input("Enter your choice: ")
actions = {"1": create_new_config, "2": update_existing_config}
if user_choice in actions:
actions[user_choice]()
else: