Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change -ip shorthand to -a #1063

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading