diff --git a/mkdocs.yml b/mkdocs.yml index 91d258c..0bd59f9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -26,4 +26,4 @@ markdown_extensions: theme: readthedocs -copyright: © Copyright 2024 SERP Wings \ No newline at end of file +copyright: © Copyright 2025 SERP Wings \ No newline at end of file diff --git a/setup.py b/setup.py index 910db25..bb16fc7 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/__init__.py b/src/staticwordpress/__init__.py index 75f7cb2..5576d3a 100644 --- a/src/staticwordpress/__init__.py +++ b/src/staticwordpress/__init__.py @@ -7,7 +7,7 @@ src/staticwordpress/__init__.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/cli/__init__.py b/src/staticwordpress/cli/__init__.py index 7c08f18..648760e 100644 --- a/src/staticwordpress/cli/__init__.py +++ b/src/staticwordpress/cli/__init__.py @@ -7,7 +7,7 @@ src/staticwordpress/cli/__init__.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/core/__init__.py b/src/staticwordpress/core/__init__.py index 4cedabd..8778841 100644 --- a/src/staticwordpress/core/__init__.py +++ b/src/staticwordpress/core/__init__.py @@ -7,7 +7,7 @@ src/staticwordpress/core/__init__.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/core/constants.py b/src/staticwordpress/core/constants.py index ea3a61a..6e23fe2 100644 --- a/src/staticwordpress/core/constants.py +++ b/src/staticwordpress/core/constants.py @@ -7,7 +7,7 @@ src/staticwordpress/core/constants.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/core/crawler.py b/src/staticwordpress/core/crawler.py index c1e4d48..3ba83db 100644 --- a/src/staticwordpress/core/crawler.py +++ b/src/staticwordpress/core/crawler.py @@ -7,7 +7,7 @@ src/staticwordpress/core/crawler.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/core/errors.py b/src/staticwordpress/core/errors.py index 4c0fdb3..a274626 100644 --- a/src/staticwordpress/core/errors.py +++ b/src/staticwordpress/core/errors.py @@ -7,7 +7,7 @@ src\staticwordpress\core\errors.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/core/github.py b/src/staticwordpress/core/github.py index 8478a31..ae5ffff 100644 --- a/src/staticwordpress/core/github.py +++ b/src/staticwordpress/core/github.py @@ -7,7 +7,7 @@ src/staticwordpress/core/github.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the @@ -82,12 +82,12 @@ def inner(self): @check_gh_token def is_token_valid(self) -> bool: - logging.info(f"Verifying Github Token.") + logging.info("Verifying Github Token.") return self._gh_object.get_user().name != "" @check_gh_token def is_repo_valid(self) -> bool: - logging.info(f"Verifying Github Repository.") + logging.info("Verifying Github Repository.") return self._gh_object.get_user().get_repo(self._gh_repo) is not None @check_gh_token @@ -116,7 +116,7 @@ def delete(self) -> None: def initialize(self) -> None: """init repoinit repo""" logging.info( - f"Initializing Git Repository - Orgins to GitHub will be set automatically" + "Initializing Git Repository - Orgins to GitHub will be set automatically" ) login = self._gh_object.get_user().login @@ -134,25 +134,25 @@ def initialize(self) -> None: assert origin.exists() - logging.info(f"Updating Local Copy of Git Repository") + logging.info("Updating Local Copy of Git Repository") origin.fetch() @check_repo_dir def commit(self) -> None: """commit to local repository""" - logging.info(f"Start Committing Changes to Local Repository") + logging.info("Start Committing Changes to Local Repository") now = datetime.now() date_time = now.strftime("%Y-%m-%d, %H:%M:%S") self._repo.git.add("--all") self._repo.index.commit(f"{date_time}: Update using static-wordpress software") - logging.info(f"All Changes Committed to Local Repository") + logging.info("All Changes Committed to Local Repository") @check_repo_dir def publish(self): """publish to github""" self._repo.create_head("main") if self._repo.remotes: - logging.info(f"Pushing Repository Changes to GitHub!") + logging.info("Pushing Repository Changes to GitHub!") self._repo.remotes[0].push("main") else: - logging.error(f"Pushing Remote Repository on GitHub Failed.!") + logging.error("Pushing Remote Repository on GitHub Failed.!") diff --git a/src/staticwordpress/core/i18n.py b/src/staticwordpress/core/i18n.py index 15da28e..a8863ac 100644 --- a/src/staticwordpress/core/i18n.py +++ b/src/staticwordpress/core/i18n.py @@ -7,7 +7,7 @@ src/staticwordpress/core/i18n.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/core/project.py b/src/staticwordpress/core/project.py index 20ca02f..14487a6 100644 --- a/src/staticwordpress/core/project.py +++ b/src/staticwordpress/core/project.py @@ -7,7 +7,7 @@ src/staticwordpress/core/project.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the @@ -62,7 +62,7 @@ def __init__(self, path_: str = None) -> None: if isinstance(path_, str): path_ = Path(path_) - assert type(path_) == PosixPath or type(path_) == WindowsPath or path_ == None + assert type(path_) == PosixPath or type(path_) == WindowsPath or path_ is None self["version"] = VERISON self["path"] = path_ diff --git a/src/staticwordpress/core/redirects.py b/src/staticwordpress/core/redirects.py index e996049..03b7c82 100644 --- a/src/staticwordpress/core/redirects.py +++ b/src/staticwordpress/core/redirects.py @@ -7,7 +7,7 @@ src/staticwordpress/core/redirects.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the @@ -137,7 +137,7 @@ def get_from_plugin(self, redirects_api_path_: str, wp_auth_token_: str) -> None ) except ResponseNotValid: logging.info( - f"Redirects are not valid. Make sure that redirection plug is properly configured." + "Redirects are not valid. Make sure that redirection plug is properly configured." ) def add_search(self, search_page_: str) -> None: diff --git a/src/staticwordpress/core/search.py b/src/staticwordpress/core/search.py index 944f145..7550964 100644 --- a/src/staticwordpress/core/search.py +++ b/src/staticwordpress/core/search.py @@ -7,7 +7,7 @@ src/staticwordpress/core/search.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the @@ -142,9 +142,11 @@ def add(self, soup_: BeautifulSoup, url_path_: str) -> None: self._search_index.append( { "title": title.string, - "content": search_text - if CONFIGS["SEARCH"]["INCLUDE"]["CONTENT"] - else title.string, + "content": ( + search_text + if CONFIGS["SEARCH"]["INCLUDE"]["CONTENT"] + else title.string + ), "href": clean_url, } ) diff --git a/src/staticwordpress/core/sitemaps.py b/src/staticwordpress/core/sitemaps.py index 9c68427..1bfc56b 100644 --- a/src/staticwordpress/core/sitemaps.py +++ b/src/staticwordpress/core/sitemaps.py @@ -7,7 +7,7 @@ src/staticwordpress/core/sitemaps.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/core/utils.py b/src/staticwordpress/core/utils.py index 1675bf9..17fc813 100644 --- a/src/staticwordpress/core/utils.py +++ b/src/staticwordpress/core/utils.py @@ -7,7 +7,7 @@ src/staticwordpress/core/utils.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/core/workflow.py b/src/staticwordpress/core/workflow.py index 45a1dc8..72721a5 100644 --- a/src/staticwordpress/core/workflow.py +++ b/src/staticwordpress/core/workflow.py @@ -7,7 +7,7 @@ src/staticwordpress/core/workflow.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the @@ -182,11 +182,11 @@ def set_project(self, project_: Project) -> None: def start_calculations(self) -> None: self._keep_running = True - logging.warn(f"Background Processings is Starting") + logging.warn("Background Processings is Starting") def stop_calculations(self) -> None: self._keep_running = False - logging.warn(f"Background Processings will Stop. Please wait!") + logging.warn("Background Processings will Stop. Please wait!") def download_zip_file(self) -> None: if self._keep_running: @@ -341,22 +341,22 @@ def crawl_url(self, loc_: str) -> None: # Project Verifications def verify_project_name(self) -> bool: - logging.info(f"Verifying Project Name!") + logging.info("Verifying Project Name!") return self._project.name != "" def verify_src_url(self) -> bool: - logging.info(f"Verifying Source Url!") + logging.info("Verifying Source Url!") # TODO: replace with urllib implementation ??? current_url = Crawler(loc_=self._project.src_url, scheme_=self._project.scheme) current_url.fetch() return current_url.status_code < 399 # non error status codes def verify_output(self) -> bool: - logging.info(f"Verifying Output Folder!") + logging.info("Verifying Output Folder!") return self._project.output.exists() def verify_wp_user(self) -> bool: - logging.info(f"Verifying WordPress User Name!") + logging.info("Verifying WordPress User Name!") response = requests.get( self._project.redirects_api_url, @@ -365,7 +365,7 @@ def verify_wp_user(self) -> bool: return response.status_code < 399 def verify_sitemap(self) -> bool: - logging.info(f"Verifying Sitemap!") + logging.info("Verifying Sitemap!") response = requests.get( self._project.sitemap_url, @@ -380,7 +380,7 @@ def verify_github_repo(self) -> bool: return self._github.is_repo_valid() def verify_simply_static(self): - logging.info(f"Verifying simply static plugin!") + logging.info("Verifying simply static plugin!") response = requests.get( self._project.src_url + CONFIGS["SIMPLYSTATIC"]["API"], diff --git a/src/staticwordpress/gui/__init__.py b/src/staticwordpress/gui/__init__.py index f2e755f..907cad7 100644 --- a/src/staticwordpress/gui/__init__.py +++ b/src/staticwordpress/gui/__init__.py @@ -7,7 +7,7 @@ src/staticwordpress/gui/__init__.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/gui/config.py b/src/staticwordpress/gui/config.py index d651963..937e432 100644 --- a/src/staticwordpress/gui/config.py +++ b/src/staticwordpress/gui/config.py @@ -7,7 +7,7 @@ src/staticwordpress/gui/config.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/gui/editor.py b/src/staticwordpress/gui/editor.py index 5a2cce8..5d87a34 100644 --- a/src/staticwordpress/gui/editor.py +++ b/src/staticwordpress/gui/editor.py @@ -7,7 +7,7 @@ src\staticwordpress\gui\editor.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/gui/logger.py b/src/staticwordpress/gui/logger.py index 281ec5b..4c8c8bd 100644 --- a/src/staticwordpress/gui/logger.py +++ b/src/staticwordpress/gui/logger.py @@ -7,7 +7,7 @@ src/staticwordpress/gui/logger.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/gui/main.py b/src/staticwordpress/gui/main.py index df71d41..114836f 100644 --- a/src/staticwordpress/gui/main.py +++ b/src/staticwordpress/gui/main.py @@ -7,7 +7,7 @@ src/staticwordpress/gui/mainwindow.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the @@ -300,7 +300,7 @@ def extract_url_from_raw_text(self): @logging_decorator def clear_crawl_cache(self): """Clearing Crawl Cache""" - logging.info(f"Clearing Crawl Cache") + logging.info("Clearing Crawl Cache") get_remote_content.cache_clear() def closeEvent(self, event): @@ -508,8 +508,8 @@ def open_project(self): message_box = SWMessageBox( parent=self, title_="Open Project", - message_=f"Project cannot be opened or selected path invalid." - f"
Please try again with project folder.", + message_="Project cannot be opened or selected path invalid." + "
Please try again with project folder.", ) message_box.exec() @@ -535,7 +535,7 @@ def show_project_settings(self): message_box = SWMessageBox( parent=self, title_="Project Settings", - message_=f"No Project Available.", + message_="No Project Available.", ) message_box.exec() diff --git a/src/staticwordpress/gui/messagebox.py b/src/staticwordpress/gui/messagebox.py index 3dc776c..7d9eb59 100644 --- a/src/staticwordpress/gui/messagebox.py +++ b/src/staticwordpress/gui/messagebox.py @@ -7,7 +7,7 @@ src\staticwordpress\gui\messagebox.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/gui/project.py b/src/staticwordpress/gui/project.py index 1fd1615..2287e9e 100644 --- a/src/staticwordpress/gui/project.py +++ b/src/staticwordpress/gui/project.py @@ -7,7 +7,7 @@ src\staticwordpress\gui\project.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the @@ -523,7 +523,7 @@ def accept(self) -> None: self._project.save() return super().accept() else: - logging.info(f"Current Project Settings are not valid.") + logging.info("Current Project Settings are not valid.") message_box = QMessageBox(parent=self) message_box.setText( diff --git a/src/staticwordpress/gui/rawtext.py b/src/staticwordpress/gui/rawtext.py index bd99756..7602ba0 100644 --- a/src/staticwordpress/gui/rawtext.py +++ b/src/staticwordpress/gui/rawtext.py @@ -7,7 +7,7 @@ src/staticwordpress/gui/rawtext.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/gui/table.py b/src/staticwordpress/gui/table.py index 2b20595..54ba328 100644 --- a/src/staticwordpress/gui/table.py +++ b/src/staticwordpress/gui/table.py @@ -7,7 +7,7 @@ src\staticwordpress\gui\table.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/gui/utils.py b/src/staticwordpress/gui/utils.py index 6100925..3497e7c 100644 --- a/src/staticwordpress/gui/utils.py +++ b/src/staticwordpress/gui/utils.py @@ -7,7 +7,7 @@ src/staticwordpress/gui/utils.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/src/staticwordpress/gui/workflow.py b/src/staticwordpress/gui/workflow.py index a59d7e7..e78aa29 100644 --- a/src/staticwordpress/gui/workflow.py +++ b/src/staticwordpress/gui/workflow.py @@ -7,7 +7,7 @@ src/staticwordpress/gui/workflow.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/ss_script.py b/ss_script.py index 6d4e2fb..942ced6 100644 --- a/ss_script.py +++ b/ss_script.py @@ -7,7 +7,7 @@ ss_script.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/tests/test_project.py b/tests/test_project.py index c2c31d3..61ad4ff 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -7,7 +7,7 @@ tests\test_project.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/tests/test_redirects.py b/tests/test_redirects.py index 6d356b5..b384a17 100644 --- a/tests/test_redirects.py +++ b/tests/test_redirects.py @@ -7,7 +7,7 @@ tests\test_redirects.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/tests/test_translations.py b/tests/test_translations.py index d112f0d..f537b3f 100644 --- a/tests/test_translations.py +++ b/tests/test_translations.py @@ -7,7 +7,7 @@ tests\test_translations.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the diff --git a/tests/test_url.py b/tests/test_url.py index 072c52a..ee147f5 100644 --- a/tests/test_url.py +++ b/tests/test_url.py @@ -7,7 +7,7 @@ tests\test_url.py - Copyright (C) 2020-2024 Faisal Shahzad + Copyright (C) 2020-2025 Faisal Shahzad The contents of this file are subject to version 3 of the