From d341aa00f4afd93c4aa9a9eb99276152898dd753 Mon Sep 17 00:00:00 2001 From: Jacky Lam Date: Mon, 15 Jul 2024 03:01:46 +0100 Subject: [PATCH] feat: Allow direct calls from CLI --- README.md | 24 ++++++++++++++++++++---- setup.py | 6 ++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cd4c6f1..dd3a688 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,26 @@ Many OTP apps don't support exporting or backing up their OTP secrets. Switching ## Installation -```bash -$ pip install git+https://github.com/puddly/android-otp-extractor -$ python -m android_otp_extractor -``` +1. Install with pipx + + ```bash + pipx install git+https://github.com/puddly/android-otp-extractor + android-otp-extractor --help + ``` + +1. Install as a Python module + + We suggest that you install this in a temporary directory instead of your HOME directory. + + ```bash + python3 -m venv .venv + source .venv/bin/activate + pip install git+https://github.com/puddly/android-otp-extractor + # Run directly + android-otp-extractor --help + # Run as a module + python -m android_otp_extractor --help + ``` ## Usage diff --git a/setup.py b/setup.py index eff8025..86aaca9 100644 --- a/setup.py +++ b/setup.py @@ -34,4 +34,10 @@ 'Bug Reports': 'https://github.com/puddly/android-otp-extractor/issues', 'Source': 'https://github.com/puddly/android-otp-extractor/', }, + + entry_points={ + 'console_scripts': [ + 'android-otp-extractor=android_otp_extractor.cli:main', + ], + }, ) \ No newline at end of file