From c46d723f99d6cc6c6cd3ac17fa2dc7ad17381d9e Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Sun, 15 Sep 2024 09:42:55 +0200 Subject: [PATCH] chore: better print type descriptions --- printing/cups/cups.go | 2 +- printing/dump/dump.go | 2 +- printing/preview/preview.go | 2 +- printing/remote/remote.go | 2 +- printing/serial/serial.go | 2 +- printing/usb/usb.go | 2 +- printing/windows/direct.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/printing/cups/cups.go b/printing/cups/cups.go index 8bf53e52..0292b5a3 100644 --- a/printing/cups/cups.go +++ b/printing/cups/cups.go @@ -18,7 +18,7 @@ func (c *CUPS) Name() string { } func (c *CUPS) Description() string { - return "Print via CUPS attached printer. Use the Name of the printer (not the URI) as Endpoint." + return "Print via CUPS attached printer. Use the Name of the printer (not the URI) as endpoint. Check the S&D documentation for more information on how to set up CUPS." } var devicesRegex = regexp.MustCompile(`(?mU)device for (.+):`) diff --git a/printing/dump/dump.go b/printing/dump/dump.go index 2818fa9d..cdae88bc 100644 --- a/printing/dump/dump.go +++ b/printing/dump/dump.go @@ -13,7 +13,7 @@ func (r *Dump) Name() string { } func (r *Dump) Description() string { - return "Dumps the raw commands content to file. Endpoint should be the path to the file that will be written." + return "Dumps the raw ESC/POS commands to file. Endpoint should be the path to the file that will be written. Can be used to debug the raw commands." } func (r *Dump) AvailableEndpoints() (map[string]string, error) { diff --git a/printing/preview/preview.go b/printing/preview/preview.go index a4724bf1..055f8839 100644 --- a/printing/preview/preview.go +++ b/printing/preview/preview.go @@ -20,7 +20,7 @@ func (r *Preview) Name() string { } func (r *Preview) Description() string { - return "Instead of printing show a window with the result." + return "Instead of printing show a window with the result. No endpoint needed." } func (r *Preview) AvailableEndpoints() (map[string]string, error) { diff --git a/printing/remote/remote.go b/printing/remote/remote.go index cc0fb8b6..b917e448 100644 --- a/printing/remote/remote.go +++ b/printing/remote/remote.go @@ -16,7 +16,7 @@ func (r *Remote) Name() string { } func (r *Remote) Description() string { - return "Print via a remote server." + return "Print via a remote server. The endpoint should be the URL of the server. The raw ESC/POS printer commands will be sent as http post request." } func (r *Remote) AvailableEndpoints() (map[string]string, error) { diff --git a/printing/serial/serial.go b/printing/serial/serial.go index 171ee37a..68f58eef 100644 --- a/printing/serial/serial.go +++ b/printing/serial/serial.go @@ -17,7 +17,7 @@ func (s *Serial) Name() string { } func (s *Serial) Description() string { - return "Printing over Serial-Port (e.g. RS232). Endpoint is defined %PORT_NAME%:9600_N81_1. This specifies no parity, 8 data bits, 1 stop bit, a baudrate of 9600 and a 1 second delay between data chunks." + return "Printing over Serial-Port (e.g. RS232). Endpoint is defined %PORT_NAME%:9600_N81_1. This specifies a baudrate of 9600, no parity, 8 data bits, 1 stop bit, and a 1 second delay between data chunks. On Windows the port name is COM1, COM2, etc. On Linux/Unix it is most likely /dev/ttyUSB0, /dev/ttyUSB1, or similar." } func (s *Serial) AvailableEndpoints() (map[string]string, error) { diff --git a/printing/usb/usb.go b/printing/usb/usb.go index 39ba0952..436e3453 100644 --- a/printing/usb/usb.go +++ b/printing/usb/usb.go @@ -33,7 +33,7 @@ func (c *USB) Name() string { } func (c *USB) Description() string { - return "Print directly to a USB attached printer. Use {vendor_id}:{product_id}:{endpoint_address} like 0416:5011:03. To find out how to get these values please take a look at the S&D documentation." + return "Print directly to a USB attached printer. Use {vendor_id}:{product_id}:{endpoint_address} like 0416:5011:03 as endpoint. To find out how to get these values please take a look at the S&D documentation." } func (c *USB) AvailableEndpoints() (map[string]string, error) { diff --git a/printing/windows/direct.go b/printing/windows/direct.go index b73bf8f3..8c7783b7 100644 --- a/printing/windows/direct.go +++ b/printing/windows/direct.go @@ -18,7 +18,7 @@ func (dp *Direct) Name() string { } func (dp *Direct) Description() string { - return "Directly print to a attached printer. Use the Name of the printer as Endpoint." + return "Directly print to a attached printer. Use the Name of the printer as endpoint." } func (dp *Direct) AvailableEndpoints() (map[string]string, error) {