Added version string to usage

This commit is contained in:
Ignacio Rivero 2025-06-23 18:02:56 -03:00
parent 25facee575
commit 7138208547

View File

@ -53,6 +53,7 @@ var (
ejectPaper uint ejectPaper uint
retractPaper uint retractPaper uint
outputPath string outputPath string
version = "dev"
) )
func init() { func init() {
@ -90,6 +91,7 @@ func init() {
flag.StringVar(&outputPath, "output", "", "Output PNG preview instead of printing (specify output path)") flag.StringVar(&outputPath, "output", "", "Output PNG preview instead of printing (specify output path)")
flag.Usage = func() { flag.Usage = func() {
fmt.Fprintf(os.Stderr, "Bleh! Cat Printer Utility for MXW01, version %s\n",version)
fmt.Fprintf(os.Stderr, "Usage: %s [options] <image_path or ->\n", os.Args[0]) fmt.Fprintf(os.Stderr, "Usage: %s [options] <image_path or ->\n", os.Args[0])
fmt.Fprintln(os.Stderr, ` fmt.Fprintln(os.Stderr, `
Options: Options: