A partial implementation of the StarPRNT command protocol in Gleam
|
|
||
|---|---|---|
| .github/workflows | ||
| fonts | ||
| src | ||
| test | ||
| .gitignore | ||
| gen_font.py | ||
| gleam.toml | ||
| manifest.toml | ||
| README.md | ||
starprnt
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