summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bleher <tbleher@gmx.de>2018-10-03 23:31:21 +0200
committerThomas Bleher <tbleher@gmx.de>2018-10-03 23:31:21 +0200
commitfcdf0ea0098f7997fe8e58a9f0669e073da7b7c8 (patch)
tree067bb37ebb73256c2e825cf34196cf488e0177ed
parent0b5d00df1069fee4b56b2b67c1490d81395b7ff7 (diff)
downloadselphy_go-fcdf0ea0098f7997fe8e58a9f0669e073da7b7c8.tar.gz
selphy_go-fcdf0ea0098f7997fe8e58a9f0669e073da7b7c8.tar.bz2
selphy_go-fcdf0ea0098f7997fe8e58a9f0669e073da7b7c8.zip
Improve usage stringHEADmaster
This clarifies that files to print can be given directly on the command line.
-rw-r--r--selphy.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/selphy.go b/selphy.go
index 37ce2b9..27db128 100644
--- a/selphy.go
+++ b/selphy.go
@@ -510,10 +510,16 @@ func (p *printer) start_job() {
p.jobs = p.jobs[1:]
}
+func myUsage() {
+ fmt.Printf("Usage: %s [OPTIONS] files-to-print...\n", os.Args[0])
+ flag.PrintDefaults()
+}
+
func main() {
printer_mac := flag.String("printer_mac", "", "MAC address of printer")
printer_ip := flag.String("printer_ip", CPNP_ADDR, "IP address of printer")
border := flag.Bool("border", false, "Allow white borders, don't crop")
+ flag.Usage = myUsage
flag.Parse()
p := new_printer()