chore: add uv.lock to gitignore Major changes: - Add type hints and docstrings to all functions (PEP 484) - Add __main__.py for module execution (python -m genpass) - Expose public API in __init__.py - Add config file support (~/.genpass/config.json) - Add entropy calculation (--entropy) - Add clipboard support (--clipboard/-c) - Add ambiguous characters exclusion (--no-ambiguous) - Add output formats: plain, json, delimited (--format) - Add sensible defaults (all character types enabled by default) - Add input validation for length and count - Update shell completions for all new options - Add pre-commit config with ruff, mypy, black - Update pyproject.toml with dev dependencies and tool configs - Add requirements.txt and requirements-dev.txt - Update README.md with comprehensive examples BREAKING CHANGE: Default behavior now includes all character types
25 lines
737 B
Bash
Executable File
25 lines
737 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
if ! command -v pipx >/dev/null; then
|
|
echo "[!] pipx not found. Install it first:"
|
|
echo " python3 -m pip install --user pipx"
|
|
echo " pipx ensurepath"
|
|
exit 1
|
|
fi
|
|
|
|
pipx install .
|
|
|
|
PREFIX="${XDG_DATA_HOME:-$HOME/.local/share}"
|
|
|
|
mkdir -p "$PREFIX/bash-completion/completions"
|
|
mkdir -p "$PREFIX/zsh/site-functions"
|
|
mkdir -p "$PREFIX/fish/vendor_completions.d"
|
|
|
|
cp completions/genpass.bash "$PREFIX/bash-completion/completions/genpass"
|
|
cp completions/genpass.zsh "$PREFIX/zsh/site-functions/_genpass"
|
|
cp completions/genpass.fish "$PREFIX/fish/vendor_completions.d/genpass.fish"
|
|
|
|
echo "[✓] Installation complete. Restart your shell."
|
|
echo "[✓] Clipboard support: pipx inject genpass pyperclip"
|