fix the --no-cut option of brother_ql print

This commit is contained in:
Philipp Klaus
2018-09-06 23:11:59 +02:00
parent 0c59fa9fff
commit abd9ebe453
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ The most important command is the `print` command and here is its CLI signature:
be resized to 300dpi.
--lq Print with low quality (faster). Default is
high quality.
--no-cut / --cut Don't cut the tape after printing the label.
--no-cut Don't cut the tape after printing the label.
--help Show this message and exit.
So, printing an image file onto 62mm endless tape on a QL-710W label printer can be as easy as:
+3 -1
View File
@@ -129,7 +129,7 @@ def env(ctx, *args, **kwargs):
@click.option('--red', is_flag=True, help='Create a label to be printed on black/red/white tape (only with QL-8xx series on DK-22251 labels). You must use this option when printing on black/red tape, even when not printing red.')
@click.option('--600dpi', 'dpi_600', is_flag=True, help='Print with 600x300 dpi available on some models. Provide your image as 600x600 dpi; perpendicular to the feeding the image will be resized to 300dpi.')
@click.option('--lq', is_flag=True, help='Print with low quality (faster). Default is high quality.')
@click.option('--no-cut/--cut', is_flag=True, help="Don't cut the tape after printing the label.")
@click.option('--no-cut', is_flag=True, help="Don't cut the tape after printing the label.")
@click.pass_context
def print_cmd(ctx, *args, **kwargs):
""" Print a label of the provided IMAGE. """
@@ -141,6 +141,8 @@ def print_cmd(ctx, *args, **kwargs):
from brother_ql.raster import BrotherQLRaster
qlr = BrotherQLRaster(model)
qlr.exception_on_warning = True
kwargs['cut'] = not kwargs['no_cut']
del kwargs['no_cut']
instructions = convert(qlr=qlr, **kwargs)
send(instructions=instructions, printer_identifier=printer, backend_identifier=backend, blocking=True)