Skip to content

Commit 6a3fad8

Browse files
committed
Add installation instructions and explanations, and deprecate dev-setup.sh to avoid installation errors
1 parent 14dbe50 commit 6a3fad8

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,27 @@ a python virtual environment and also configures the pre-commit hooks for the pr
3232
source 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
3657
The Node Scraper CLI can be used to run Node Scraper plugins on a target system. The following CLI
3758
options are available:

dev-setup.sh

100755100644
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
# Create venv if not already present
1+
#!/bin/bash
2+
3+
# Create venv if not present
24
if [ ! -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; }
56
fi
67

7-
# Activate the desired venv
8+
# Activate venv
89
source venv/bin/activate
910

11+
# Install package
1012
python3 -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

0 commit comments

Comments
 (0)