Commit eb79239c authored by Moritz Sokoll's avatar Moritz Sokoll 🦀
Browse files

Inital Commit

parents
/target
Cargo.lock
[package]
name = "btui"
version = "0.1.0"
edition = "2018"
authors = ["Moritz Sokoll <moritz@sokoll.com>"]
license-file = "COPYING"
homepage = "https://gitlab.sokoll.com/moritz/btui-rs"
repository = "https://gitlab.sokoll.com/moritz/btui-rs"
documentation = "https://docs.rs/btui"
readme = "README.md"
description = "make simple beautiful text user interfaces with btui"
[lib]
name = "btui"
path = "src/lib.rs"
crate-type = ["lib"]
required-features = []
doc = true
[dependencies]
pub mod colors {
/// enum to represent colored text
pub enum ColoredText {
Black(String),
Red(String),
Green(String),
Yellow(String),
Blue(String),
Magenta(String),
Cyan(String),
White(String),
}
/// enum to represent a background color
pub enum ColoredBg {
Black,
Red,
Green,
Yellow,
Blue,
Magenta,
Cyan,
White,
}
}
pub mod formatting {
use crate::Variant;
use crate::ft::colors::*;
/// format text with colors to be printed
///
/// # Arguments
///
/// * `text`: the text in form of a vector of either colored text or colored background
///
/// # Returns
///
/// the formatted text with escape characters to be printed to the terminal
pub fn format(text: Vec<Variant<ColoredText, ColoredBg>>) -> String {
let out: String = String::new();
out
}
}
//! # btui
//! ## beautiful text user intefaces
//!
//! with btui you can create beautiful text user interfaces for the terminal.
//! To get started add `btui` as a dependency to your project:
//! ```toml
//! btui = "0.1.0"
//! ```
pub mod ft;
pub enum Variant<P, Q> {
One(P),
Two(Q),
}
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment