From 4776159f22cb10f8f5ecd2a05b3f7a0ce03e7452 Mon Sep 17 00:00:00 2001 From: fastily Date: Mon, 11 Dec 2023 03:51:07 -0800 Subject: [PATCH] update name per rename --- .gitignore | 2 +- README.md | 29 +++++++++++++++++------------ four_chan_ripper/__main__.py | 2 +- setup.py | 6 +++--- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index ac33ca7..b4bc245 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,6 @@ dist *.egg-info # virtualenv -venv_4chan_ripper +venv_four_chan_ripper scratch.py \ No newline at end of file diff --git a/README.md b/README.md index 2104e2f..845a2eb 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,28 @@ -# 4chan-ripper -[![Python 3.9+](https://upload.wikimedia.org/wikipedia/commons/4/4f/Blue_Python_3.9%2B_Shield_Badge.svg)](https://www.python.org) +# four-chan-ripper +[![Python 3.11+](https://upload.wikimedia.org/wikipedia/commons/6/62/Blue_Python_3.11%2B_Shield_Badge.svg)](https://www.python.org) [![License: GPL v3](https://upload.wikimedia.org/wikipedia/commons/8/86/GPL_v3_Blue_Badge.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) Tool for ripping and saving the media files in 4chan threads. +## Installation +```bash +pip install four-chan-ripper +``` + ## Usage ``` -usage: 4cr [-h] [-b board_id] [-i] [-s] [--out output_directory] [urls ...] +usage: __main__.py [-h] [-b board_id] [-i] [-s] [-o output_directory] [urls ...] -4cr CLI +4chan ripper CLI positional arguments: - urls the urls to process + urls the urls to process options: - -h, --help show this help message and exit - -b board_id The short id of the board to target. Ignored if the program was not started in interactive mode. Default is hr - -i Causes the archive file to get ignored. Only applicable in interactive mode. - -s Treat the input urls as a photoset to rip - --out output_directory - The output directory. Default is ~/Public -``` \ No newline at end of file + -h, --help show this help message and exit + -b board_id The short id of the board to target. Ignored if the program was not started in interactive mode. Default is hr + -i Causes the archive file to get ignored. Only applicable in interactive mode. + -s Treat the input urls as a photoset to rip + -o output_directory The output directory. Defaults to the current working directory. +``` +Also installs a CLI alias called `4cr` which can be used to invoke the program directly \ No newline at end of file diff --git a/four_chan_ripper/__main__.py b/four_chan_ripper/__main__.py index 764330b..4eb8c6c 100644 --- a/four_chan_ripper/__main__.py +++ b/four_chan_ripper/__main__.py @@ -69,7 +69,7 @@ def download(self, out_dir: Path) -> bool: def _main() -> None: """Main driver, invoked when this file is run directly.""" - cli_parser = ArgumentParser(description="4cr CLI") + cli_parser = ArgumentParser(description="4chan ripper CLI") cli_parser.add_argument('-b', type=str, metavar="board_id", default="hr", help="The short id of the board to target. Ignored if the program was not started in interactive mode. Default is hr") cli_parser.add_argument('-i', action='store_true', help="Causes the archive file to get ignored. Only applicable in interactive mode.") cli_parser.add_argument('-s', action='store_true', help="Treat the input urls as a photoset to rip") diff --git a/setup.py b/setup.py index 2774f6e..d882fc1 100644 --- a/setup.py +++ b/setup.py @@ -4,16 +4,16 @@ long_description = fh.read() setuptools.setup( - name="4chan-ripper", + name="four-chan-ripper", version="0.0.1", author="Fastily", author_email="fastily@users.noreply.github.com", description="Rips the contents of threads on 4chan", long_description=long_description, long_description_content_type="text/markdown", - url="https://github.com/fastily/4chan-ripper", + url="https://github.com/fastily/four-chan-ripper", project_urls={ - "Bug Tracker": "https://github.com/fastily/4chan-ripper/issues", + "Bug Tracker": "https://github.com/fastily/four-chan-ripper/issues", }, include_package_data=True, packages=setuptools.find_packages(include=["four_chan_ripper"]),