6 releases
0.3.0 | Apr 17, 2020 |
---|---|
0.2.3 | Apr 17, 2020 |
0.1.0 | Mar 23, 2020 |
#697 in Command-line interface
36 downloads per month
59KB
961 lines
Term - a tui client
Term is an easy to use tui client, which enables the user to create ASCII art windows on:
- Windows 10 PowerShell
- Linux and OSX Terminals
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ PowerShell _ □ x ┃
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃╔Logfile:═════════════════════╗╔PingPong:══════════════════╗┃
┃║Hello, my name is 'Term'. ║║ping (0) ║┃
┃║I am a tui client. ║║pong (0) ║┃
┃╚═════════════════════════════╝║ping (1) ║┃
┃ ╚═══════════════════════════╝┃
┃STDIN:~$ command x y ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Download from crates.io and read the documentation at doc.rs.
⚠ Warning, using this crate is not recommended yet. The API is highly unstable and the crate is not tested at all.
Usage
# Cargo.toml
[dependencies]
fowlhouse_bay = "0.3.0"
Example
use fowlhouse_bay::Term;
use fowlhouse_bay::window::Config;
use fowlhouse_bay::window::ChannelSubscription;
use fowlhouse_bay::window::Style;
type ApplicationResult = Result<(), Box<dyn std::error::Error + Send + Sync + 'static>>;
fn main() -> ApplicationResult {
let (mut term, standard_input_channel, _, _) = Term::new();
let conf_win_one = Config {
window_name: String::from("Logfile"),
window_width: 30,
window_height: 4,
position_x: 0,
position_y: 0,
channel_subscription: ChannelSubscription::StandardInputChannel,
style: Style::DoubleLine,
};
term.create_window(conf_win_one)?;
standard_input_channel.send(String::from("Hello, Term!"))?;
term.join();
Ok(())
}
(Rakino Island - Fowlhouse Bay: 36°43'28.1"S 174°56'34.6"E)
Dependencies
~3.5–5MB
~89K SLoC