fowlhouse_bay 0.2.1

A tui client which allows the user to create multiple ASCII windows, displaying messages provided through std::sync::mpsc::channel. Note: at the moment this crate should not be used, the API is not stable at all, also there are almost no unit tests.
Documentation

Term - a tui client

Build Status Crates.io docs.rs Crates.io

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.2.1"

Example

use fowlhouse_bay::Term;
use fowlhouse_bay::window::Config;
use fowlhouse_bay::window::Source;
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: 50,
        window_height: 10,
        position_x: 0,
        position_y: 0,
        source: Source::StandardInputChannel,
        style: Style::Light,
    };

    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)