Commit Graph

150 Commits

Author SHA1 Message Date
Philipp Klaus
1e24d192e4 fix help in CLI brother_ql & list labels in README 2018-08-08 19:45:17 +02:00
Philipp Klaus
fd2206891b Py2 compat of brother_ql.reader - fixes #35 2018-08-08 19:39:37 +02:00
Philipp Klaus
3944efad85 SIMILAR_SOFTWARE updated 2018-08-08 19:15:14 +02:00
Philipp Klaus
fa8852afbb setup.py: development now reached 0.9.dev0 2018-08-08 19:05:15 +02:00
Philipp Klaus
142cf744d8 Merge pull request #37 from pklaus/dev
New unified CLI: `brother_ql`
2018-08-08 19:01:01 +02:00
Philipp Klaus
160cea90d4 new CLI: brother_ql
This will slowly deprecate the other CLIs such as
* brother_ql_create
* brother_ql_print
* brother_ql_info
* brother_ql_analyze
* brother_ql_debug
2018-08-08 18:50:01 +02:00
Philipp Klaus
388eaae2d6 Move label creating code from CLI tool brother_ql_create -> module
The code previously found in the function
create_label()  in  brother_ql.brother_ql_create
now went into a new function convert() in its own module:
convert()  in  brother_ql.conversion

