taep


Nametaep JSON
Version 1.0.0rc2 PyPI version JSON
download
home_pageNone
SummaryPrint pictures as collages using label tape printers
upload_time2024-04-21 17:24:33
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseGPLv2+ or LGPLv2.1+
keywords graphics svg printing printer label label printer brother p-touch dithering image processing collage
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            taep: Print pictures as collages with label tape printers
===========================================================

.. figure:: readme_flow.png
  :width: 800px

  The `taep` workflow from artwork to a physical T-shirt using iron-on label tape. Cat photo by `Jae Park <https://unsplash.com/photos/brown-tabby-cat-7GX5aICb5i4>`__.

``taep`` is a tool that helps you create collages out of label tape printed with a label printer such as Brother's
P-touch devices.

``taep dither`` takes an SVG file with your design and some lines representing the labels' locations, and
outputs a list of dithered PNG files, one for each label, ready for printing. Optionally, ``taep print`` can also directly
print these rendered images for you using the ``ptouch-print`` tool.

For creating and tweaking your design, ``taep`` has several helper utilities built-in. ``taep template`` will generate a
template with a label tape layout you give it that you can use to base your design off of. ``taep preview`` will render
a preview that approximates how the printed labels will look when you lay them out. ``taep assembly`` will render an
assembly diagram with labels indicating each label tape's number in the order output by ``taep dither`` or `taep
print`.

Quick start
-----------

1. Install ``taep`` from PyPI using `pip install taep`, and install ``usvg``, ``resvg``, ``didder`` and ``ptouch-print`` as
   shown below under Dependencies_.
2. Run ``taep template template.svg`` to create a template with pre-generated label tape areas. The default tape width
   is 24mm, but you can adjust this as you wish.
3. Create a new SVG document and design your artwork in it.
4. Copy the label tape areas from the template into your artwork SVG and save the resulting SVG. ``taep`` will later
   identify these areas by their color. You can copy or delete these, change the length of them, and move and rotate
   them as you wish. Just make sure you don't skew or shear them and that you don't change their width so that they
   still match the width of the tape that's physically in the printer you're using.
5. Run ``taep preview artwork_with_label_areas.svg`` on this SVG to render a preview image. By default, ``taep`` will
   open this preview image in your browser. If that doesn't work, run ``taep preview [input].svg preview_out.svg`` to
   write it to `preview_out.svg` and open that file with an SVG viewer of your choice. Adjust the content of your design
   as necessary.
6. Run ``taep print artwork_with_label_areas.svg`` to print your artwork to a brother P-touch label printer connected
   via USB.

Dependencies
------------

usvg
    ``usvg`` can be installed using ``cargo install usvg``.

    ``usvg`` is used by ``taep`` to simplify the input SVG file before processing it.

resvg
    ``resvg`` can be installed using ``cargo install resvg``.

    ``taep`` uses ``resvg`` to rasterize the SVG file.

didder
    ``didder`` can be installed from source at `https://github.com/makew0rld/didder <https://github.com/makew0rld/didder>`__.

    ``taep`` uses ``didder`` to dither the rasterized input, because these thermal label printers can only print two
    colors and do not support grayscale.

ptouch-print (optional)
    ``ptouch-print`` can be installed from source at `https://git.familie-radermacher.ch/linux/ptouch-print.git <https://git.familie-radermacher.ch/linux/ptouch-print.git>`__.

    ``taep`` uses ``ptouch-print`` when you ask it to print the generated labels using ``taep print``. You can also use
    ``taep dither`` to just generate a pile of PNGs, and use something else to print them.

Command-Line Interface Usage
----------------------------

You can override where ``taep`` looks for ``usvg``, ``resvg``, ``didder`` and ``ptouch-print`` by passing the full path to a
binary through the environment variables ``USVG``, ``RESVG``, ``DIDDER`` and ``PTOUCH_PRINT``.

You can override didder's dithering settings by passing the environment variable `DIDDER_ARGS`. The default value used
when this variable is not set is `edm --serpentine FloydSteinberg`.

.. code-block:: shell

    bigdata~/p/taep <3 python -m taep --help
    Usage: python -m taep [OPTIONS] COMMAND [ARGS]...

    Options:
      --help  Show this message and exit.

    Commands:
      assembly
      dither
      preview
      print
      template

