From 7375df5a2cf99477d7a5feda7401285a6eb51552 Mon Sep 17 00:00:00 2001 From: Pavel Muhortov Date: Sun, 3 Sep 2023 12:32:49 +0300 Subject: [PATCH] 'wwwhmptoday' source renamed to 'githmptoday' --- my_route.conf | 8 ++++---- my_route.py | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/my_route.conf b/my_route.conf index b61614e..f381ed8 100755 --- a/my_route.conf +++ b/my_route.conf @@ -59,13 +59,13 @@ ip2l_download_token = ip2location_TOKEN # - access to updates only by paid subscription ip2l_database_code = DB1CIDR # -# wwwhmptoday - it's compilation from all other sources (https://git.hmp.today/pavel.muhortov/my_route.db) +# githmptoday - it's compilation from all other sources (https://git.hmp.today/pavel.muhortov/my_route.db) # + all the benefits of other sources # + all lists ready to use # - you need account -wwwhmptoday = true -wwwhmptoday_user = username -wwwhmptoday_pass = password +githmptoday = true +githmptoday_user = username +githmptoday_pass = password [enable-gateway] diff --git a/my_route.py b/my_route.py index 6582da1..a97bbc0 100755 --- a/my_route.py +++ b/my_route.py @@ -452,8 +452,8 @@ class Route(Connect): force_download=force_download, logger_alias=logger_alias ) - elif name == 'wwwhmptoday': - return self.__update_source_wwwhmptoday( + elif name == 'githmptoday': + return self.__update_source_githmptoday( db_root_path=db_root_path, download_user=download_user, download_pass=download_pass, @@ -852,7 +852,7 @@ class Route(Connect): remove(db_source_file) return False - def __update_source_wwwhmptoday( + def __update_source_githmptoday( self, db_root_path: str, download_user: str, @@ -861,7 +861,7 @@ class Route(Connect): logger_alias: str = inspect.stack()[0].function ) -> bool: local_logger = logging.getLogger(logger_alias) - if Do.args_valid(locals(), self.__update_source_wwwhmptoday.__annotations__): + if Do.args_valid(locals(), self.__update_source_githmptoday.__annotations__): if not path.exists(db_root_path + sep + 'sources'): force_download = True if force_download: @@ -1030,12 +1030,12 @@ if __name__ == "__main__": enable_sources['ip2location']['db_source_code'] = ( conf_sources.data['ip2l_database_code'] ) - if 'wwwhmptoday' in enable_sources: - enable_sources['wwwhmptoday']['download_user'] = ( - conf_sources.data['wwwhmptoday_user'] + if 'githmptoday' in enable_sources: + enable_sources['githmptoday']['download_user'] = ( + conf_sources.data['githmptoday_user'] ) - enable_sources['wwwhmptoday']['download_pass'] = ( - conf_sources.data['wwwhmptoday_pass'] + enable_sources['githmptoday']['download_pass'] = ( + conf_sources.data['githmptoday_pass'] ) logging.basicConfig(