Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Licensing Information #68

Merged
merged 5 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ markdown_extensions:

theme: readthedocs

copyright: © Copyright 2024 SERP Wings
copyright: © Copyright 2025 SERP Wings
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/__init__.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/cli/__init__.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/core/__init__.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/core/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/core/constants.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/core/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/core/crawler.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/core/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src\staticwordpress\core\errors.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
18 changes: 9 additions & 9 deletions src/staticwordpress/core/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/core/github.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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.!")
2 changes: 1 addition & 1 deletion src/staticwordpress/core/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/core/i18n.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
4 changes: 2 additions & 2 deletions src/staticwordpress/core/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/core/project.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down Expand Up @@ -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_
Expand Down
4 changes: 2 additions & 2 deletions src/staticwordpress/core/redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/core/redirects.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down Expand Up @@ -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:
Expand Down
10 changes: 6 additions & 4 deletions src/staticwordpress/core/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/core/search.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down Expand Up @@ -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,
}
)
Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/core/sitemaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/core/sitemaps.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/core/utils.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
18 changes: 9 additions & 9 deletions src/staticwordpress/core/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/core/workflow.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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"],
Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/gui/__init__.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/gui/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/gui/config.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/gui/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src\staticwordpress\gui\editor.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/gui/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/gui/logger.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
10 changes: 5 additions & 5 deletions src/staticwordpress/gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/gui/mainwindow.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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"<br>Please try again with project folder.",
message_="Project cannot be opened or selected path invalid."
"<br>Please try again with project folder.",
)
message_box.exec()

Expand All @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/gui/messagebox.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src\staticwordpress\gui\messagebox.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
4 changes: 2 additions & 2 deletions src/staticwordpress/gui/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src\staticwordpress\gui\project.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/gui/rawtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

src/staticwordpress/gui/rawtext.py

Copyright (C) 2020-2024 Faisal Shahzad <info@serpwings.com>
Copyright (C) 2020-2025 Faisal Shahzad <info@serpwings.com>

<LICENSE_BLOCK>
The contents of this file are subject to version 3 of the
Expand Down
Loading
Loading