update-applications/update_applications/__main__.py
2024-06-07 12:55:03 +02:00

24 lines
578 B
Python

import argparse
import datetime
import subprocess
from pathlib import Path
from .__about__ import __version__
from .utils import (CONFIG_PATH, SETTINGS, SETTINGS_EXISTED, console,
edit_file, load_config, save_config)
def configure():
save_config()
edit_file(CONFIG_PATH)
load_config()
def cli():
parser = argparse.ArgumentParser()
parser.add_argument("--config", action=argparse.BooleanOptionalAction, help="Configure the settings")
args = parser.parse_args()
if not SETTINGS_EXISTED or args.config:
configure()