BlueGit

timfa posprint

Overview

Activity

NovDecJanFebMarAprMayJunJulAugSepOctNov

160 contributions in the last 12 months

LessMore

Commits, merge requests and comments.

posprint
da999f5a History
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 directly to USB serial POS printers via raw ESC/POS bytes.

Target platforms: Windows and Linux (x64).

Status

v0.1.0 MVP — Rust + egui app with editor, preview, help, .pos files, parameters, and USB-serial printing.

Build and run

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

Linux: add your user to the dialout group for USB-serial printer access.

Releases (GitLab CI)

PlatformArtifactInstall
Linux.deb (amd64)sudo dpkg -i posprint_*_amd64.deb then sudo apt-get install -f
Windowsposprint.exeDownload from GitLab release job artifacts

Tag a version (e.g. v0.1.0) to trigger release builds.

Features

  • Markdown-like template editor with live preview
  • Page width: auto-scale or fixed width (mm)
  • Save and load .pos files
  • Parameter tokens (${DocumentNumber}) with print-time popup and value reuse
  • Barcodes, QR codes, and images (including parameterized content)
  • Print to USB-serial POS printers via raw ESC/POS bytes
  • In-app Help tab (from docs/HELP.md)

Dependencies (minimal)

CrateWhy
eframe / eguiNative UI
serde / serde_json.pos file format
serialportUSB-serial printer I/O
imageLoad PNG/JPEG for @image
rfdNative open/save dialogs

ESC/POS encoding is implemented in-tree.

Design documents

DocumentDescription
FEASIBILITY.mdFeasibility assessment, complexity estimate, risks
LANGUAGE-CHOICE.mdLanguage and framework recommendation
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

Planned features

  • Bluetooth printer support (deferred)

Quick feasibility summary

Verdict: feasible for a small team or solo developer, with the printing layer as the main engineering risk.

AreaComplexityNotes
Editor + preview UIMediumWell-trodden path
DSL parser + rendererMediumCustom grammar, bounded scope
ParametersLowStraightforward substitution
Barcodes / QR / imagesLow–MediumMature libraries exist
USB / BT printer I/OHighOS differences, device quirks
Overall (MVP)Medium–High~6–10 weeks for one experienced dev

Stack: Rust + egui (single language, minimal dependencies). USB-serial printing only in v1. See LANGUAGE-CHOICE.md and docs/HELP.md.