← 返回
未分类 中文

Ticketmax

Print markdown files to an ESC/POS thermal receipt printer over TCP, USB, or serial. Supports headings, bold, underline, tables, images, QR codes, paper cuts...
将 Markdown 文件通过 TCP、USB 或串口发送至 ESC/POS 热敏收据打印机打印,支持标题、粗体、下划线、表格、图片、二维码、纸张切割等功能。
yatesdr yatesdr 来源
未分类 clawhub v0.1.3 1 版本 100000 Key: 无需
★ 0
Stars
📥 405
下载
💾 0
安装
1
版本
#latest

概述

ticketmax

Print markdown files to a thermal receipt printer. Write a .md file with standard markdown and ticketmax renders it on any ESC/POS printer over TCP, USB, or serial.

Setup

Set PRINTER_ADDR to your printer's address:

# TCP:
export PRINTER_ADDR=192.168.1.100:9100
# USB:
export PRINTER_ADDR=/dev/usb/lp0
# Serial:
export PRINTER_ADDR=/dev/ttyUSB0

Usage

# Print a markdown file
ticketmax report.md

# Pipe from stdin
echo "# Hello World" | ticketmax -

# Check printer connectivity
ticketmax -status

# Print a test receipt
ticketmax -test

Flags

FlagDefaultDescription
---------
-addr127.0.0.1:9100Printer host:port or device path (env: PRINTER_ADDR)
-baud9600Baud rate for serial connections
-timeout5sNetwork connection timeout
-width46Paper width in characters (1–120)
-spacing20Line spacing in printer units (0–255)
-testPrint test receipt and exit
-statusCheck connectivity and exit

Markdown Syntax

MarkdownPrinter Output
------
# HeadingBold, double-size, centered
## HeadingBold, double-width, centered
### HeadingBold
bold textBold line
textUnderlined line
---Separator line
`\A \B \`Two columns (right-aligned values)
`\A \B \C \`Three columns
!altPrint image (PNG, JPEG, GIF)
` `qr `QR code block
Cut paper
Buzzer (1 beep)
Buzzer (N beeps)

Example

To print a report, write markdown to a temp file and pipe it to ticketmax:

cat <<'EOF' > /tmp/report.md
# Morning Report

## Sales

| Item | Revenue |
| --- | --- |
| Widget A | $1,234 |
| Gadget B | $567 |

---

**Low stock: Widget A (3 units)**

https://dashboard.example.com


<!-- beep -->
EOF

ticketmax /tmp/report.md

Or pipe directly from stdin:

echo "# Alert\n\n**Server down at $(date)**\n\n<!-- beep 3 -->" | ticketmax -

版本历史

共 1 个版本

  • v0.1.3 当前
    2026-05-07 05:11 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 42,402
dev-programming

Docker Essentials

arnarsson
核心 Docker 命令和工作流程,包括容器管理、镜像操作和调试。
★ 40 📥 32,865
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 689 📥 332,772