Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
refactor: better names for cli modules
NTFSvolume908a8afd6025
diff --git a/cyberdrop_dl/cli.py b/cyberdrop_dl/cli.pyindex 95d5b8493..7958d7969 100644--- a/cyberdrop_dl/cli.py+++ b/cyberdrop_dl/cli.py@@ -8,11 +8,10 @@ from cyclopts.help import DefaultFormatterfrom cyberdrop_dl import __version__from cyberdrop_dl.commands import CLIarguments-from cyberdrop_dl.commands.clean_up import app as cleanup-from cyberdrop_dl.commands.config import app as config-from cyberdrop_dl.commands.database import app as database+from cyberdrop_dl.commands.cleanup import app as cleanup_app+from cyberdrop_dl.commands.config import app as config_app+from cyberdrop_dl.commands.database import app as database_appfrom cyberdrop_dl.commands.hash import compute_hashes-from cyberdrop_dl.commands.report import reportfrom cyberdrop_dl.commands.scrape import download, prepare_manager, scrapeapp = App(@@ -51,13 +50,21 @@ def main_menu(@app.commanddef show() -> None:"""Show a list of all supported sites"""- from cyberdrop_dl import supported_sites+ from cyberdrop_dl.commands import supported_sitestable = supported_sites.as_rich_table()app.console.print(table)-for cmd in download, database, cleanup, report, config:+def report() -> None:+ """Generate and display information about the system"""+ from cyberdrop_dl.commands.report import generate_report++ app.console.print(generate_report())+++for cmd in download, database_app, cleanup_app, config_app:app.command(cmd)diff --git a/cyberdrop_dl/commands/compat.py b/cyberdrop_dl/commands/_compat.pysimilarity index 100%rename from cyberdrop_dl/commands/compat.pyrename to cyberdrop_dl/commands/_compat.pydiff --git a/cyberdrop_dl/commands/clean_up.py b/cyberdrop_dl/commands/cleanup.pysimilarity index 100%rename from cyberdrop_dl/commands/clean_up.pyrename to cyberdrop_dl/commands/cleanup.pydiff --git a/cyberdrop_dl/commands/hash.py b/cyberdrop_dl/commands/hash.pyindex 922d49d89..54fe16a8f 100644--- a/cyberdrop_dl/commands/hash.py+++ b/cyberdrop_dl/commands/hash.py@@ -3,7 +3,7 @@ from typing import Literalfrom cyclopts.types import ResolvedExistingDirectoryfrom cyberdrop_dl.commands import CLIarguments-from cyberdrop_dl.commands.compat import check_for_v9_files+from cyberdrop_dl.commands._compat import check_for_v9_filesfrom cyberdrop_dl.config import Configdiff --git a/cyberdrop_dl/commands/report.py b/cyberdrop_dl/commands/report.pyindex 56ad353b8..c1b945efd 100644--- a/cyberdrop_dl/commands/report.py+++ b/cyberdrop_dl/commands/report.py@@ -45,10 +45,5 @@ def generate_report() -> str:)-def report() -> None:- """Generate and display information about the system"""- print(generate_report()) # noqa: T201--if __name__ == "__main__":- report()+ print(generate_report()) # noqa: T201diff --git a/cyberdrop_dl/commands/scrape.py b/cyberdrop_dl/commands/scrape.pyindex 76f88e81d..28e9422bf 100644--- a/cyberdrop_dl/commands/scrape.py+++ b/cyberdrop_dl/commands/scrape.py@@ -9,7 +9,7 @@ from cyclopts import Parameterfrom cyclopts.group import Groupfrom cyberdrop_dl.commands import CLIarguments-from cyberdrop_dl.commands.compat import check_for_v9_files+from cyberdrop_dl.commands._compat import check_for_v9_filesfrom cyberdrop_dl.config import Configfrom cyberdrop_dl.config.appdata import AppDatafrom cyberdrop_dl.exceptions import CDLConfigRuntimeErrorsGroupdiff --git a/cyberdrop_dl/supported_sites.py b/cyberdrop_dl/commands/supported_sites.pysimilarity index 100%rename from cyberdrop_dl/supported_sites.pyrename to cyberdrop_dl/commands/supported_sites.pydiff --git a/scripts/tools/update_docs.py b/scripts/tools/update_docs.pyindex 79875ce5a..5e9e08f93 100644--- a/scripts/tools/update_docs.py+++ b/scripts/tools/update_docs.py@@ -1,6 +1,7 @@from pathlib import Path-from cyberdrop_dl import __version__, supported_sites+from cyberdrop_dl import __version__+from cyberdrop_dl.commands import supported_sitesfrom cyberdrop_dl.constants import CDL_USER_AGENTREPO_ROOT = Path(__file__).parents[2]@@ -43,7 +44,7 @@ def _replace_content(text: str, marker: str, new_content: str) -> str:def _get_help_message() -> str:from rich.console import Console- from cyberdrop_dl.__main__ import app+ from cyberdrop_dl.cli import appwith Console(record=True, width=100) as console:app.help_print([], console=console)diff --git a/tests/test_supported_sites.py b/tests/test_supported_sites.pyindex 1a55f0ae0..ae40cd864 100644--- a/tests/test_supported_sites.py+++ b/tests/test_supported_sites.py@@ -1,4 +1,4 @@-from cyberdrop_dl.supported_sites import as_markdown, as_rich_table+from cyberdrop_dl.commands.supported_sites import as_markdown, as_rich_tabledef test_rich_table() -> None: