From abd9ebe4531efd69a0f1e8c7e55a492c3c859bf5 Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Thu, 6 Sep 2018 23:11:59 +0200 Subject: [PATCH] fix the --no-cut option of `brother_ql print` --- README.md | 2 +- brother_ql/cli.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d42ed5f..2efdc54 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/brother_ql/cli.py b/brother_ql/cli.py index f08ce12..2c70f38 100755 --- a/brother_ql/cli.py +++ b/brother_ql/cli.py @@ -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)