annotate README.rst @ 30:ddc251fb92aa

Added tag 0.1.0 for changeset 63d1260cc64e
author Ben Croston <ben@croston.org>
date Tue, 01 Sep 2020 15:57:55 +0100
parents 63d1260cc64e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
5bd9ee5c0cae Initial version
Ben Croston <ben@fuzzyduckbrewery.co.uk>
parents:
diff changeset
1 ============
29
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
2 Zebra-0.1.0
0
5bd9ee5c0cae Initial version
Ben Croston <ben@fuzzyduckbrewery.co.uk>
parents:
diff changeset
3 ============
5bd9ee5c0cae Initial version
Ben Croston <ben@fuzzyduckbrewery.co.uk>
parents:
diff changeset
4
5bd9ee5c0cae Initial version
Ben Croston <ben@fuzzyduckbrewery.co.uk>
parents:
diff changeset
5 Usage:
5bd9ee5c0cae Initial version
Ben Croston <ben@fuzzyduckbrewery.co.uk>
parents:
diff changeset
6
5bd9ee5c0cae Initial version
Ben Croston <ben@fuzzyduckbrewery.co.uk>
parents:
diff changeset
7 ::
5bd9ee5c0cae Initial version
Ben Croston <ben@fuzzyduckbrewery.co.uk>
parents:
diff changeset
8
29
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
9 from zebra import Zebra
10
6a1963ee4aff Added docstrings
Ben Croston <ben@fuzzyduckbrewery.co.uk>
parents: 8
diff changeset
10
29
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
11 z = Zebra( [queue] )
17
a9dacd180597 Does not work in python 2.6 after all
Ben Croston <ben@croston.org>
parents: 16
diff changeset
12 Constructor with optional printer queue
0
5bd9ee5c0cae Initial version
Ben Croston <ben@fuzzyduckbrewery.co.uk>
parents:
diff changeset
13
5bd9ee5c0cae Initial version
Ben Croston <ben@fuzzyduckbrewery.co.uk>
parents:
diff changeset
14 z.getqueues()
17
a9dacd180597 Does not work in python 2.6 after all
Ben Croston <ben@croston.org>
parents: 16
diff changeset
15 Return a list containing available printer queues
0
5bd9ee5c0cae Initial version
Ben Croston <ben@fuzzyduckbrewery.co.uk>
parents:
diff changeset
16
16
3cad40fda053 Updated README
Ben Croston <ben@croston.org>
parents: 10
diff changeset
17 z.setqueue( queue )
17
a9dacd180597 Does not work in python 2.6 after all
Ben Croston <ben@croston.org>
parents: 16
diff changeset
18 Set the printer queue
0
5bd9ee5c0cae Initial version
Ben Croston <ben@fuzzyduckbrewery.co.uk>
parents:
diff changeset
19
16
3cad40fda053 Updated README
Ben Croston <ben@croston.org>
parents: 10
diff changeset
20 z.setup( direct_thermal=None, label_height=None, label_width=None )
29
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
21 Set up the label printer using EPL2. Parameters are not set if they are None.
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
22 Not necessary if using AutoSense (hold feed button while powering on)
16
3cad40fda053 Updated README
Ben Croston <ben@croston.org>
parents: 10
diff changeset
23 direct_thermal - True if using direct thermal labels
3cad40fda053 Updated README
Ben Croston <ben@croston.org>
parents: 10
diff changeset
24 label_height - tuple (label height, label gap) in dots
3cad40fda053 Updated README
Ben Croston <ben@croston.org>
parents: 10
diff changeset
25 label_width - in dots
0
5bd9ee5c0cae Initial version
Ben Croston <ben@fuzzyduckbrewery.co.uk>
parents:
diff changeset
26
29
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
27 z.reset_default()
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
28 Resets the printer to factory settings using EPL2
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
29
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
30 z.reset()
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
31 Resets the printer using EPL2 - equivalent of switching off/on
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
32
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
33 z.autosense()
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
34 Run AutoSense by sending an EPL2 command
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
35 Get the printer to detect label and gap length and set the sensor levels
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
36
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
37 z.print_config_label()
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
38 Send an EPL2 command to print label(s) with current config settings
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
39
16
3cad40fda053 Updated README
Ben Croston <ben@croston.org>
parents: 10
diff changeset
40 z.store_graphic( name, filename )
29
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
41 Store a 1 bit .PCX file on the label printer using EPL2
16
3cad40fda053 Updated README
Ben Croston <ben@croston.org>
parents: 10
diff changeset
42 name - name to be used on printer
3cad40fda053 Updated README
Ben Croston <ben@croston.org>
parents: 10
diff changeset
43 filename - local filename
3cad40fda053 Updated README
Ben Croston <ben@croston.org>
parents: 10
diff changeset
44
29
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
45 z.print_graphic( x, y, width, length, data, qty )
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
46 Print a label from 1 bit data, using EPL2
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
47 x,y - top left coordinates of the image, in dots
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
48 width - width of image, in dots. Must be a multiple of 8.
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
49 length - length of image, in dots
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
50 data - raw graphical data, in bytes
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
51 qty - number of labels to print
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
52
16
3cad40fda053 Updated README
Ben Croston <ben@croston.org>
parents: 10
diff changeset
53 z.output( commands )
29
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
54 Output raw commands to the printer
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
55
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
56 z.print_config_label()
63d1260cc64e - class name is now 'Zebra' instead of 'zebra'
Ben Croston <ben@croston.org>
parents: 27
diff changeset
57 Print label(s) containing the current printer configuration using EPL2
16
3cad40fda053 Updated README
Ben Croston <ben@croston.org>
parents: 10
diff changeset
58
18
777602a0da24 Tested support for MacOSX
Ben Croston <ben@croston.org>
parents: 17
diff changeset
59 Note:
777602a0da24 Tested support for MacOSX
Ben Croston <ben@croston.org>
parents: 17
diff changeset
60
777602a0da24 Tested support for MacOSX
Ben Croston <ben@croston.org>
parents: 17
diff changeset
61 If you are on a Linux or MacOSX machine using CUPS, you may need to set up a
777602a0da24 Tested support for MacOSX
Ben Croston <ben@croston.org>
parents: 17
diff changeset
62 printer queue using the admin panel at http://localhost:631