``taep template``
~~~~~~~~~~~~~~~~~~~

.. code-block:: shell

    bigdata~/p/taep <3 python -m taep template --help
    Usage: python -m taep template [OPTIONS] [OUTPUT_SVG]

    Options:
      --num-rows INTEGER    Number of tapes
      --tape-width FLOAT    Width of tape
      --tape-border FLOAT   Width of empty border at the edges of the tape in mm
      --tape-spacing FLOAT  Space between tapes
      --tape-length FLOAT   Length of tape segments
      --magic-color TEXT    SVG color of tape
      --help                Show this message and exit.

``taep preview``
~~~~~~~~~~~~~~~~~~

.. code-block:: shell

    bigdata~/p/taep <3 python -m taep preview --help
    Usage: python -m taep preview [OPTIONS] [INPUT_SVG] [OUTPUT_SVG]

    Options:
      --magic-color TEXT      SVG color of tape
      --dpi FLOAT             Printer bitmap resolution in DPI
      --pixel-height INTEGER  Printer tape vertical pixel height
      --help                  Show this message and exit.

``taep dither``
~~~~~~~~~~~~~~~~~

.. code-block:: shell

    bigdata~/p/taep <3 python -m taep dither --help
    Usage: python -m taep dither [OPTIONS] [INPUT_SVG] OUTPUT_DIR

    Options:
      --magic-color TEXT      SVG color of tape
      --dpi FLOAT             Printer bitmap resolution in DPI
      --pixel-height INTEGER  Printer tape vertical pixel height
      --help                  Show this message and exit.

``taep print``
~~~~~~~~~~~~~~~~

.. code-block:: shell

    bigdata~/p/taep <3 python -m taep print --help
    Usage: python -m taep print [OPTIONS] [INPUT_SVG]

    Options:
      --magic-color TEXT        SVG color of tape
      --dpi FLOAT               Printer bitmap resolution in DPI
      --pixel-height INTEGER    Printer tape vertical pixel height
      --confirm / --no-confirm  Ask for confirmation before printing each tape
      --tape TEXT               The index numbers of which tapes to print. Comma-
                                separate list, each entry is either a single
                                number or a "3-5" style range where both ends are
                                included.
      --help                    Show this message and exit.

``taep assembly``
~~~~~~~~~~~~~~~~~~~

