Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
refactor: show version, docs and repo on --help
NTFSvolume6319cc76468e
diff --git a/cyberdrop_dl/cli.py b/cyberdrop_dl/cli.pyindex ac25b17cc..e1f89c289 100644--- a/cyberdrop_dl/cli.py+++ b/cyberdrop_dl/cli.py@@ -17,13 +17,21 @@ from cyberdrop_dl.commands.retry import app as retry_appfrom cyberdrop_dl.commands.retry import create_retry_sourcefrom cyberdrop_dl.commands.scrape import download, prepare_manager, scrapefrom cyberdrop_dl.constants import DEFAULT_PARAMETER+from cyberdrop_dl.progress import hyperlinkfrom cyberdrop_dl.scrape_source import RetryScrapeSource, RetrySourceapp = App(name="cyberdrop-dl",- help="Bulk asynchronous downloader for multiple file hosts",version=__version__,default_parameter=DEFAULT_PARAMETER,+ help_prologue=f"cyberdrop-dl [blue]v{__version__}[/blue]\nBulk [cyan]asynchronous[/cyan] downloader for multiple file hosts",+ help_format="rich",+ help_epilogue="\n".join(+ (+ f"Github: {hyperlink('https://github.com/Cyberdrop-DL/cyberdrop-dl').markup}",+ f"Wiki (docs): {hyperlink('https://script-ware.gitbook.io/cyberdrop-dl').markup}",+ )+ ),result_action="return_value",help_formatter=DefaultFormatter().with_newline_metadata(), # pyright: ignore[reportUnknownMemberType])@@ -44,7 +52,7 @@ def main_menu(] = Path("URLs.txt"), # pyright: ignore[reportCallInDefaultInitializer]cli_args: CLIarguments | None = None,) -> None:- "Show a TUI menu equivalent to the CLI commands"+ "Run [cyan]'cyberdrop-dl'[/cyan] without arguments to start the interactive TUI"input_file = input_file.resolve().absolute()with prepare_manager(cli_args, cli_overrides=None)() as manager:from cyberdrop_dl import program_uidiff --git a/cyberdrop_dl/progress/__init__.py b/cyberdrop_dl/progress/__init__.pyindex 23455a675..63654e20c 100644--- a/cyberdrop_dl/progress/__init__.py+++ b/cyberdrop_dl/progress/__init__.py@@ -87,12 +87,13 @@ def create_test_live(renderable: JsonableRenderableType, *, transient: bool = Fa)-def hyperlink(file_path: Path, text: str | None = None) -> Text:+def hyperlink(file_path: Path | str, text: str | None = None) -> Text:from rich.markup import escapefrom rich.text import Texttext = escape(text or str(file_path))- return Text.from_markup(f"[link={file_path.as_uri()}]{text}[/link]", style="blue")+ link = file_path if isinstance(file_path, str) else file_path.as_uri()+ return Text.from_markup(f"[link={link}]{text}[/link]", style="blue")class DictProgress(Progress):