mirror of
https://ghproxy.net/https://github.com/serpwings/static-wordpress.git
synced 2025-10-04 06:00:34 +08:00
fixed references in sub modules
This commit is contained in:
parent
fe56d35669
commit
faaa4deff5
10 changed files with 25 additions and 26 deletions
|
@ -38,7 +38,7 @@ from enum import Enum
|
|||
|
||||
VERSION_MAJOR = 0
|
||||
VERSION_MINOR = 0
|
||||
VERSION_REVISION = 4
|
||||
VERSION_REVISION = 5
|
||||
VERISON = f"{VERSION_MAJOR}.{VERSION_MINOR}.{VERSION_REVISION}"
|
||||
|
||||
SHARE_FOLDER_PATH = Path(
|
||||
|
|
|
@ -45,8 +45,8 @@ from requests.structures import CaseInsensitiveDict
|
|||
# INTERNAL IMPORTS
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
from .utils import get_mock_response, get_remote_content, get_clean_url
|
||||
from .constants import CONFIGS, URL, LINK_REGEX
|
||||
from ..core.utils import get_mock_response, get_remote_content, get_clean_url
|
||||
from ..core.constants import CONFIGS, URL, LINK_REGEX
|
||||
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# IMPLEMENATIONS
|
||||
|
|
|
@ -29,5 +29,5 @@ specific language governing rights and limitations under the License.
|
|||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
class SerpWingsResponseNotValid(Exception):
|
||||
class ResponseNotValid(Exception):
|
||||
pass
|
||||
|
|
|
@ -27,9 +27,9 @@ specific language governing rights and limitations under the License.
|
|||
# STANDARD LIBARY IMPORTS
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
import logging
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
import logging
|
||||
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# 3rd PARTY LIBRARY IMPORTS
|
||||
|
|
|
@ -34,7 +34,7 @@ from pathlib import Path
|
|||
# INTERNAL IMPORTS
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
from .constants import LANGUAGES, CONFIGS
|
||||
from ..core.constants import LANGUAGES, CONFIGS
|
||||
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# IMPLEMENATIONS
|
||||
|
|
|
@ -39,14 +39,14 @@ from pathlib import Path, PosixPath, WindowsPath
|
|||
# INTERNAL IMPORTS
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
from .constants import (
|
||||
from ..core.constants import (
|
||||
PROJECT,
|
||||
REDIRECTS,
|
||||
HOST,
|
||||
SOURCE,
|
||||
USER_AGENT,
|
||||
CONFIGS,
|
||||
VERISON,
|
||||
USER_AGENT,
|
||||
LINK_REGEX,
|
||||
)
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ import logging
|
|||
# INTERNAL IMPORTS
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
from .constants import HOST, REDIRECTS
|
||||
from .errors import SerpWingsResponseNotValid
|
||||
from ..core.constants import HOST, REDIRECTS
|
||||
from ..core.errors import ResponseNotValid
|
||||
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# IMPLEMENATIONS
|
||||
|
@ -107,7 +107,7 @@ class Redirects:
|
|||
)
|
||||
|
||||
if wp_api_response.status_code >= 400:
|
||||
raise SerpWingsResponseNotValid
|
||||
raise ResponseNotValid
|
||||
|
||||
redirects_as_dict = json.loads(wp_api_response.content)
|
||||
|
||||
|
@ -122,7 +122,7 @@ class Redirects:
|
|||
source_=REDIRECTS.REDIRECTION.value,
|
||||
)
|
||||
)
|
||||
except SerpWingsResponseNotValid:
|
||||
except ResponseNotValid:
|
||||
logging.info(
|
||||
f"Redirects are not valid. Make sure that redirection plug is properly configured."
|
||||
)
|
||||
|
|
|
@ -40,8 +40,8 @@ from bs4 import BeautifulSoup
|
|||
# INTERNAL IMPORTS
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
from .utils import get_clean_url, get_remote_content
|
||||
from .constants import CONFIGS
|
||||
from ..core.utils import get_clean_url, get_remote_content
|
||||
from ..core.constants import CONFIGS
|
||||
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# IMPLEMENATIONS
|
||||
|
|
|
@ -46,14 +46,14 @@ from bs4 import BeautifulSoup
|
|||
# INTERNAL IMPORTS
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
from .search import Search
|
||||
from .github import GitHub
|
||||
from .crawler import Crawler
|
||||
from .project import Project
|
||||
from .redirects import Redirects
|
||||
from .sitemaps import find_sitemap_location, extract_sitemap_paths
|
||||
from .utils import extract_zip_file, rm_dir_tree, update_links
|
||||
from .constants import (
|
||||
from ..core.search import Search
|
||||
from ..core.github import GitHub
|
||||
from ..core.crawler import Crawler
|
||||
from ..core.project import Project
|
||||
from ..core.redirects import Redirects
|
||||
from ..core.sitemaps import find_sitemap_location, extract_sitemap_paths
|
||||
from ..core.utils import extract_zip_file, rm_dir_tree, update_links
|
||||
from ..core.constants import (
|
||||
CONFIGS,
|
||||
SHARE_FOLDER_PATH,
|
||||
URL,
|
||||
|
@ -101,10 +101,10 @@ class Workflow:
|
|||
host_type_: HOST = HOST.NETLIFY,
|
||||
) -> None:
|
||||
self._project.status = PROJECT.NEW
|
||||
|
||||
|
||||
if src_type_ == SOURCE.ZIP:
|
||||
self._project.redirects = REDIRECTS.REDIRECTION
|
||||
|
||||
|
||||
self._project.name = project_name_
|
||||
self._project.path = project_path_
|
||||
self._project._404 = custom_404_
|
||||
|
|
|
@ -40,7 +40,6 @@ from datetime import date
|
|||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
from PyQt5.QtWidgets import (
|
||||
QLineEdit,
|
||||
QMainWindow,
|
||||
QAction,
|
||||
QApplication,
|
||||
|
@ -70,7 +69,7 @@ from ..core.utils import (
|
|||
get_remote_content,
|
||||
extract_urls_from_raw_text,
|
||||
)
|
||||
from .workflow import WorkflowGUI
|
||||
from ..gui.workflow import WorkflowGUI
|
||||
from ..gui.logger import LoggerWidget
|
||||
from ..gui.rawtext import RawTextDialog
|
||||
from ..gui.config import ConfigDialog
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue