node-thermal-printer-js 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,6 +47,40 @@ npm install
|
|
|
47
47
|
py -3.11 -m pip install -r requirements.txt
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
+
### Python (BLE) setup
|
|
51
|
+
|
|
52
|
+
If you plan to use `transport: "ble"`, you need a Python 3.11+ environment with the `bleak` library (the repo includes `ble_print.py` and `ble_scan.py`). Follow the steps for your platform.
|
|
53
|
+
|
|
54
|
+
- Windows (recommended using the Python launcher):
|
|
55
|
+
|
|
56
|
+
```powershell
|
|
57
|
+
py -3.11 -m venv .venv
|
|
58
|
+
.\.venv\Scripts\activate
|
|
59
|
+
pip install -r requirements.txt
|
|
60
|
+
# or: pip install bleak
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- macOS / Linux:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
python3 -m venv .venv
|
|
67
|
+
source .venv/bin/activate
|
|
68
|
+
pip install -r requirements.txt
|
|
69
|
+
# or: pip install bleak
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Verify the Python BLE dependency is available:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
python -c "import bleak; print('bleak', bleak.__version__)"
|
|
76
|
+
# or on Windows: py -3.11 -c "import bleak; print('bleak', bleak.__version__)"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Notes:
|
|
80
|
+
|
|
81
|
+
- If you do not want to create a virtual environment you can install `bleak` system-wide with `pip install bleak`, but a venv is recommended.
|
|
82
|
+
- The Node `serialport` path/COM mode does not require Python.
|
|
83
|
+
|
|
50
84
|
## Test Print
|
|
51
85
|
|
|
52
86
|
### BLE (recommended when no COM port exists)
|