Loading pyproject.toml +1 −3 Changes for pyproject.toml: 1 added line, 3 removed lines. Original line number Diff line number Diff line Loading @@ -13,9 +13,7 @@ dependencies = [ "beautifulsoup4>=4.12.3", "lxml>=5.3.0", "lxml-html-clean>=0.2.2", "six>=1.16.0", "msgpack>=1.1.0", "cachecontrol>=0.14.0", "geler-certic>=0.1.1", ] readme = "README.md" requires-python = ">= 3.12" Loading src/climax/__main__.py +6 −10 Changes for src/climax/__main__.py: 6 added lines, 10 removed lines. Original line number Diff line number Diff line Loading @@ -4,9 +4,8 @@ from typing import Optional, Union from typing_extensions import Annotated import gettext from bs4 import BeautifulSoup from pywebcopy import save_website from pywebcopy.configs import default_config as pywebcopy_config from .eggs import get_yolk from geler import freeze locales_dir = Path(__file__).parent / "locales" gettext.bindtextdomain("messages", str(locales_dir)) Loading Loading @@ -231,8 +230,12 @@ def cached_download( if response.status_code != 200: print("[red]{}[/red] {}".format(_("Impossible de télécharger"), source)) raise typer.Exit(code=1) try: total_size = int(response.headers["Content-length"]) seq_len = total_size // chunk_size except KeyError: # missing Content-length seq_len = 100 with open(cache_path, "wb") as f: for data in track( response.iter_content(chunk_size=chunk_size), Loading Loading @@ -631,18 +634,11 @@ def mirror( stop_port = port_number + 1 start(WEB_HOST, port_number, http_stop_port=stop_port, service=True) # copy website pywebcopy_config["encoding"] = "utf-8" try: # for lang in config.languages: # start_url = f"http://localhost:{port_number}/{lang}/tdm.html" start_url = f"http://localhost:{port_number}/" save_website( url=start_url, project_folder=str(directory), project_name=config.title, threaded=False, debug=debug, ) freeze(start_url, directory) except Exception as e: stop(stop_port) raise e Loading src/pywebcopy/__init__.py −172 File deleted. Show changes src/pywebcopy/__main__.py −121 File deleted. Show changes src/pywebcopy/__version__.py −9 File deleted. Show changes Loading
pyproject.toml +1 −3 Changes for pyproject.toml: 1 added line, 3 removed lines. Original line number Diff line number Diff line Loading @@ -13,9 +13,7 @@ dependencies = [ "beautifulsoup4>=4.12.3", "lxml>=5.3.0", "lxml-html-clean>=0.2.2", "six>=1.16.0", "msgpack>=1.1.0", "cachecontrol>=0.14.0", "geler-certic>=0.1.1", ] readme = "README.md" requires-python = ">= 3.12" Loading
src/climax/__main__.py +6 −10 Changes for src/climax/__main__.py: 6 added lines, 10 removed lines. Original line number Diff line number Diff line Loading @@ -4,9 +4,8 @@ from typing import Optional, Union from typing_extensions import Annotated import gettext from bs4 import BeautifulSoup from pywebcopy import save_website from pywebcopy.configs import default_config as pywebcopy_config from .eggs import get_yolk from geler import freeze locales_dir = Path(__file__).parent / "locales" gettext.bindtextdomain("messages", str(locales_dir)) Loading Loading @@ -231,8 +230,12 @@ def cached_download( if response.status_code != 200: print("[red]{}[/red] {}".format(_("Impossible de télécharger"), source)) raise typer.Exit(code=1) try: total_size = int(response.headers["Content-length"]) seq_len = total_size // chunk_size except KeyError: # missing Content-length seq_len = 100 with open(cache_path, "wb") as f: for data in track( response.iter_content(chunk_size=chunk_size), Loading Loading @@ -631,18 +634,11 @@ def mirror( stop_port = port_number + 1 start(WEB_HOST, port_number, http_stop_port=stop_port, service=True) # copy website pywebcopy_config["encoding"] = "utf-8" try: # for lang in config.languages: # start_url = f"http://localhost:{port_number}/{lang}/tdm.html" start_url = f"http://localhost:{port_number}/" save_website( url=start_url, project_folder=str(directory), project_name=config.title, threaded=False, debug=debug, ) freeze(start_url, directory) except Exception as e: stop(stop_port) raise e Loading