From 28f01a613a89ab05bfedc065e0c318f274bbd95c Mon Sep 17 00:00:00 2001 From: LC mac Date: Wed, 7 Jan 2026 23:14:05 +0800 Subject: [PATCH] format the README.md --- README.md | 85 ++++++++++++++++++++----------------------------------- 1 file changed, 31 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index f29d4bd..3d2de53 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,3 @@ -Here’s an **extended README.md** that combines your original usage instructions with the **Makefile workflow** for clarity and ease of onboarding: - -*** - -## βœ… Extended `README.md` - -````markdown # hdwalletpy – Setup & Usage Guide This project provides a Python-based HD Wallet tool with optional Docker-based build automation for fast, reproducible environments. @@ -16,24 +9,27 @@ This project provides a Python-based HD Wallet tool with optional Docker-based b ### **Option 1: Standard Python Setup (Host Machine)** 1. Clone the repository: + ```bash git clone https://github.com//hdwalletpy.git cd hdwalletpy -```` + ``` -2. Create a virtual environment: - ```bash - python -m venv .venv - source .venv/bin/activate - ``` +2. Create a virtual environment: -3. Install dependencies: - ```bash - python -m pip install --upgrade pip - python -m pip install -r requirements.txt - ``` + ```bash + python -m venv .venv + source .venv/bin/activate + ``` -*** +3. Install dependencies: + + ```bash + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + ``` + +--- ### **Option 2: Fast Setup Using Docker + Makefile** @@ -67,19 +63,19 @@ Installs dependencies from `wheelhouse` (no compilation needed). #### **Optional: Work Inside a Warm Container** ```bash -make up # Start container -make shell # Open shell inside container -make venv-container # Create container-only venv at /opt/venv +make up # Start container +make shell # Open shell inside container +make venv-container # Create container-only venv at /opt/venv ``` #### **Cleanup** ```bash -make clean # Remove host venv and wheelhouse -make down # Stop/remove container +make clean # Remove host venv and wheelhouse +make down # Stop/remove container ``` -*** +--- ## βœ… Basic Usage @@ -110,14 +106,14 @@ python ./src/pyhdwallet.py fetchkey "https://example.com/key.asc" --out mykey.as python ./src/pyhdwallet.py test ``` -*** +--- ## πŸ” Notes on `--file`, AES ZIP, and PGP -* `--file` writes **only** an AES-encrypted ZIP (no raw `.json`/`.asc` left on disk), using `pyzipper`. -* If `--pgp-pubkey-file` is set, the ZIP contains a single ASCII-armored PGP message (`.asc`) created with PGPy-style `PGPMessage.new(...)` then `pubkey.encrypt(...)`. +- `--file` writes **only** an AES-encrypted ZIP (no raw `.json`/`.asc` left on disk), using `pyzipper`. +- If `--pgp-pubkey-file` is set, the ZIP contains a single ASCII-armored PGP message (`.asc`) created with PGPy-style `PGPMessage.new(...)` then `pubkey.encrypt(...)`. -*** +--- ## ⚠️ About `--force` @@ -130,16 +126,16 @@ python ./src/pyhdwallet.py gen > out.txt # likely refused (non-TTY) python ./src/pyhdwallet.py gen --force > out.txt # allowed ``` -*** +--- ## βœ… Why Use Makefile? -* **Speed:** Avoid repeated `apt-get` installs; wheels cached locally. -* **Reproducibility:** Same Docker image for builds; no environment drift. -* **Convenience:** One-liner tasks (`make wheels`, `make venv-host`, `make shell`). -* **Separation:** Host venv vs container venv for clean workflows. +- **Speed:** Avoid repeated `apt-get` installs; wheels cached locally. +- **Reproducibility:** Same Docker image for builds; no environment drift. +- **Convenience:** One-liner tasks (`make wheels`, `make venv-host`, `make shell`). +- **Separation:** Host venv vs container venv for clean workflows. -*** +--- ## Common Makefile Targets @@ -153,22 +149,3 @@ make venv-container # Container venv at /opt/venv make down # Stop/remove container make clean # Remove .venv_host and wheelhouse ``` - -*** - -## License - -Add your license info here. - -``` - ---- - -βœ… This README now **integrates your original usage instructions** with the **Makefile workflow**, so new users can choose between a standard Python setup or the optimized Docker-based approach. - ---- - -πŸ‘‰ Do you want me to **also include the Makefile and Dockerfile snippets directly in the README** (so users don’t need to open separate files), or keep them as separate files for clarity? -Or should I prepare a **GitHub-ready ZIP** with `README.md`, `Makefile`, `Dockerfile`, and `.gitignore` for you? -``` -