add more helpful command line help
This commit is contained in:
parent
417d19211b
commit
25490b8bdd
1 changed files with 8 additions and 2 deletions
|
|
@ -12,7 +12,13 @@
|
||||||
const [ name, host, serial ] = process.argv.slice(2);
|
const [ name, host, serial ] = process.argv.slice(2);
|
||||||
|
|
||||||
if (!(name && host && serial)) {
|
if (!(name && host && serial)) {
|
||||||
console.log('usage: ssdp [host] [serial-no]');
|
console.log([
|
||||||
|
'usage: ssdp [name] [host] [serial-no]',
|
||||||
|
'where:',
|
||||||
|
' name = name of printer to appear in slicer',
|
||||||
|
' host = host name or IP address of printer',
|
||||||
|
' serial = printer serial #'
|
||||||
|
].join('\n'));
|
||||||
return process.exit(0);
|
return process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -64,7 +70,7 @@ function send(socket, addr, port) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error("Error sending SSDP broadcast:", err);
|
console.error("Error sending SSDP broadcast:", err);
|
||||||
} else {
|
} else {
|
||||||
console.log(`>>>>>>>>>>>>>>>>> ${addr} : ${port}`);
|
// console.log(`>>>>>>>>>>>>>>>>> ${addr} : ${port}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue