2021-04-11 11:47:35 -05:00
|
|
|
extern crate clap;
|
|
|
|
use clap::{App, Arg};
|
2021-04-11 13:22:59 -05:00
|
|
|
mod base_55;
|
2021-04-08 16:11:20 -05:00
|
|
|
fn main() {
|
2021-04-11 14:11:39 -05:00
|
|
|
let matches = App::new("AbleScript")
|
|
|
|
.version(env!("CARGO_PKG_VERSION"))
|
2021-04-11 11:47:35 -05:00
|
|
|
.author("Able <abl3theabove@gmail.com>")
|
|
|
|
.about("Does awesome things")
|
|
|
|
.arg(
|
|
|
|
Arg::with_name("file")
|
|
|
|
.short("f")
|
|
|
|
.long("file")
|
|
|
|
.value_name("FILE")
|
|
|
|
.help("Sets a custom config file")
|
|
|
|
.takes_value(true),
|
|
|
|
)
|
|
|
|
.get_matches();
|
|
|
|
|
|
|
|
match matches.value_of("file") {
|
|
|
|
Some(file_path) => {
|
|
|
|
println!("{}", file_path);
|
|
|
|
// Start parsing that file
|
2021-04-11 13:22:59 -05:00
|
|
|
for x in file_path.chars() {
|
|
|
|
println!("{}", base_55::char2num(x));
|
|
|
|
}
|
2021-04-11 11:47:35 -05:00
|
|
|
}
|
|
|
|
None => {
|
|
|
|
println!("hi");
|
|
|
|
//start the prompt
|
|
|
|
}
|
2021-04-08 16:11:20 -05:00
|
|
|
}
|
|
|
|
}
|