diff --git a/slpkg/configs.py b/slpkg/configs.py index 7d611a21..45b30aca 100644 --- a/slpkg/configs.py +++ b/slpkg/configs.py @@ -54,16 +54,20 @@ class Configs: sbo_tar_suffix: str = '.tar.gz' sbo_repo_tag: str = '_SBo' + # ponce repo configs + ponce_repo: bool = False + ponce_repo_url: str = 'https://cgit.ponce.cc/slackbuilds/plain' + # Slackware commands installpkg: str = 'upgradepkg --install-new' reinstall: str = 'upgradepkg --reinstall' removepkg: str = 'removepkg' # Cli menu colors configs - colors: str = True + colors: bool = True # Dialog utility - dialog: str = True + dialog: bool = True # Downloader command. Wget and curl. downloader = 'wget' @@ -75,11 +79,11 @@ class Configs: curl_options = '' # Choose the view mode - silent_mode: str = True + silent_mode: bool = True # Choose ascii characters. # If True use extended else basic. - ascii_characters = True + ascii_characters: bool = True # Load configurations from the file. load = LoadConfigs() @@ -89,49 +93,52 @@ class Configs: if config: try: # OS architecture by default - os_arch: str = config['os_arch'] + os_arch: str = config['OS_ARCH'] # All necessary paths - tmp_slpkg: str = config['tmp_slpkg'] - build_path: str = config['build_path'] - download_only: str = config['download_only'] - sbo_repo_path: str = config['sbo_repo_path'] + tmp_slpkg: str = config['TMP_SLPKG'] + build_path: str = config['BUILD_PATH'] + download_only: str = config['DOWNLOAD_ONLY'] + sbo_repo_path: str = config['SBO_REPO_PATH'] # Database name - database_name: str = config['database_name'] + database_name: str = config['DATABASE_NAME'] # SBo repository details - sbo_repo_url: str = config['sbo_repo_url'] - sbo_txt: str = config['sbo_txt'] - sbo_chglog_txt: str = config['sbo_chglog_txt'] - sbo_tar_suffix: str = config['sbo_tar_suffix'] - sbo_repo_tag: str = config['sbo_repo_tag'] + sbo_repo_url: str = config['SBO_REPO_URL'] + sbo_txt: str = config['SBO_TXT'] + sbo_chglog_txt: str = config['SBO_CHGLOG_TXT'] + sbo_tar_suffix: str = config['SBO_TAR_SUFFIX'] + sbo_repo_tag: str = config['SBO_REPO_TAG'] + + ponce_repo: bool = config['PONCE_REPO'] + ponce_repo_url: str = config['PONCE_REPO_URL'] # Slackware commands - installpkg: str = config['installpkg'] - reinstall: str = config['reinstall'] - removepkg: str = config['removepkg'] + installpkg: str = config['INSTALLPKG'] + reinstall: str = config['REINSTALL'] + removepkg: str = config['REMOVEPKG'] # Cli menu colors configs - colors: str = config['colors'] + colors: str = config['COLORS'] # Dialog utility - dialog: str = config['dialog'] + dialog: str = config['DIALOG'] # Downloader command - downloader: str = config['downloader'] + downloader: str = config['DOWNLOADER'] # Wget options - wget_options: str = config['wget_options'] + wget_options: str = config['WGET_OPTIONS'] # Curl options - curl_options: str = config['curl_options'] + curl_options: str = config['CURL_OPTIONS'] # Choose the view mode - silent_mode: str = config['silent_mode'] + silent_mode: bool = config['SILENT_MODE'] # Choose ascii characters. Extended or basic. - ascii_characters: str = config['ascii_characters'] + ascii_characters: bool = config['ASCII_CHARACTERS'] except KeyError as error: raise SystemExit(f"\nKeyError: {error}: in the configuration file '/etc/slpkg/slpkg.toml'.\n"