.. code-block:: shell

    bigdata~/p/taep <3 python -m taep assembly --help
    Usage: python -m taep assembly [OPTIONS] [INPUT_SVG] [OUTPUT_SVG]

    Options:
      --magic-color TEXT      SVG color of tape
      --dpi FLOAT             Printer bitmap resolution in DPI
      --pixel-height INTEGER  Printer tape vertical pixel height
      --help                  Show this message and exit.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "taep",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "graphics, svg, printing, printer, label, label printer, brother, p-touch, dithering, image processing, collage",
    "author": null,
    "author_email": "jaseg <code@jaseg.de>",
    "download_url": "https://files.pythonhosted.org/packages/7f/76/33a37e127ad92670fe5fe0c477093771a5c40e63729d791fa3311413212a/taep-1.0.0rc2.tar.gz",
    "platform": null,
    "description": "taep: Print pictures as collages with label tape printers\n===========================================================\n\n.. figure:: readme_flow.png\n  :width: 800px\n\n  The `taep` workflow from artwork to a physical T-shirt using iron-on label tape. Cat photo by `Jae Park <https://unsplash.com/photos/brown-tabby-cat-7GX5aICb5i4>`__.\n\n``taep`` is a tool that helps you create collages out of label tape printed with a label printer such as Brother's\nP-touch devices.\n\n``taep dither`` takes an SVG file with your design and some lines representing the labels' locations, and\noutputs a list of dithered PNG files, one for each label, ready for printing. Optionally, ``taep print`` can also directly\nprint these rendered images for you using the ``ptouch-print`` tool.\n\nFor creating and tweaking your design, ``taep`` has several helper utilities built-in. ``taep template`` will generate a\ntemplate with a label tape layout you give it that you can use to base your design off of. ``taep preview`` will render\na preview that approximates how the printed labels will look when you lay them out. ``taep assembly`` will render an\nassembly diagram with labels indicating each label tape's number in the order output by ``taep dither`` or `taep\nprint`.\n\nQuick start\n-----------\n\n1. Install ``taep`` from PyPI using `pip install taep`, and install ``usvg``, ``resvg``, ``didder`` and ``ptouch-print`` as\n   shown below under Dependencies_.\n2. Run ``taep template template.svg`` to create a template with pre-generated label tape areas. The default tape width\n   is 24mm, but you can adjust this as you wish.\n3. Create a new SVG document and design your artwork in it.\n4. Copy the label tape areas from the template into your artwork SVG and save the resulting SVG. ``taep`` will later\n   identify these areas by their color. You can copy or delete these, change the length of them, and move and rotate\n   them as you wish. Just make sure you don't skew or shear them and that you don't change their width so that they\n   still match the width of the tape that's physically in the printer you're using.\n5. Run ``taep preview artwork_with_label_areas.svg`` on this SVG to render a preview image. By default, ``taep`` will\n   open this preview image in your browser. If that doesn't work, run ``taep preview [input].svg preview_out.svg`` to\n   write it to `preview_out.svg` and open that file with an SVG viewer of your choice. Adjust the content of your design\n   as necessary.\n6. Run ``taep print artwork_with_label_areas.svg`` to print your artwork to a brother P-touch label printer connected\n   via USB.\n\nDependencies\n------------\n\nusvg\n    ``usvg`` can be installed using ``cargo install usvg``.\n\n    ``usvg`` is used by ``taep`` to simplify the input SVG file before processing it.\n\nresvg\n    ``resvg`` can be installed using ``cargo install resvg``.\n\n    ``taep`` uses ``resvg`` to rasterize the SVG file.\n\ndidder\n    ``didder`` can be installed from source at `https://github.com/makew0rld/didder <https://github.com/makew0rld/didder>`__.\n\n    ``taep`` uses ``didder`` to dither the rasterized input, because these thermal label printers can only print two\n    colors and do not support grayscale.\n\nptouch-print (optional)\n    ``ptouch-print`` can be installed from source at `https://git.familie-radermacher.ch/linux/ptouch-print.git <https://git.familie-radermacher.ch/linux/ptouch-print.git>`__.\n\n    ``taep`` uses ``ptouch-print`` when you ask it to print the generated labels using ``taep print``. You can also use\n    ``taep dither`` to just generate a pile of PNGs, and use something else to print them.\n\nCommand-Line Interface Usage\n----------------------------\n\nYou can override where ``taep`` looks for ``usvg``, ``resvg``, ``didder`` and ``ptouch-print`` by passing the full path to a\nbinary through the environment variables ``USVG``, ``RESVG``, ``DIDDER`` and ``PTOUCH_PRINT``.\n\nYou can override didder's dithering settings by passing the environment variable `DIDDER_ARGS`. The default value used\nwhen this variable is not set is `edm --serpentine FloydSteinberg`.\n\n.. code-block:: shell\n\n    bigdata~/p/taep <3 python -m taep --help\n    Usage: python -m taep [OPTIONS] COMMAND [ARGS]...\n\n    Options:\n      --help  Show this message and exit.\n\n    Commands:\n      assembly\n      dither\n      preview\n      print\n      template\n\n``taep template``\n~~~~~~~~~~~~~~~~~~~\n\n.. code-block:: shell\n\n    bigdata~/p/taep <3 python -m taep template --help\n    Usage: python -m taep template [OPTIONS] [OUTPUT_SVG]\n\n    Options:\n      --num-rows INTEGER    Number of tapes\n      --tape-width FLOAT    Width of tape\n      --tape-border FLOAT   Width of empty border at the edges of the tape in mm\n      --tape-spacing FLOAT  Space between tapes\n      --tape-length FLOAT   Length of tape segments\n      --magic-color TEXT    SVG color of tape\n      --help                Show this message and exit.\n\n``taep preview``\n~~~~~~~~~~~~~~~~~~\n\n.. code-block:: shell\n\n    bigdata~/p/taep <3 python -m taep preview --help\n    Usage: python -m taep preview [OPTIONS] [INPUT_SVG] [OUTPUT_SVG]\n\n    Options:\n      --magic-color TEXT      SVG color of tape\n      --dpi FLOAT             Printer bitmap resolution in DPI\n      --pixel-height INTEGER  Printer tape vertical pixel height\n      --help                  Show this message and exit.\n\n``taep dither``\n~~~~~~~~~~~~~~~~~\n\n.. code-block:: shell\n\n    bigdata~/p/taep <3 python -m taep dither --help\n    Usage: python -m taep dither [OPTIONS] [INPUT_SVG] OUTPUT_DIR\n\n    Options:\n      --magic-color TEXT      SVG color of tape\n      --dpi FLOAT             Printer bitmap resolution in DPI\n      --pixel-height INTEGER  Printer tape vertical pixel height\n      --help                  Show this message and exit.\n\n``taep print``\n~~~~~~~~~~~~~~~~\n\n.. code-block:: shell\n\n    bigdata~/p/taep <3 python -m taep print --help\n    Usage: python -m taep print [OPTIONS] [INPUT_SVG]\n\n    Options:\n      --magic-color TEXT        SVG color of tape\n      --dpi FLOAT               Printer bitmap resolution in DPI\n      --pixel-height INTEGER    Printer tape vertical pixel height\n      --confirm / --no-confirm  Ask for confirmation before printing each tape\n      --tape TEXT               The index numbers of which tapes to print. Comma-\n                                separate list, each entry is either a single\n                                number or a \"3-5\" style range where both ends are\n                                included.\n      --help                    Show this message and exit.\n\n``taep assembly``\n~~~~~~~~~~~~~~~~~~~\n\n.. code-block:: shell\n\n    bigdata~/p/taep <3 python -m taep assembly --help\n    Usage: python -m taep assembly [OPTIONS] [INPUT_SVG] [OUTPUT_SVG]\n\n    Options:\n      --magic-color TEXT      SVG color of tape\n      --dpi FLOAT             Printer bitmap resolution in DPI\n      --pixel-height INTEGER  Printer tape vertical pixel height\n      --help                  Show this message and exit.\n\n",
    "bugtrack_url": null,
    "license": "GPLv2+ or LGPLv2.1+",
    "summary": "Print pictures as collages using label tape printers",
    "version": "1.0.0rc2",
    "project_urls": {
        "homepage": "https://github.com/jaseg/taep"
    },
    "split_keywords": [
        "graphics",
        " svg",
        " printing",
        " printer",
        " label",
        " label printer",
        " brother",
        " p-touch",
        " dithering",
        " image processing",
        " collage"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed87c501faf2032a3b68b7e3f6e2bff49fcf48c8e95c00084e5a8cbf0f5c0618",
                "md5": "fe15ba425f6b78018f1c43a86ca491e8",
                "sha256": "78f4ff5039de173ee5801c6443b0188adebbfb5557f3b5b4de263142db6f0dc1"
            },
            "downloads": -1,
            "filename": "taep-1.0.0rc2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fe15ba425f6b78018f1c43a86ca491e8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 3687,
            "upload_time": "2024-04-21T17:24:31",
            "upload_time_iso_8601": "2024-04-21T17:24:31.504002Z",
            "url": "https://files.pythonhosted.org/packages/ed/87/c501faf2032a3b68b7e3f6e2bff49fcf48c8e95c00084e5a8cbf0f5c0618/taep-1.0.0rc2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f7633a37e127ad92670fe5fe0c477093771a5c40e63729d791fa3311413212a",
                "md5": "160b2f81fa4a765c12f53abd673ecc1b",
                "sha256": "4c736c6b633dd951c77dc0cdd267aeb0a0247c4574da422e839555c39eeed7d7"
            },
            "downloads": -1,
            "filename": "taep-1.0.0rc2.tar.gz",
            "has_sig": false,
            "md5_digest": "160b2f81fa4a765c12f53abd673ecc1b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 4049,
            "upload_time": "2024-04-21T17:24:33",
            "upload_time_iso_8601": "2024-04-21T17:24:33.756164Z",
            "url": "https://files.pythonhosted.org/packages/7f/76/33a37e127ad92670fe5fe0c477093771a5c40e63729d791fa3311413212a/taep-1.0.0rc2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-21 17:24:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jaseg",
    "github_project": "taep",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "taep"
}
        
Elapsed time: 0.21480s