From 56dea9b7cb7d82c2ec53a6cb51d99c69a41acfe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Gy=C3=B6ngy=C3=B6si?= Date: Mon, 6 Jan 2025 09:02:19 +0100 Subject: [PATCH] Change `-ip` shorthand to `-a` --- .vscode/launch.json | 2 +- README.md | 6 +++--- root/app.sh | 2 +- src/index.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 15375943..4fbf6561 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,7 +12,7 @@ "preLaunchTask": "tsc: build - tsconfig.json", "outFiles": ["${workspaceFolder}/dist/**/*.js"], "args": [ - //"-ip", "192.168.0.5" + //"-a", "192.168.0.5" "-p", "Deskjet 3520 series", "-f", "'scan'_dd.mm.yyyy_hh:MM:ss" ] diff --git a/README.md b/README.md index d8852db6..6b1910f1 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Please note that the `node-hp-scan-to` project is not endorsed by nor affiliated ### Command line `npx node-hp-scan-to` -- `-ip` or `--address` followed by the ip address of the printer, i.e. `-ip 192.168.0.5`. This overrides `-p`. +- `-a` or `--address` followed by the ip address of the printer, i.e. `-a 192.168.0.5`. - `--device-up-polling-interval` is the polling interval in milliseconds to detect if the device is up or not - `-l` or `--label` The label to display on the printer (default is the hostname). - `-n` or `--name` followed by the printer name, it probably contains spaces, so it needs to be quoted, i.e. `-name "Officejet 6500 E710n-z"` @@ -113,7 +113,7 @@ For the correct permissions to the volume set the environment variables `PUID` a Exhaustive list of supported environment variables and their meaning, or correspondence with [command-line flags](#command-line): - `PUID`: id of user that will run the program - `PGID`: id of group that will run the program -- `IP`: command-line flag `-ip`/`--address` +- `IP`: command-line flag `-a`/`--address` - `PATTERN`: command-line flag `-p`/`--pattern` - `LABEL`: command-line flag `-l`/`--label` - `NAME`: command-line flag `-n`/`--name` @@ -218,7 +218,7 @@ cd node-hp-scan-to yarn install -d yarn build # now start the program with the ip or name of the desired printer -node dist/index.js -ip 192.168.1.4 # or -n "Officejet 6500 E710n-z" +node dist/index.js -a 192.168.1.4 # or -n "Officejet 6500 E710n-z" ``` #### Debugging diff --git a/root/app.sh b/root/app.sh index 2eeea835..26480bc2 100755 --- a/root/app.sh +++ b/root/app.sh @@ -3,7 +3,7 @@ ARGS="--health-check -d /scan " if [ ! -z "$IP" ]; then - ARGS="${ARGS} -ip ${IP}" + ARGS="${ARGS} -a ${IP}" fi if [ ! -z "$LABEL" ]; then diff --git a/src/index.ts b/src/index.ts index 3d32f13b..40355538 100644 --- a/src/index.ts +++ b/src/index.ts @@ -256,7 +256,7 @@ function setupScanParameters(command: Command): Command { function setupParameterOpts(command: Command): Command { command.option( - "-ip, --address ", + "-a, --address ", "IP address of the device (this overrides -p)", ); command.option(