From c9efcce693595be42794bfa29a098cbdcb7a4c3b Mon Sep 17 00:00:00 2001 From: Hazel Noack Date: Tue, 10 Jun 2025 11:43:49 +0200 Subject: [PATCH] added cli --- scribble_to_epub/__main__.py | 21 ++++++++++++++++++++- scribble_to_epub/scribblehub.py | 0 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 scribble_to_epub/scribblehub.py diff --git a/scribble_to_epub/__main__.py b/scribble_to_epub/__main__.py index 9ea796e..21c2698 100644 --- a/scribble_to_epub/__main__.py +++ b/scribble_to_epub/__main__.py @@ -1,3 +1,22 @@ +import argparse + def cli(): - print(f"Running scribble_to_epub") + parser = argparse.ArgumentParser( + description="Scribble_to_epub\n\nThis scrapes books from https://www.scribblehub.com/ and creates EPUB from them.", + formatter_class=argparse.RawTextHelpFormatter + ) + parser.add_argument( + "url", + type=str, + help="URL of the ScribbleHub story to scrape and convert to EPUB" + ) + + args = parser.parse_args() + + print(f"Running scribble_to_epub for URL: {args.url}") + # You would call your main scraping and EPUB creation logic here + + +if __name__ == "__main__": + cli() diff --git a/scribble_to_epub/scribblehub.py b/scribble_to_epub/scribblehub.py new file mode 100644 index 0000000..e69de29