Skip to content

Commit

Permalink
Merge pull request #1063 from gy-mate/ip-commander
Browse files Browse the repository at this point in the history
Change `-ip` shorthand to `-a`
  • Loading branch information
manuc66 authored Jan 6, 2025
2 parents a47d3f5 + 56dea9b commit 4969a0a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion root/app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ function setupScanParameters(command: Command): Command {

function setupParameterOpts(command: Command): Command {
command.option(
"-ip, --address <ip>",
"-a, --address <ip>",
"IP address of the device (this overrides -p)",
);
command.option(
Expand Down

0 comments on commit 4969a0a

Please sign in to comment.