From 1331f3b5642f521236fcb1ec21ee43d5b76c0b91 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch
Date: Sun, 14 Apr 2019 22:30:40 +0200 Subject: Move commands under cmd/ --- ql-info/main.go | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 ql-info/main.go (limited to 'ql-info/main.go') diff --git a/ql-info/main.go b/ql-info/main.go deleted file mode 100644 index 8d53d63..0000000 --- a/ql-info/main.go +++ /dev/null @@ -1,41 +0,0 @@ -package main - -import ( - "fmt" - "log" - - "janouch.name/sklad/ql" -) - -func main() { - printer, err := ql.Open() - if err != nil { - log.Fatalln(err) - } - if printer == nil { - log.Fatalln("no suitable printer found") - } - - defer printer.Close() - - fmt.Printf("\x1b[1m%s %s\x1b[m\n", printer.Manufacturer, printer.Model) - if err := printer.Initialize(); err != nil { - log.Fatalln(err) - } - if err := printer.UpdateStatus(); err != nil { - log.Fatalln(err) - } - - status := printer.LastStatus - fmt.Print(status) - - fmt.Println("\x1b[1mMedia information\x1b[m") - if mi := ql.GetMediaInfo( - status.MediaWidthMM(), status.MediaLengthMM()); mi != nil { - fmt.Println("side margin pins:", mi.SideMarginPins) - fmt.Println("print area pins:", mi.PrintAreaPins) - fmt.Println("print area length:", mi.PrintAreaLength) - } else { - fmt.Println("unknown media") - } -} -- cgit v1.2.3-70-g09d2