In addition, the new convert() function is now able to
put more than one pages (labels) into one instruction file.
2018-08-08 18:18:07 +02:00
Philipp Klaus
480805af9a bug fixes & module rename -> brother_ql.backends.helpers
The rename was:
brother_ql.{printing,discovering} -> brother_ql.backends.helpers
2018-08-08 18:02:25 +02:00
Philipp Klaus
9e93664abe Ability to change output filename of BrotherQLReader
The member variable filename_fmt now holds the relevant
format template and can be changed after instatiation.
2018-08-08 14:42:48 +02:00
Philipp Klaus
6a94465bea fix: logging output in BrotherQLReader() raises TypeError
The following error is resolved with this fix:
TypeError: not all arguments converted during string formatting
2018-08-08 14:33:49 +02:00
Philipp Klaus
c42773b613 Split brother_ql_print -> brother_ql.{printing,discovering} 2018-07-31 21:59:32 +02:00
Philipp Klaus
5267986fd0 backends: rename string_descr -> identifier
The strings like tcp://192.168.0.23:9100 or
usb://0x04f9:0x2015 are rather 'identifiers'
than descriptors (terminology).
Users relying on the returned dictionaries of the
list_available_devices() function need to update
the key from 'string_descr' to 'identifier'.
Sorry for the inconvenience.
2018-07-31 21:55:50 +02:00
Philipp Klaus
9b1311f9ba fix printing greyscale images on black/red tape 2018-07-10 12:14:07 +02:00
Philipp Klaus
351fb9bcec List supported models QL-800 QL-820NWB QL-1050 in setup.py, too 2018-02-20 21:23:58 +01:00
Philipp Klaus
4e67291a5e QL-1050 confirmed to work by jleguen in pull request #30 2018-02-20 21:19:27 +01:00
jleguen
5ecd8b747e Take into account printer-dependent right margin additions (#30) 2018-01-30 02:35:08 +01:00
Philipp Klaus
ceed43ef6e README: Remove note about missing 600dpi mode (incorrect since a354cde) 2018-01-28 13:19:44 +01:00
Philipp Klaus
19110118e0 Add hint to web interface in README 2018-01-28 13:14:12 +01:00
Philipp Klaus
6a2ff81dd3 README: Rearrange and slightly rephrase info on Editor Lite mode 2018-01-28 13:13:47 +01:00
Brian Manifold
aae157a99e Update README to note editor lite problems 2018-01-28 12:19:48 +01:00
Philipp Klaus
99ee28fdaa require pillow>=3.3.0
with pillow < 3.3.0, the call of Image.new()
in brother_ql/brother_ql_create.py line 113
would fail with the following error:

[...]
  File "/usr/lib/python3.4/site-packages/brother_ql/brother_ql_create.py", line 113, in create_label
    new_im = Image.new(im.mode, (device_pixel_width, im.size[1]), (255,)*len(im.mode))
  File "/usr/lib64/python3.4/site-packages/PIL/Image.py", line 2050, in new
    return Image()._new(core.fill(mode, size, color))
TypeError: an integer is required (got type tuple)
2018-01-15 15:26:20 +01:00
Philipp Klaus
32ba70b7dc removed import numpy overlooked in 76f4677 (fixes #26) 2018-01-06 19:03:18 +01:00
Philipp Klaus
e5d4fde7d5 Correct Brother DK-11241 label size "102x152", fixes #27 2018-01-06 18:25:21 +01:00
Philipp Klaus
69d8b0395f brother_ql_print network backend timeout fix (#23) 2017-10-18 23:55:52 +02:00
Philipp Klaus
e27bc9d491 brother_ql_analyze can now read from stdin (with '-') 2017-10-18 23:28:46 +02:00
Philipp Klaus
aaf9a085b8 brother_ql_print: log discovered devices to stderr 2017-10-06 22:02:30 +02:00
Philipp Klaus
2f3655b648 Allow low quality printing with --lq 2017-10-06 22:01:52 +02:00
Philipp Klaus
a354cde4eb New --600dpi flag to support 600x300 dpi mode 2017-10-01 20:59:05 +02:00
Philipp Klaus
88c0920768 create_label() convert rotate to int() early on if not 'auto' 2017-10-01 13:26:37 +02:00
Russ Garrett
f8eec9a410 Readme updates for QL-800
This seems to work fine on the QL-800, thanks! I've added a tick against
it.

I've also slightly updated the help for `brother_ql_create` to make it
clear that you have to enable the --red option to print on tape which
supports red, otherwise the printer reports an error.

(This happens with the P-Touch software too and it's really unclear what
you're doing wrong.)
2017-09-23 10:33:24 +02:00
Philipp Klaus
fae49bc1dc brother_ql_print fix --list-printers to print all found printers 2017-09-19 21:57:59 +02:00
Philipp Klaus
5b3d70842e brother_ql_analyze: improved INFO output 2017-09-19 21:12:05 +02:00
Philipp Klaus
467c15ef0f raise exception (instead of sys.exit()) in create_label()
create_label() is the most important function to be used (imported)
by other Python scripts and packages. It shouldn't force its calling
code or program to terminate in case of invalid input.
2017-09-19 21:06:39 +02:00
Philipp Klaus
baea505a46 brother_ql_create: fix b/w label creation from .gif files 2017-09-19 21:04:47 +02:00
Philipp Klaus
ee16bd68bb pushing version to v0.8.dev0 2017-09-19 14:25:43 +02:00
Philipp Klaus
b96cd35ea1 prevent using --red (two color printing) if not supported by model 2017-09-19 14:23:18 +02:00
Philipp Klaus
d373acbbc7 collection of similar software with a link in the README 2017-09-19 13:52:41 +02:00
Philipp Klaus
27c35710cd also apply --threshold to --red labels 2017-09-19 13:02:47 +02:00
Philipp Klaus
a15084ad02 Convert indexed images (GIF) to RGB (if printing in --red) 2017-09-19 12:54:49 +02:00
Philipp Klaus
610954f800 brother_ql_create --red speedup (saving 90% CPU time)
The dissection of the color into red, black, & white now
takes part in the HSV color space (instead of HLS before).
Pillow's built-in capabilities to convert RGB → HSV
are now used.

While the creation of --red labels still takes 16 times longer
than the simple black/white ones, it is now 90% less time than
before this commit.
2017-09-19 12:49:00 +02:00
Philipp Klaus
f52afbac62 brother_ql_analyze: black overrides red 2017-09-19 10:43:21 +02:00
Philipp Klaus
ed97975b9c QL-800 series: printing black/red/white labels (CLI: --red) 2017-09-19 10:42:12 +02:00
Philipp Klaus
f1fd99f9a7 brother_ql_create new CLI argument --compress
* create_label() now accepts a new keyword argument compress.
  The default is False → no compression if not set manually.
  This will speed-up the label creation in many cases
  at the expense of larger file sizes. Set to True if you
  don't care about processing time but want to store the
  generated label files.
* The brother_ql_create CLI offers this via the new
  argument --compress.
  New default (if not set): no compression.
2017-09-18 21:05:50 +02:00
Philipp Klaus
00c2cb9712 fix documentation of usb:// descriptor string 2017-09-17 22:04:00 +02:00
Philipp Klaus
ee69e04f80 round labels: state actual / expected size when failing 2017-09-17 21:33:02 +02:00
Philipp Klaus
e2b7e2d7f6 create_label(): first .paste(), then .convert("L")
The advantage is that the conversion to grayscale is now done
in the same way for all labels just before the conversion
to b/w.
The memory footprint shouln't increase too much.
And profiling showed that the the performance for small labels
that need pasting didn't deteriorate.
2017-09-17 21:28:17 +02:00
Philipp Klaus
11227c0db6 brother_ql_create: new CLI parameter --dither 2017-09-17 20:44:08 +02:00
Philipp Klaus
d681d0ee9c new kwarg dither in create_label() 2017-09-17 18:50:03 +02:00
Philipp Klaus
707c33ffff QL-820NWB is now supported, printing red/black/white not yet 2017-09-16 22:42:59 +02:00
Philipp Klaus
555a51a0ad adding device dependent settings for QL-800 series 2017-09-16 12:23:34 +02:00