# inkline-rs

### Overview
Display colorized ASCII art and info directly in the terminal.

### How to use

Add this <a href="https://crates.io/crates/inkline">crate</a> as a dependency in your `Cargo.toml`:

```toml
[dependencies]
inkline    = "1.0.4"
chromakitx = "1.0.2"
```

### Example code:
```rust
use inkline::{
    AsciiArt,
    InfoConfig,
    InfoPosition
};

use chromakitx::{
    AnsiColor,
    AnyColor
};

fn main() -> () {
    const ASCII: &str = r#"
{2}            .:--::////::--.`
{1}        `/yNMMNho{2}////////////:.
{1}      `+NMMMMMMMMmy{2}/////////////:`
{0}    `-:::{1}ohNMMMMMMMNy{2}/////////////:`
{0}   .::::::::{1}odMMMMMMMNy{2}/////////////-
{0}  -:::::::::::{1}/hMMMMMMMmo{2}////////////-
{0} .::::::::::::::{1}oMMMMMMMMh{2}////////////-
{0}`:::::::::::::{1}/dMMMMMMMMMMNo{2}///////////`
{0}-::::::::::::{1}sMMMMMMmMMMMMMMy{2}//////////-
{0}-::::::::::{1}/dMMMMMMs{0}:{1}+NMMMMMMd{2}/////////:
{0}-:::::::::{1}+NMMMMMm/{0}:::{1}/dMMMMMMm+{2}///////:
{0}-::::::::{1}sMMMMMMh{0}:::::::{1}dMMMMMMm+{2}//////-
{0}`:::::::{1}sMMMMMMy{0}:::::::::{1}dMMMMMMm+{2}/////`
{0} .:::::{1}sMMMMMMs{0}:::::::::::{1}mMMMMMMd{2}////-
{0}  -:::{1}sMMMMMMy{0}::::::::::::{1}/NMMMMMMh{2}//-
{0}   .:{1}+MMMMMMd{0}::::::::::::::{1}oMMMMMMMo{2}-
{1}    `yMMMMMN/{0}:::::::::::::::{1}hMMMMMh.
{1}      -yMMMo{0}::::::::::::::::{1}/MMMy-
{1}        `/s{0}::::::::::::::::::{1}o/`
{0}            ``.---::::---..`
"#;

    let colors: Vec<AnyColor> = vec![
        AnsiColor::BrightCyan.into(),
        AnsiColor::BrightBlue.into(),
        AnsiColor::BrightMagenta.into()
    ];

    let info: InfoConfig = InfoConfig::new(vec![
        "Hello World!".to_string(),
        "This is Inkline.".to_string(),
        "Made with ❤️ in Rust.".to_string(),
        "Developer: CELESTIFYX Team".to_string()
    ]).with_position(InfoPosition::Right).with_margin(4);

    let mut art: AsciiArt = AsciiArt::new(Some(ASCII.to_string()), Some(colors), true, Some(info));
    println!("{}", (&mut art).render());
}
```

### Result
![screenshot](https://gitlab.com/inkline/inkline-rs/-/raw/main/preview.png)
