krz/yoshi-cli
A password manager for the command line.
clone: git clone https://gitbay.org/krz/yoshi-cli.git
6dde4dd0bc5e5f91f89587c75a30c9ef7a24494c
verified · cmc
author: Christian Cleberg <hello@cleberg.net> · 2024-11-07T05:23:27Z
.gitignore | 1 + README.md | 5 ++--- pyproject.toml | 5 ++++- requirements.txt | 2 +- src/yoshi_cli.egg-info/SOURCES.txt | 11 ----------- src/yoshi_cli.egg-info/top_level.txt | 4 ---- yoshi/__init__.py | 0 yoshi/__main__.py | 3 +++ {src => yoshi}/account.py | 2 +- main.py => yoshi/cli.py | 11 +++++++---- {src => yoshi}/crypto.py | 0 {src => yoshi}/database.py | 0 {src => yoshi}/process.py | 7 ++++--- .../PKG-INFO | 21 ++++++++++----------- yoshi_cli.egg-info/SOURCES.txt | 15 +++++++++++++++ .../dependency_links.txt | 0 yoshi_cli.egg-info/entry_points.txt | 2 ++ yoshi_cli.egg-info/top_level.txt | 1 + 18 files changed, 51 insertions(+), 39 deletions(-) @@ -1,6 +1,7 @@ .DS_Store .idea/ .pypirc +build/ dist/ venv/ __pycache__/ @@ -34,8 +34,7 @@ To run the script locally, run the following commands: ```bash git clone REPO_URL cd yoshi -pip3 install -r requirements.txt -python3 main.py --help +pip install . ``` # Usage @@ -43,7 +42,7 @@ python3 main.py --help [(Back to top)](#table-of-contents) All commands can be passed to the program with the following template: -`python3 main.py <COMMAND> <FLAG> <PARAMETER>` +`python3 src/yoshi/cli.py <COMMAND> <FLAG> <PARAMETER>`  @@ -1,6 +1,6 @@ [project] name = "yoshi-cli" -version = "0.1.0" +version = "0.1.1" authors = [ { name="Christian Cleberg", email="hello@cleberg.net" }, ] @@ -16,3 +16,6 @@ classifiers = [ [project.urls] Homepage = "https://github.com/ccleberg/yoshi" Issues = "https://github.com/ccleberg/yoshi/issues" + +[project.scripts] +yoshi = "yoshi.cli:yoshi" @@ -1,2 +1,2 @@ prettytable~=2.2.0 -cryptography~=3.4.8 \ No newline at end of file +cryptography deleted file mode 100644 @@ -1,11 +0,0 @@ -LICENSE -README.md -pyproject.toml -src/account.py -src/crypto.py -src/database.py -src/process.py -src/yoshi_cli.egg-info/PKG-INFO -src/yoshi_cli.egg-info/SOURCES.txt -src/yoshi_cli.egg-info/dependency_links.txt -src/yoshi_cli.egg-info/top_level.txt \ No newline at end of file deleted file mode 100644 @@ -1,4 +0,0 @@ -account -crypto -database -process new file mode 100644 new file mode 100644 @@ -0,0 +1,3 @@ +if __name__ == "__main__": + from yoshi.cli import yoshi + yoshi() similarity index 97% rename from src/account.py rename to yoshi/account.py @@ -5,7 +5,7 @@ Modules imported: - database: A custom module providing database functionality. """ -import database +import yoshi.database as database class Account: similarity index 96% rename from main.py rename to yoshi/cli.py @@ -5,11 +5,11 @@ It imports the required modules and sets up a parser with basic options for demo """ import argparse -import crypto -import database -import process +import yoshi.crypto as crypto +import yoshi.database as database +import yoshi.process as process -if __name__ == '__main__': +def yoshi(): parser = argparse.ArgumentParser( description='Manage your username and passwords via a convenient CLI vault.' ) @@ -131,3 +131,6 @@ if __name__ == '__main__': raise TypeError( 'Please specify a command or use the --help flag for more information.' ) + +if __name__ == "__main__": + yoshi() similarity index 100% rename from src/crypto.py rename to yoshi/crypto.py similarity index 100% rename from src/database.py rename to yoshi/database.py similarity index 97% rename from src/process.py rename to yoshi/process.py @@ -27,8 +27,8 @@ from string import ascii_letters, punctuation, digits import random import uuid from prettytable import PrettyTable -from account import Account -import database +from yoshi.account import Account +import yoshi.database as database def generate_characters(n: int) -> list: @@ -176,7 +176,8 @@ def create_account() -> None: if password_length < 8: print('Error: Your password length must be at least 8 characters.') return - password_string = generate_password(password_length) # pylint: disable=undefined-variable + password_characters = generate_characters(password_length) + password_string = shuffle_characters(password_characters) else: password_string = input('Please enter your desired password: ') similarity index 96% rename from src/yoshi_cli.egg-info/PKG-INFO rename to yoshi_cli.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: yoshi-cli -Version: 0.1.0 +Version: 0.1.1 Summary: A password manager for the command line. Author-email: Christian Cleberg <hello@cleberg.net> Project-URL: Homepage, https://github.com/ccleberg/yoshi @@ -35,22 +35,21 @@ information. [(Back to top)](#table-of-contents) -To run the script locally, run the following commands: +## PyPi ```bash -git clone REPO_URL +pip install yoshi-cli ``` -```bash -cd yoshi -``` +## Manual -```bash -pip3 install -r requirements.txt -``` +To run the script locally, run the following commands: ```bash -python3 main.py --help +git clone REPO_URL +cd yoshi +pip3 install -r requirements.txt +python3 src/yoshi/cli.py --help ``` # Usage @@ -58,7 +57,7 @@ python3 main.py --help [(Back to top)](#table-of-contents) All commands can be passed to the program with the following template: -`python3 main.py <COMMAND> <FLAG> <PARAMETER>` +`python3 src/yoshi/cli.py <COMMAND> <FLAG> <PARAMETER>`  new file mode 100644 @@ -0,0 +1,15 @@ +LICENSE +README.md +pyproject.toml +yoshi/__init__.py +yoshi/__main__.py +yoshi/account.py +yoshi/cli.py +yoshi/crypto.py +yoshi/database.py +yoshi/process.py +yoshi_cli.egg-info/PKG-INFO +yoshi_cli.egg-info/SOURCES.txt +yoshi_cli.egg-info/dependency_links.txt +yoshi_cli.egg-info/entry_points.txt +yoshi_cli.egg-info/top_level.txt \ No newline at end of file similarity index 100% rename from src/yoshi_cli.egg-info/dependency_links.txt rename to yoshi_cli.egg-info/dependency_links.txt new file mode 100644 @@ -0,0 +1,2 @@ +[console_scripts] +yoshi = yoshi.cli:yoshi new file mode 100644 @@ -0,0 +1 @@ +yoshi