fix the --no-cut option of brother_ql print
This commit is contained in:
@@ -124,7 +124,7 @@ The most important command is the `print` command and here is its CLI signature:
|
|||||||
be resized to 300dpi.
|
be resized to 300dpi.
|
||||||
--lq Print with low quality (faster). Default is
|
--lq Print with low quality (faster). Default is
|
||||||
high quality.
|
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.
|
--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:
|
So, printing an image file onto 62mm endless tape on a QL-710W label printer can be as easy as:
|
||||||
|
|||||||
+3
-1
@@ -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('--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('--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('--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
|
@click.pass_context
|
||||||
def print_cmd(ctx, *args, **kwargs):
|
def print_cmd(ctx, *args, **kwargs):
|
||||||
""" Print a label of the provided IMAGE. """
|
""" Print a label of the provided IMAGE. """
|
||||||
@@ -141,6 +141,8 @@ def print_cmd(ctx, *args, **kwargs):
|
|||||||
from brother_ql.raster import BrotherQLRaster
|
from brother_ql.raster import BrotherQLRaster
|
||||||
qlr = BrotherQLRaster(model)
|
qlr = BrotherQLRaster(model)
|
||||||
qlr.exception_on_warning = True
|
qlr.exception_on_warning = True
|
||||||
|
kwargs['cut'] = not kwargs['no_cut']
|
||||||
|
del kwargs['no_cut']
|
||||||
instructions = convert(qlr=qlr, **kwargs)
|
instructions = convert(qlr=qlr, **kwargs)
|
||||||
send(instructions=instructions, printer_identifier=printer, backend_identifier=backend, blocking=True)
|
send(instructions=instructions, printer_identifier=printer, backend_identifier=backend, blocking=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user