SolraBizna / liso

Line input with simultaneous output, for Rust.
Apache License 2.0
9 stars 2 forks source link

Liso (LEE-soh) is an acronym for Line Input with Simultaneous Output. It is a library for writing line-oriented programs: programs that take input in the form of lines, and produce output in the form of lines.

Main features:

Supported platforms:

See the crate documentation for more information, or the examples for complete example programs.

Line Editing Bindings

Liso provides line editing based on a commonly-used subset of the default GNU Readline bindings:

These bindings are subject to change. More bindings may be added in the future, the default bindings may change, and user-specified bindings may one day be possible.

VT52 support!?

The Atari ST personal computer, released in 1985, came with a VT52 emulator in its onboard ROM. While the ability to serve as a cheap remote terminal was warmly welcomed in the market, the VT52 was a strange choice of terminals to emulate, since, even back in 1985, it was already considered woefully obsolete. Nevertheless, this emulator served as as testbed for support for strange, non-ANSI, non-Crossterm terminals in Liso.

If the TERM environment variable exists, and the base type (to the left of the -, if any) is st52, tw52, tt52, at, atari, atarist, atari_st, vt52, stv52, or stv52pc, then Liso's VT52 support will be activated. It will try to figure out the number of colors and special feature support based on which particular terminal type you've selected and how big it is. You should use one of the following values:

Input and output work. Special characters other than control keys don't work, I will need to do more testing to understand why. Testing Liso against Atari's VT52 emulator was extremely helpful in optimizing the redrawing routine, and teasing out some edge cases in the style handling.

Help Wanted

I don't have a Windows machine in any real sense, so I can't test whether this crate functions on Windows. It should, since it uses Crossterm, but I would appreciate reports from Windows users and/or developers.

I have no idea how well Liso works for visually-impaired users. If you use command line applications with a screen reader or a Braille terminal, I would greatly appreciate it if you got in touch with me. I would love to learn more about how I can improve your experience with Liso-based programs.

Future

Localized error messages would be very nice to have. I would also love to add RTL / bidirectional support some day.

Legalese

Liso is copyright 2022 and 2023, Solra Bizna, and licensed under either of:

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the Liso crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.