Files
emojifier/src/entrypoint.rs

34 lines
986 B
Rust

use clap::{App, Arg};
use prettytable::Table;
pub fn main() {
let matches = App::new("Emojifier")
.version("1.0")
.author("Daniel T. <dtomlinson@panaetius.co.uk>")
.about("Applies Emoji effects to text")
.arg(
Arg::new("input")
.required(true)
.takes_value(true)
.about("Text to emojify"),
)
.arg(
Arg::new("hands")
.short('H')
.long("hands")
.takes_value(false)
.about("TURNS 👏 YOUR 👏 TEXT 👏 INTO 👏 THIS"),
)
.get_matches();
if let Some(input) = matches.value_of("input") {
if matches.is_present("hands") {
let output = crate::hands::handify(input);
let mut table = Table::new();
table.add_row(row!["Effect", "Output"]);
table.add_row(row!["Hands", output]);
table.printstd();
}
}
}