pywget 2.0.7__tar.gz → 2.0.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {pywget-2.0.7/pywget.egg-info → pywget-2.0.9}/PKG-INFO +1 -1
  2. {pywget-2.0.7 → pywget-2.0.9}/pyproject.toml +1 -1
  3. {pywget-2.0.7 → pywget-2.0.9}/pywget/cli.py +36 -4
  4. {pywget-2.0.7 → pywget-2.0.9/pywget.egg-info}/PKG-INFO +1 -1
  5. {pywget-2.0.7 → pywget-2.0.9}/LICENSE +0 -0
  6. {pywget-2.0.7 → pywget-2.0.9}/README.md +0 -0
  7. {pywget-2.0.7 → pywget-2.0.9}/pywget/__init__.py +0 -0
  8. {pywget-2.0.7 → pywget-2.0.9}/pywget/__main__.py +0 -0
  9. {pywget-2.0.7 → pywget-2.0.9}/pywget/__version__.py +0 -0
  10. {pywget-2.0.7 → pywget-2.0.9}/pywget/client.py +0 -0
  11. {pywget-2.0.7 → pywget-2.0.9}/pywget/clipboard.py +0 -0
  12. {pywget-2.0.7 → pywget-2.0.9}/pywget/config.py +0 -0
  13. {pywget-2.0.7 → pywget-2.0.9}/pywget/core.py +0 -0
  14. {pywget-2.0.7 → pywget-2.0.9}/pywget/errors.py +0 -0
  15. {pywget-2.0.7 → pywget-2.0.9}/pywget/jobs.py +0 -0
  16. {pywget-2.0.7 → pywget-2.0.9}/pywget/progress.py +0 -0
  17. {pywget-2.0.7 → pywget-2.0.9}/pywget/py.typed +0 -0
  18. {pywget-2.0.7 → pywget-2.0.9}/pywget/server.py +0 -0
  19. {pywget-2.0.7 → pywget-2.0.9}/pywget/utils.py +0 -0
  20. {pywget-2.0.7 → pywget-2.0.9}/pywget/webui.py +0 -0
  21. {pywget-2.0.7 → pywget-2.0.9}/pywget/wget.py +0 -0
  22. {pywget-2.0.7 → pywget-2.0.9}/pywget.egg-info/SOURCES.txt +0 -0
  23. {pywget-2.0.7 → pywget-2.0.9}/pywget.egg-info/dependency_links.txt +0 -0
  24. {pywget-2.0.7 → pywget-2.0.9}/pywget.egg-info/entry_points.txt +0 -0
  25. {pywget-2.0.7 → pywget-2.0.9}/pywget.egg-info/requires.txt +0 -0
  26. {pywget-2.0.7 → pywget-2.0.9}/pywget.egg-info/top_level.txt +0 -0
  27. {pywget-2.0.7 → pywget-2.0.9}/setup.cfg +0 -0
  28. {pywget-2.0.7 → pywget-2.0.9}/tests/test_config.py +0 -0
  29. {pywget-2.0.7 → pywget-2.0.9}/tests/test_download.py +0 -0
  30. {pywget-2.0.7 → pywget-2.0.9}/tests/test_server.py +0 -0
  31. {pywget-2.0.7 → pywget-2.0.9}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pywget
3
- Version: 2.0.7
3
+ Version: 2.0.9
4
4
  Summary: Robust, resumable, multi-connection wget alternative - CLI and Python library, zero dependencies
5
5
  Author-email: Hadi Cahyadi <cumulus13@gmail.com>
6
6
  Maintainer-email: cumulus13 <cumulus13@gmail.com>
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "pywget"
9
- version = "2.0.7"
9
+ version = "2.0.9"
10
10
  description = "Robust, resumable, multi-connection wget alternative - CLI and Python library, zero dependencies"
11
11
  readme = "README.md"
12
12
  requires-python = ">=3.8"
@@ -235,7 +235,12 @@ def _apply_config(parser: argparse.ArgumentParser, section: str, spec: Spec) ->
235
235
 
236
236
 
237
237
  def _config_main(argv: List[str]) -> int:
238
- p = argparse.ArgumentParser(prog="pywget config", description="Manage the optional config file.")
238
+ try:
239
+ from rchf import CustomRichHelpFormatter
240
+ except:
241
+ CustomRichHelpFormatter = argparse.RawDescriptionHelpFormatter
242
+
243
+ p = argparse.ArgumentParser(prog="pywget config", description="Manage the optional config file.", formatter_class=CustomRichHelpFormatter)
239
244
  p.add_argument("action", choices=["path", "init", "show"])
240
245
  p.add_argument("--force", action="store_true", help="init: overwrite an existing file")
241
246
  args = p.parse_args(argv)
@@ -257,9 +262,15 @@ def _config_main(argv: List[str]) -> int:
257
262
 
258
263
 
259
264
  def _token_main(argv: List[str]) -> int:
