A partial implementation of the StarPRNT command protocol in Gleam
Find a file
Lily Rose 362667af34
Some checks failed
test / test (push) Failing after 2s
Bump version to 1.0.2
2026-03-08 02:19:12 +11:00
.github/workflows Initial commit 2026-03-08 00:40:51 +11:00
fonts Initial commit 2026-03-08 00:40:51 +11:00
src Add image print function 2026-03-08 02:18:48 +11:00
test Add image print function 2026-03-08 02:18:48 +11:00
.gitignore Initial commit 2026-03-08 00:40:51 +11:00
gen_font.py Initial commit 2026-03-08 00:40:51 +11:00
gleam.toml Bump version to 1.0.2 2026-03-08 02:19:12 +11:00
manifest.toml Initial commit 2026-03-08 00:40:51 +11:00
README.md Initial commit 2026-03-08 00:40:51 +11:00

starprnt

Package Version Hex Docs

gleam add starprnt@1
import starprnt
import starprnt/font
import simplifile

pub fn main() -> Nil {
  let assert Ok(Nil) =
    "Hello from Gleam!"
    |> starprnt.render_text(font.terminus_32_normal, 1, starprnt.WrapPreferWords, True)
    |> simplifile.write_bits("/dev/usb/lp0", _)
}

Further documentation can be found at https://hexdocs.pm/starprnt.

Development

gleam run   # Run the project
gleam test  # Run the tests