fix(cli): wire verbose flag through entry point
Extract argparse into main() and point console script at it. The -v/--verbose flag was dead because the entry point called run() directly, bypassing the __main__ argparse block entirely.
This commit is contained in:
5 files changed
+60
-3
No files matched your search
@@ -192,7 +192,8 @@ def run(
|
||||
return 130
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def main() -> None:
|
||||
"""CLI entry point — parse args and run the download pipeline."""
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(description="Download audiobooks from Libro.fm")
|
||||
@@ -225,3 +226,7 @@ if __name__ == "__main__":
|
||||
limit=args.limit,
|
||||
workers=args.workers,
|
||||
))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in new issue
Block a user