265
+ try:
266
+ from rchf import CustomRichHelpFormatter
267
+ except:
268
+ CustomRichHelpFormatter = argparse.RawDescriptionHelpFormatter
269
+
260
270
  p = argparse.ArgumentParser(
261
271
  prog="pywget token",
262
272
  description="Manage the API token (stored in the token file, mode 0600).",
273
+ formatter_class=CustomRichHelpFormatter
263
274
  )
264
275
  p.add_argument("action", choices=["show", "new", "set", "path"])
265
276
  p.add_argument("value", nargs="?", help="set: the token to use ('-' = read from stdin)")
@@ -294,11 +305,16 @@ def _token_main(argv: List[str]) -> int:
294
305
 
295
306
 
296
307
  def build_parser() -> argparse.ArgumentParser:
308
+ try:
309
+ from rchf import CustomRichHelpFormatter
310
+ except:
311
+ CustomRichHelpFormatter = argparse.RawDescriptionHelpFormatter
312
+
297
313
  p = argparse.ArgumentParser(
298
314
  prog="pywget",
299
315
  description="Robust, resumable, multi-connection wget alternative with server and agent modes.",
300
316
  epilog=EPILOG,
301
- formatter_class=argparse.RawDescriptionHelpFormatter,
317
+ formatter_class=CustomRichHelpFormatter,
302
318
  )
303
319
  p.add_argument("urls", nargs="*", metavar="URL", help="http(s) URLs, 'c' for the clipboard, or a file of links")
304
320
  p.add_argument("-i", "--input-file", metavar="FILE", help="read URLs from FILE ('-' = stdin)")
@@ -493,7 +509,12 @@ def _forward(args: argparse.Namespace, urls: List[str], parser: argparse.Argumen
493
509
 
494
510
 
495
511
  def _send_main(argv: List[str]) -> int:
496
- p = argparse.ArgumentParser(prog="pywget send", description="Send links to a pywget server or agent.")
512
+ try:
513
+ from rchf import CustomRichHelpFormatter
514
+ except:
515
+ CustomRichHelpFormatter = argparse.RawDescriptionHelpFormatter
516
+
517
+ p = argparse.ArgumentParser(prog="pywget send", description="Send links to a pywget server or agent.", formatter_class=CustomRichHelpFormatter)
497
518
  p.add_argument("urls", nargs="*", metavar="URL", help="http(s) URLs, 'c' for the clipboard, or a file of links")
498
519
  p.add_argument("-i", "--input-file", metavar="FILE", help="read URLs from FILE ('-' = stdin)")
499
520
  p.add_argument("-p", "--path", default=".", metavar="DIR", help="folder below the server root")
@@ -524,7 +545,12 @@ def _send_main(argv: List[str]) -> int:
524
545
 
525
546
 
526
547
  def _jobs_main(argv: List[str]) -> int:
527
- p = argparse.ArgumentParser(prog="pywget jobs", description="Inspect and control server jobs.")
548
+ try:
549
+ from rchf import CustomRichHelpFormatter
550
+ except:
551
+ CustomRichHelpFormatter = argparse.RawDescriptionHelpFormatter
552
+
553
+ p = argparse.ArgumentParser(prog="pywget jobs", description="Inspect and control server jobs.", formatter_class=CustomRichHelpFormatter)
528
554
  p.add_argument("action", choices=["list", "show", "pause", "resume", "cancel", "retry", "remove", "stats"])
529
555
  p.add_argument("job_id", nargs="?", help="job id (not needed for list/stats)")
530
556
  p.add_argument("--status", help="filter for 'list' (queued, running, paused, completed, failed, cancelled)")
@@ -563,6 +589,11 @@ def _jobs_main(argv: List[str]) -> int:
563
589
 
564
590
  def _serve_main(argv: List[str], agent: bool) -> int:
565
591
  name = "agent" if agent else "serve"
592
+ try:
593
+ from rchf import CustomRichHelpFormatter
594
+ except:
595
+ CustomRichHelpFormatter = argparse.RawDescriptionHelpFormatter
596
+
566
597
  p = argparse.ArgumentParser(
567
598
  prog=f"pywget {name}",
568
599
  description=(
@@ -570,6 +601,7 @@ def _serve_main(argv: List[str], agent: bool) -> int:
570
601
  if agent else
571
602
  "Run the pywget download server: HTTP API, persistent queue, web UI."
572
603
  ),
604
+ formatter_class=CustomRichHelpFormatter
573
605
  )
574
606
  p.add_argument("--host", default=DEFAULT_HOST, help=f"bind address (default: {DEFAULT_HOST})")
575
607
  p.add_argument("--port", type=int, default=DEFAULT_AGENT_PORT if agent else DEFAULT_PORT, help="TCP port")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pywget
3
- Version: 2.0.7
3
+ Version: 2.0.9
4
4
  Summary: Robust, resumable, multi-connection wget alternative - CLI and Python library, zero dependencies
5
5
  Author-email: Hadi Cahyadi <cumulus13@gmail.com>
6
6
  Maintainer-email: cumulus13 <cumulus13@gmail.com>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes