惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
B
Blog RSS Feed
Recent Announcements
Recent Announcements
Vercel News
Vercel News
M
MIT News - Artificial intelligence
阮一峰的网络日志
阮一峰的网络日志
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
H
Help Net Security
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
G
Google Developers Blog
罗磊的独立博客
爱范儿
爱范儿
宝玉的分享
宝玉的分享
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
S
SegmentFault 最新的问题
WordPress大学
WordPress大学
月光博客
月光博客
人人都是产品经理
人人都是产品经理
Apple Machine Learning Research
Apple Machine Learning Research

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - lukaszliniewicz/catlabel: A local web-based desi...
starry_air · 2026-04-29 · via Hacker News: Show HN

CatLabel Logo

CatLabel is a local web application for designing and printing labels to portable Bluetooth thermal printers.

It is a fork of TiMini Print. CatLabel moves the original CLI and Tkinter-based logic into a web interface built with FastAPI and React, while adding native support for Niimbot the protocol.

catlabel_demo.mp4

catlabel_print

Supported Printers

CatLabel communicates directly with portable thermal printers over Bluetooth. It supports many models that do not use standard ESC/POS commands.

  • Niimbot: D-Series (D11, D110, D101), B-Series (B1, B21, B3S, B24, B18).
  • Phomemo: M-Series (M02, M03, M04, M110, M200, M220), D-Series (D30), T02, P12, PM-241.
  • Generic: Most generic portable printers (often sold as "Cat Printers" or "Mini Printers" using apps like Tiny Print, iBleem, or WalkPrint).

Installation & Running

CatLabel runs a local web server and opens the interface in your browser. It manages its own isolated environment using Micromamba, so it won't interfere with your system's Python or Node.js installations.

Windows

The easiest way to run CatLabel on Windows is using the standalone launcher.

  1. Download CatLabel-Launcher.exe from the Releases page.
  2. Place it in an empty folder where you want the app to reside.
  3. Double-click the executable. It will download the necessary files, configure the environment, and start the app.
catlabel_installation_demo.mp4

macOS & Linux

  1. Clone or download this repository.
  2. Open a terminal in the repository folder.
  3. Run the bootstrap script: chmod +x run.sh && ./run.sh
  4. The script will download Micromamba, install dependencies, compile the frontend, and start the server.

The app runs at http://localhost:8000.


Instruction Manual & Features

CatLabel is divided into a sidebar (for printers and files), a central canvas, and a right-hand properties panel.

1. Canvas Editor (WYSIWYG)

The visual editor allows you to place text, barcodes, QR codes, icons, shapes, and images.

  • Precision Control: In the right panel, you can adjust X/Y coordinates and dimensions using millimeter inputs. Click and drag horizontally on the input labels (where you see ) to scrub the values up and down smoothly.
  • Icons & Images: The toolbar includes a searchable Lucide icon library. Standard images are automatically thresholded (converted to black and white) and dithered to print clearly on thermal heads.
  • Z-Order & Grouping: Use the toolbar to bring elements forward or backward. You can select multiple items (hold Shift) to group them together for moving and scaling.

2. Designing with HTML & CSS

For complex layouts (like shipping labels or split columns), you can use the HTML mode. This bypasses the visual drag-and-drop elements and renders raw HTML onto the label.

Auto-Scaling Text: If you wrap text in an .auto-text class inside a .bound-box container, CatLabel will calculate and apply the exact font size needed to maximize the text within that box. This prevents text from overflowing or being too small without requiring manual font-size guessing.

Example Layout:

<div style="display: flex; flex-direction: column; height: 100%; padding: 4px; gap: 4px;">
  <!-- Top half: Auto-scaling Title -->
  <div class="bound-box" style="flex: 2;">
    <div class="auto-text" style="font-weight: 900;">{{ product_name }}</div>
  </div>
  
  <!-- Divider -->
  <div style="height: 2px; background: black; width: 100%;"></div>
  
  <!-- Bottom half: Dynamic Barcode -->
  <div class="bound-box" style="flex: 1;">
    <div class="catlabel-code" data-type="barcode" data-format="code128" data-value="{{ sku }}"></div>
  </div>
</div>

Note: To add background patterns or colors, place an absolutely positioned div behind your flex containers to ensure the bounding box calculations remain accurate.

3. Variables & Batch Printing

You can design a single template and print multiple variations using variables.

  1. Type {{ any_name }} into a text element, barcode data field, or HTML block.
  2. Open the Batch Data tab in the right panel. The system will automatically detect your variables.
  3. Choose your data input method:
    • Table: Manually type rows of data, or use the "Import CSV" button to map spreadsheet columns to your variables.
    • Permutations (Matrix): Enter comma-separated lists for each variable. The app will generate every possible combination (e.g., Size: S, M, L / Color: Red, Blue).
    • Sequence: Select a variable and set a start number, end number, prefix, and zero-padding to instantly generate serialized labels (e.g., BOX-001 to BOX-050).

4. Wizards & Templates

The toolbar includes a "Wizards" dropdown with built-in forms. These generate standard layouts for specific use cases:

  • Shipping Labels: Includes an address book to save frequently used senders/recipients.
  • Price Tags: Formats currency, large main prices, and underlined cents alongside a barcode.
  • Inventory & IT Assets: Creates a high-contrast department header and paired QR code.
  • Date Tool: Quickly insert today's date, or calculate offset dates (e.g., "+7 Days" for food expiry).

5. AI Layout Assistant

CatLabel includes a chat interface that can write HTML layouts and execute tool commands based on your text requests. It operates in two modes:

  • Live Agent: Enter API keys for OpenAI, Google Gemini, or Vertex AI. You can also point it to a local LLM host (like LM Studio or Ollama) by selecting "Custom" and using http://localhost:1234/v1.
  • External (Copy/Paste): If you already pay for ChatGPT Plus or Claude Pro, you can generate a system prompt block here, paste it into your browser tab, and paste the resulting JSON back into CatLabel. This applies the layout without consuming API credits.

6. Project Management

The sidebar contains a file tree to save your designs.

  • You can create folders and drag-and-drop projects between them.
  • Projects save the canvas dimensions, elements, HTML, and your currently loaded batch data.
  • You can export individual projects or entire folders as JSON files to back them up or share them.

7. Printer Settings (Hardware Overrides)

In the Canvas & Printer tab, you can override default hardware behaviors:

  • Density / Energy: Increase this value to make prints darker (useful for transparent or synthetic label stock), or decrease it if the print head is smudging.
  • Feed Lines: Controls how much blank tape is ejected after a print job to align the cut with the printer's tear-off teeth.
  • Split Mode: Allows you to define a canvas larger than the printer's physical width. The app will slice the image and print it in sequential strips.

Troubleshooting & Bluetooth

  • Windows Pairing: Windows sometimes refuses to communicate with generic SPP (Serial Port Profile) printers unless they are explicitly paired in the Windows Settings menu first. If the app fails to connect, pair it manually in Windows, then try again.
  • macOS Connections: Apple restricts classic Bluetooth SPP connections. CatLabel uses a custom PyObjC bridge to handle this, but you may occasionally need to restart the printer if macOS caches a stale connection state.
  • Niimbot Printers: Niimbot devices use Bluetooth Low Energy (BLE). They do not require OS-level pairing. The app will connect to them directly.
  • Headless Rendering: The HTML layout mode requires Playwright (a headless Chromium browser) to rasterize the HTML into a printable image. If you skipped this step during installation, HTML elements and templates will not render correctly. You can trigger the installation manually by running python -m playwright install chromium inside the env folder.

Architecture

  • Backend (catlabel/): A FastAPI server that handles SQLite storage, Bluetooth communication (via bleak and OS-specific sockets), printer protocol encoding (V5, DCK, Legacy), and headless image rasterization.
  • Frontend (frontend/): A React application using Zustand for state management and Konva.js for the interactive canvas.

License & Attribution

This project is a fork of TiMini Print by Dejniel. The original reverse-engineering of the V5/Generic printer protocols and the core encoding logic belong to the original author.

CatLabel is distributed under the Apache License 2.0.