BlueGit

timfa posprint

Files

posprint
NameLast commitLast update
.cursor feat: include paired Classic Bluetooth SPP printers in discovery 8 weeks ago
docs Experimental: TSPL/TSPL2 label printers (auto-detect, label format per model) + experimental CI release 2 weeks ago
examples Experimental: TSPL/TSPL2 label printers (auto-detect, label format per model) + experimental CI release 2 weeks ago
lib Drop noconfirm referrer verify and trusted sites. 3 months ago
packaging CI: naar BlueGit (blue-ci-cd.yml), AUR- en release-URL's naar BlueGit 3 weeks ago
scripts CI: experimental release replaces itself via BlueGit replace (job token only) 2 weeks ago
src Experimental: TSPL/TSPL2 label printers (auto-detect, label format per model) + experimental CI release 2 weeks ago
tests Tests: ESC/POS golden corpus generated from unmodified master 2 weeks ago
.gitattributes fix: restore tag release downloads and AUR bin publish 8 weeks ago
.gitignore Add Arch Linux pacman release via PKGBUILD and GitLab CI. 4 months ago
blue-ci-cd.yml Experimental: TSPL/TSPL2 label printers (auto-detect, label format per model) + experimental CI release 2 weeks ago
build.rs fixes 4 months ago
Cargo.lock Experimental: TSPL/TSPL2 label printers (auto-detect, label format per model) + experimental CI release 2 weeks ago
Cargo.toml Experimental: TSPL/TSPL2 label printers (auto-detect, label format per model) + experimental CI release 2 weeks ago
LICENSE Add core library: DSL parser, parameters, and .pos file I/O. 4 months ago
pos-logo.png fixes 4 months ago
README.md CI: naar BlueGit (blue-ci-cd.yml), AUR- en release-URL's naar BlueGit 3 weeks ago
RELEASE_NOTES.md CI: macOS-build (universal, cross) en automatische release na groene master 3 weeks ago
README.md

posprint

Cross-platform designer for POS (point-of-sale) receipt documents. Edit templates in a markdown-like syntax, preview output live, substitute runtime parameters, and print via raw ESC/POS (USB printer-class, Windows spooler, USB-serial, or Classic Bluetooth SPP after OS pairing).

Target platforms: Windows, Linux (x64), and macOS (Apple Silicon / Intel).

Status

v0.5.7 — Classic Bluetooth SPP after OS pairing (Windows COM / Linux rfcomm); BLE still out of scope.

Build and run

Requires Rust 1.88+ (rustup or pacman -S rust on Arch). See docs/BUILD.md for OS libraries and package scripts.

cargo test          # unit tests
cargo run           # launch the designer
cargo build --release

Scripts: scripts/build-windows.ps1, scripts/build-linux.sh, scripts/build-arch.sh, scripts/build-macos.sh (Interactive shells offer to install missing dependencies.)

Command-line printing

# List discovered printers (USB, spooler, serial, paired Bluetooth SPP)
posprint list

# Windows (serial, Bluetooth COM after pairing, or spooler queue name)
posprint print receipt.pos -p COM3 --set StoreName="Shop" --set DocumentNumber=42

# Linux / macOS (USB-direct, 'auto', USB-serial, or RFCOMM/Bluetooth SPP)
posprint print receipt.pos -p auto --set StoreName="Shop" --set DocumentNumber=42
posprint print receipt.pos -p /dev/ttyUSB0 --set StoreName="Shop" --set DocumentNumber=42

# Embedded CLI help for this OS
posprint cli-help

All ${Parameters} must be supplied via --set NAME=VALUE or the command fails.

Linux serial: add your user to the dialout group.

Releases (BlueGit CI)

PlatformArtifactInstall
Linux (Debian/Ubuntu).deb (amd64)sudo dpkg -i posprint_*_amd64.deb then sudo apt-get install -f
Linux (Arch).pkg.tar.zst (x86_64)sudo pacman -U posprint-*-x86_64.pkg.tar.zst or AUR posprint / posprint-bin
Windowsposprint.exeDownload from the BlueGit releases

Every master pipeline on BlueGit builds all packages. Start the manual release job to create the next tag (highest tag + 1 patch, or RELEASE_VERSION) with the packages as release assets; publish:aur then updates the posprint and posprint-bin AUR packages. See blue-ci-cd.yml. Releases up to 0.5.8 are on the old GitLab project.

Features

  • Markdown-like template editor with live preview (Design tab)
  • Page width (mm) and calibrated preview zoom
  • Save and load .pos files
  • Parameter tokens: ${Name} (text) and $[Name] (bool checkbox) via print dialog and CLI --set
  • Inline ASCII checkboxes ([] / [ ] / [x]) — CP437-safe on thermal printers
  • Nested bullet lists, headings, @date / @time, barcodes, QR, images
  • Print via USB-direct, Windows spooler, USB-serial, or paired Classic Bluetooth SPP (baud probed; BLE not supported)
  • In-app Help tab (from docs/HELP.md)

Documentation

DocumentDescription
HELP.mdUser reference (mirrored in-app Help tab)
ARCHITECTURE.mdSystem architecture and module breakdown
DSL-SPEC.mdDocument markup language (.pos body syntax)
FILE-FORMAT.md.pos file envelope (metadata + body)
PRINTING.mdPrinter discovery, transport, ESC/POS pipeline
POSPRINT-URL.mdposprint:// deep links and lib/ helpers
AUR.mdAUR package layout, secrets, and tag-driven publishing
BUILD.mdLocal build scripts and Linux package formats

Documentation must stay aligned with the codebase; see .cursor/rules/documentation.mdc.

Dependencies (minimal)

CrateWhy
eframe / eguiNative UI
serde / serde_json.pos file format
serialportSerial printer I/O
rusbUSB printer-class devices
imageLoad PNG/JPEG for @image
rfdNative open/save dialogs
barcodersRaster barcode rendering
qrcodeRaster QR rendering
clapCLI print / link / cli-help
flate2 / base64posprint:// URL payload
ureqDownload @image http(s)://…

ESC/POS encoding is implemented in-tree.