File tree Expand file tree Collapse file tree 2 files changed +31
-5
lines changed
Expand file tree Collapse file tree 2 files changed +31
-5
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,27 @@ a python virtual environment and also configures the pre-commit hooks for the pr
3232source dev-setup.sh
3333```
3434
35+ Alternatively, follow these manual steps:
36+
37+ ### 1. Virtual Environment (Optional)
38+ ``` sh
39+ python3 -m venv venv
40+ source venv/bin/activate
41+ ```
42+ On Debian/Ubuntu, you may need: ` sudo apt install python3-venv `
43+
44+ ### 2. Install from Source (Required)
45+ ``` sh
46+ python3 -m pip install --editable .[dev] --upgrade
47+ ```
48+ This installs Node Scraper in editable mode with development dependencies. To verify: ` node-scraper --help `
49+
50+ ### 3. Git Hooks (Optional)
51+ ``` sh
52+ pre-commit install
53+ ```
54+ Sets up pre-commit hooks for code quality checks. On Debian/Ubuntu, you may need: ` sudo apt install pre-commit `
55+
3556## CLI Usage
3657The Node Scraper CLI can be used to run Node Scraper plugins on a target system. The following CLI
3758options are available:
Original file line number Diff line number Diff line change 1- # Create venv if not already present
1+ #! /bin/bash
2+
3+ # Create venv if not present
24if [ ! -d " venv" ]; then
3- python3 -m pip install venv
4- python3 -m venv venv
5+ python3 -m venv venv || { echo " Failed to create venv. Try: sudo apt install python3-venv" ; exit 1; }
56fi
67
7- # Activate the desired venv
8+ # Activate venv
89source venv/bin/activate
910
11+ # Install package
1012python3 -m pip install --editable .[dev] --upgrade
1113
12- pre-commit install
14+ # Install pre-commit hooks if available
15+ if command -v pre-commit & > /dev/null; then
16+ pre-commit install
17+ fi
You can’t perform that action at this time.
0 commit comments