Updated for messages

This commit is contained in:
Dimitris Zlatanidis 2023-05-01 09:38:10 +03:00
parent 34d36bfc43
commit d94fde456a

View file

@ -85,8 +85,8 @@ class UpdateRepository(Configs):
print()
def slack_repository(self):
print(f"Downloading the '{self.green}{self.repos.slack_repo_name}{self.endc}"
f"' repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.slack_repo_name}{self.endc}' repository "
f"in the '{self.repos.slack_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.slack_repo_path)
@ -116,8 +116,8 @@ class UpdateRepository(Configs):
print()
def slack_extra_repository(self):
print(f"Downloading the '{self.green}{self.repos.slack_extra_repo_name}{self.endc}"
f"' repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.slack_extra_repo_name}{self.endc}' repository "
f"in the '{self.repos.slack_extra_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.slack_extra_repo_path)
@ -149,8 +149,8 @@ class UpdateRepository(Configs):
print()
def slack_patches_repository(self):
print(f"Downloading the '{self.green}{self.repos.slack_patches_repo_name}{self.endc}"
f"' repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.slack_patches_repo_name}{self.endc}' repository "
f"in the '{self.repos.slack_patches_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.slack_patches_repo_path)
@ -184,8 +184,8 @@ class UpdateRepository(Configs):
print()
def alien_repository(self):
print(f"Downloading the '{self.green}{self.repos.alien_repo_name}{self.endc}' "
f"repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.alien_repo_name}{self.endc}' repository "
f"in the '{self.repos.alien_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.alien_repo_path)
@ -216,8 +216,8 @@ class UpdateRepository(Configs):
print()
def multilib_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.multilib_repo_name}{self.endc}' "
f"repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.multilib_repo_name}{self.endc}' repository "
f"in the '{self.repos.multilib_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.multilib_repo_path)
@ -248,8 +248,8 @@ class UpdateRepository(Configs):
print()
def restricted_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.restricted_repo_name}{self.endc}' "
f"repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.restricted_repo_name}{self.endc}' repository "
f"in the '{self.repos.restricted_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.restricted_repo_path)
@ -280,8 +280,8 @@ class UpdateRepository(Configs):
print()
def gnome_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.gnome_repo_name}{self.endc}' "
f"repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.gnome_repo_name}{self.endc}' repository "
f"in the '{self.repos.gnome_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.gnome_repo_path)
@ -311,8 +311,8 @@ class UpdateRepository(Configs):
print()
def msb_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.msb_repo_name}{self.endc}' "
f"repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.msb_repo_name}{self.endc}' repository "
f"in the '{self.repos.msb_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.msb_repo_path)
@ -343,8 +343,8 @@ class UpdateRepository(Configs):
print()
def csb_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.csb_repo_name}{self.endc}' "
f"repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.csb_repo_name}{self.endc}' repository "
f"in the '{self.repos.csb_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.csb_repo_path)
@ -374,8 +374,8 @@ class UpdateRepository(Configs):
print()
def conraid_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.conraid_repo_name}{self.endc}' "
f"repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.conraid_repo_name}{self.endc}' repository "
f"in the '{self.repos.conraid_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.conraid_repo_path)
@ -406,8 +406,8 @@ class UpdateRepository(Configs):
def slackonly_repository(self) -> None:
if not self.repos.slackonly_repo_mirror[0].startswith('file'):
print(f"Downloading the '{self.green}{self.repos.slackonly_repo_name}{self.endc}' "
f"repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.slackonly_repo_name}{self.endc}' repository "
f"in the '{self.repos.slackonly_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.slackonly_repo_path)
@ -437,8 +437,8 @@ class UpdateRepository(Configs):
print()
def salixos_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.salixos_repo_name}{self.endc}' "
f"repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.salixos_repo_name}{self.endc}' repository "
f"in the '{self.repos.salixos_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.salixos_repo_path)
@ -468,8 +468,8 @@ class UpdateRepository(Configs):
print()
def salixos_extra_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.salixos_extra_repo_name}{self.endc}' "
f"repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.salixos_extra_repo_name}{self.endc}' repository "
f"in the '{self.repos.salixos_extra_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.salixos_extra_repo_path)
@ -503,8 +503,8 @@ class UpdateRepository(Configs):
print()
def salixos_patches_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.salixos_patches_repo_name}{self.endc}' "
f"repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.salixos_patches_repo_name}{self.endc}' repository "
f"in the '{self.repos.salixos_patches_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.slack_patches_repo_path)
@ -540,8 +540,8 @@ class UpdateRepository(Configs):
print()
def slackel_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.slackel_repo_name}{self.endc}' "
f"repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.slackel_repo_name}{self.endc}' repository "
f"in the '{self.repos.slackel_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.slackel_repo_path)
@ -571,8 +571,8 @@ class UpdateRepository(Configs):
print()
def slint_repository(self) -> None:
print(f"Downloading the '{self.green}{self.repos.slint_repo_name}{self.endc}' "
f"repository, please wait...\n")
print(f"Downloading the '{self.green}{self.repos.slint_repo_name}{self.endc}' repository "
f"in the '{self.repos.slint_repo_path}' folder, please wait...\n")
urls: list = []
self.utils.create_directory(self.repos.slint_repo_path)
@ -604,10 +604,9 @@ class UpdateRepository(Configs):
def slackbuild_repositories(self) -> None:
""" Update the slackbuild repositories. """
if self.repos.ponce_repo:
if not self.option_for_generate or self.repos.ponce_repo_mirror[0].startswith('file'):
print(f"Downloading the '{self.green}{self.repos.ponce_repo_name}"
f"{self.endc}' repository, please wait...\n")
if not self.option_for_generate:
print(f"Downloading the '{self.green}{self.repos.ponce_repo_name}{self.endc}' repository "
f"in the '{self.repos.ponce_repo_path}' folder, please wait...\n")
self.utils.create_directory(self.repos.ponce_repo_path)
self.utils.remove_file_if_exists(self.repos.ponce_repo_path, self.repos.ponce_repo_slackbuilds)
@ -634,20 +633,18 @@ class UpdateRepository(Configs):
print('\n')
else:
print(f"Downloading the '{self.green}{self.repos.sbo_repo_name}{self.endc}' repository "
f"in the '{self.repos.sbo_repo_path}' folder, please wait...\n")
if not self.repos.sbo_repo_mirror[0].startswith('file'):
print(f"Downloading the '{self.green}{self.repos.sbo_repo_name}{self.endc}' "
f"repository, please wait...\n")
self.utils.create_directory(self.repos.sbo_repo_path)
self.utils.create_directory(self.repos.sbo_repo_path)
self.utils.remove_file_if_exists(self.repos.sbo_repo_path, self.repos.sbo_repo_slackbuilds)
self.utils.remove_file_if_exists(self.repos.sbo_repo_path, self.repos.sbo_repo_changelog)
self.utils.remove_file_if_exists(self.repos.sbo_repo_path, self.repos.sbo_repo_slackbuilds)
self.utils.remove_file_if_exists(self.repos.sbo_repo_path, self.repos.sbo_repo_changelog)
lftp_command: str = (f'lftp {self.lftp_mirror_options} {self.repos.sbo_repo_mirror[0]} '
f'{self.repos.sbo_repo_path}')
lftp_command: str = (f'lftp {self.lftp_mirror_options} {self.repos.sbo_repo_mirror[0]} '
f'{self.repos.sbo_repo_path}')
self.utils.process(lftp_command)
self.utils.process(lftp_command)
self.delete_last_updated(self.repos.sbo_repo_name)
self.delete_sbo_database_data()