{"id":20561020,"url":"https://github.com/notafile/labelprinterkit","last_synced_at":"2025-05-09T17:33:04.746Z","repository":{"id":82335688,"uuid":"134472867","full_name":"NotAFile/labelprinterkit","owner":"NotAFile","description":null,"archived":true,"fork":false,"pushed_at":"2025-03-23T10:41:28.000Z","size":24,"stargazers_count":14,"open_issues_count":4,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T11:28:41.333Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NotAFile.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-22T20:35:06.000Z","updated_at":"2025-03-23T10:42:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e665461-6ff4-408c-954f-203a6a5c5818","html_url":"https://github.com/NotAFile/labelprinterkit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAFile%2Flabelprinterkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAFile%2Flabelprinterkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAFile%2Flabelprinterkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAFile%2Flabelprinterkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotAFile","download_url":"https://codeload.github.com/NotAFile/labelprinterkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253295807,"owners_count":21885699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T03:56:32.973Z","updated_at":"2025-05-09T17:33:04.732Z","avatar_url":"https://github.com/NotAFile.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Moved\n\nThe official source repository is:\nhttps://git.scc.kit.edu/scc-net/labelprinterkit\n\nA public issue tracker is available at:\nhttps://github.com/ogelpre/labelprinterkit/\n\n### Labelprinterkit\n\nLabelprinterkit is a Python3 library for creating and printing labels. It was\ndeveloped for the Networking department of the KIT (Karlsruhe Institute of\nTechnology).\n\nLabelprinterkit's simple layout engine can be used to declaratively create\nsimple labels:\n\n```python\nfrom Labelprinterkit import backends, items, label\nfrom Labelprinterkit.printers.brother_pt700 import P700\n\n# Define the layout of our label\n# We define a single row with two text items.\n# In real usage, you will probably want to change the font of the text.\nclass MyLabel(label.Label):\n    items = [\n        [items.Text(pad_right=50), items.Text()]\n    ]\n\n# Instantiate the label with specific data\nl = MyLabel(\"text1\", \"text2\")\n# scan for a USB printer using the PyUSBBackend\nprinter = P700(PyUSBBackend.auto())\n# Print!\nprinter.print_label(l)\n```\n\nExample of using a better font:\n\n```python\nfrom PIL import Image, ImageFont\nSIZE = 60\nfont = ImageFont.truetype(\"FreeSans.ttf\", SIZE)\n# Use it in the label template, e.g.\nText(font, pad_right=50)\n```\n\nTo use a Bluetooth connection:\n1. pair your device\n2. specify the serial device node when instantiating the printer:\n\n```\nprinter = P700(BTSerialBackend.auto(devPath='/dev/ttyS8'))\n```\n\nThe Following printers are currently supported:\n\n * Brother P-Touch PT-700 (aka P700)\n\nThe following printers will probably work, as they are supposedly identical,\nbut have not been tested (please tell us if they do!):\n\n * Brother H500\n * Brother E500\n\nThe following printers have been tested to mostly work, although not\nofficially supported (their protocol is similar, although not identical):\n\n* Brother P-touch CUBE Plus PTP710BT\n\nThe following backends are currently supported:\n\n * USB Printer Device Class via PyUSB\n * Bluetooth Serial connection via PySerial\n\nThe official source of this repository is at https://git.scc.kit.edu/scc-net/labelprinterkit.\nPull requests and issues are also accepted on github at https://github.com/notafile/labelprinterkit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotafile%2Flabelprinterkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotafile%2Flabelprinterkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotafile%2Flabelprinterkit/lists"}