#![warn(clippy::nursery, clippy::pedantic)]
#![allow(clippy::needless_borrow)] #![allow(clippy::cognitive_complexity, clippy::missing_panics_doc, clippy::too_many_lines)]
use std::env;
use std::fs;
use std::io;
use std::path::Path;
pub mod modeng;
pub mod modlat;
pub mod modpol;
pub mod modque;
pub mod modspa;
pub mod modtca;
pub fn list(reset: &str, red: &str, cyan: &str, yellow: &str) {
let args: Vec<String> = env::args().collect();
let arg_cnt = args.len();
if arg_cnt == 1 {
panic!("{}", &(red.to_owned() + "Missing arguments! See: --help" + reset))
}
let input1 = args.get(1).expect(&(red.to_owned() + "Invalid or missing arguments! See: --help" + reset));
let input2 = args.get(2).expect(&(red.to_owned() + "Invalid or missing arguments! See: --help" + reset));
if input1 == "--ipa" && input2 == "--eng" || input1 == "--eng" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modeng::engaucanberra(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--eng";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modeng::engaucanberra(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modeng::engaucanberra(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modeng::engaucanberra(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modeng::engaucanberra(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modeng::engaucanberra(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modeng::engaucanberra(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modeng::engaucanberra(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ort" && input2 == "--eng" || input1 == "--eng" && input2 == "--ort" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modeng::ortuseng(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ort--eng";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modeng::ortuseng(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modeng::ortuseng(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modeng::ortuseng(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modeng::ortuseng(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modeng::ortuseng(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modeng::ortuseng(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modeng::ortuseng(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--lat" || input1 == "--lat" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modlat::ipalat(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--lat";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modlat::ipalat(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modlat::ipalat(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modlat::ipalat(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modlat::ipalat(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modlat::ipalat(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modlat::ipalat(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modlat::ipalat(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ort" && input2 == "--lat" || input1 == "--lat" && input2 == "--ort" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modlat::ortlat(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ort--lat";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modlat::ortlat(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modlat::ortlat(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modlat::ortlat(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modlat::ortlat(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modlat::ortlat(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modlat::ortlat(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modlat::ortlat(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--pol" || input1 == "--pol" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modpol::polplczestochowa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modpol::polpltorun(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modpol::polplwarszawa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--pol";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modpol::polplczestochowa(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
let usefile = "old";
modpol::polpltorun(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modpol::polplwarszawa(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modpol::polplczestochowa(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modpol::polpltorun(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modpol::polplwarszawa(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modpol::polplczestochowa(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
let usefile = "old";
modpol::polpltorun(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modpol::polplwarszawa(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modpol::polplczestochowa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
let usefile = "old";
modpol::polpltorun(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modpol::polplwarszawa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modpol::polplczestochowa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modpol::polpltorun(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modpol::polplwarszawa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modpol::polplczestochowa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
let usefile = "old";
modpol::polpltorun(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modpol::polplwarszawa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modpol::polplczestochowa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modpol::polpltorun(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modpol::polplwarszawa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--pol.pl-czestochowa" || input1 == "--pol.pl-czestochowa" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modpol::polplczestochowa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--pol.pl-czestochowa";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modpol::polplczestochowa(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modpol::polplczestochowa(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modpol::polplczestochowa(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modpol::polplczestochowa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modpol::polplczestochowa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modpol::polplczestochowa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modpol::polplczestochowa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--pol.pl-torun" || input1 == "--pol.pl-torun" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modpol::polpltorun(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--pol.pl-torun";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modpol::polpltorun(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modpol::polpltorun(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modpol::polpltorun(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modpol::polpltorun(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modpol::polpltorun(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modpol::polpltorun(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modpol::polpltorun(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--pol.pl-warszawa" || input1 == "--pol.pl-warszawa" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modpol::polplwarszawa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--pol.pl-warszawa";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modpol::polplwarszawa(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modpol::polplwarszawa(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modpol::polplwarszawa(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modpol::polplwarszawa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modpol::polplwarszawa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modpol::polplwarszawa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modpol::polplwarszawa(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--que" || input1 == "--que" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modque::ipaque(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--que";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modque::ipaque(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modque::ipaque(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modque::ipaque(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modque::ipaque(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modque::ipaque(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modque::ipaque(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modque::ipaque(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--lct" && input2 == "--que" || input1 == "--que" && input2 == "--lct" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modque::quelct(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--lct--que";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modque::quelct(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modque::quelct(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modque::quelct(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modque::quelct(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modque::quelct(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modque::quelct(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modque::quelct(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ort" && input2 == "--que" || input1 == "--que" && input2 == "--ort" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modque::ortquetri(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modque::ortquepen(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ort--que";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modque::ortquetri(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modque::ortquetri(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modque::ortquetri(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modque::ortquetri(&original_text, usefile, outputfile, reset, red, cyan, yellow);
let usefile = "old";
modque::ortquepen(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modque::ortquetri(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modque::ortquepen(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modque::ortquetri(&original_text, usefile, outputfile, reset, red, cyan, yellow);
let usefile = "old";
modque::ortquepen(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modque::ortquetri(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modque::ortquepen(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa" || input1 == "--spa" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spacoarauca(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacobogota(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacobucaramanga(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacocali(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacoleticia(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacomedellin(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaconeiva(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacopasto(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacoquibdo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacosantamarta(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaesbilbao(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaescadiz(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaesmadrid(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spamxciudaddemexico(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spauymontevideo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacoarauca(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
let usefile = "old";
modspa::spacobogota(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacobucaramanga(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacocali(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacoleticia(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacomedellin(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spaconeiva(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacopasto(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacoquibdo(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacosantamarta(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spaesbilbao(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spaescadiz(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spaesmadrid(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spamxciudaddemexico(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spauymontevideo(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacoarauca(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacobogota(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacobucaramanga(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacocali(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacoleticia(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacomedellin(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spaconeiva(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacopasto(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacoquibdo(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacosantamarta(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spaesbilbao(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spaescadiz(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spaesmadrid(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spamxciudaddemexico(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spauymontevideo(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacoarauca(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
let usefile = "old";
modspa::spacobogota(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacobucaramanga(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacocali(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacoleticia(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacomedellin(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spaconeiva(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacopasto(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacoquibdo(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spacosantamarta(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spaesbilbao(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spaescadiz(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spaesmadrid(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spamxciudaddemexico(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modspa::spauymontevideo(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacoarauca(&original_text, usefile, outputfile, reset, red, cyan, yellow);
let usefile = "old";
modspa::spacobogota(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacobucaramanga(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacocali(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacoleticia(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacomedellin(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaconeiva(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacopasto(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacoquibdo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacosantamarta(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaesbilbao(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaescadiz(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaesmadrid(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spamxciudaddemexico(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spauymontevideo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacoarauca(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacobogota(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacobucaramanga(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacocali(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacoleticia(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacomedellin(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaconeiva(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacopasto(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacoquibdo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacosantamarta(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaesbilbao(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaescadiz(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaesmadrid(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spamxciudaddemexico(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spauymontevideo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacoarauca(&original_text, usefile, outputfile, reset, red, cyan, yellow);
let usefile = "old";
modspa::spacobogota(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacobucaramanga(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacocali(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacoleticia(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacomedellin(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaconeiva(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacopasto(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacoquibdo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacosantamarta(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaesbilbao(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaescadiz(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaesmadrid(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spamxciudaddemexico(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spauymontevideo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spacoarauca(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacobogota(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacobucaramanga(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacocali(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacoleticia(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacomedellin(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaconeiva(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacopasto(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacoquibdo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spacosantamarta(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaesbilbao(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaescadiz(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spaesmadrid(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spamxciudaddemexico(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modspa::spauymontevideo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.co-arauca" || input1 == "--spa.co-arauca" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spacoarauca(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.co-arauca";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacoarauca(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacoarauca(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacoarauca(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacoarauca(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacoarauca(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacoarauca(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spacoarauca(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.co-bogota" || input1 == "--spa.co-bogota" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spacobogota(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.co-bogota";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacobogota(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacobogota(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacobogota(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacobogota(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacobogota(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacobogota(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spacobogota(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.co-bucaramanga" || input1 == "--spa.co-bucaramanga" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spacobucaramanga(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.co-bucaramanga";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacobucaramanga(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacobucaramanga(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacobucaramanga(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacobucaramanga(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacobucaramanga(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacobucaramanga(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spacobucaramanga(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.co-cali" || input1 == "--spa.co-cali" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spacocali(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.co-cali";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacocali(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacocali(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacocali(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacocali(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacocali(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacocali(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spacocali(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.co-leticia" || input1 == "--spa.co-leticia" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spacoleticia(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.co-leticia";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacoleticia(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacoleticia(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacoleticia(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacoleticia(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacoleticia(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacoleticia(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spacoleticia(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.co-medellin" || input1 == "--spa.co-medellin" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spacomedellin(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.co-medellin";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacomedellin(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacomedellin(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacomedellin(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacomedellin(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacomedellin(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacomedellin(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spacomedellin(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.co-neiva" || input1 == "--spa.co-neiva" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spaconeiva(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.co-neiva";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spaconeiva(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spaconeiva(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spaconeiva(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spaconeiva(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spaconeiva(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spaconeiva(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spaconeiva(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.co-pasto" || input1 == "--spa.co-pasto" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spacopasto(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.co-pasto";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacopasto(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacopasto(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacopasto(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacopasto(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacopasto(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacopasto(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spacopasto(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.co-quibdo" || input1 == "--spa.co-quibdo" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spacoquibdo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.co-quibdo";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacoquibdo(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacoquibdo(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacoquibdo(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacoquibdo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacoquibdo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacoquibdo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spacoquibdo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.co-santa_marta" || input1 == "--spa.co-santa_marta" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spacosantamarta(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.co-santa_marta";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacosantamarta(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacosantamarta(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacosantamarta(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spacosantamarta(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spacosantamarta(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spacosantamarta(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spacosantamarta(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.es-bilbao" || input1 == "--spa.es-bilbao" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spaesbilbao(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.es-bilbao";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spaesbilbao(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spaesbilbao(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spaesbilbao(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spaesbilbao(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spaesbilbao(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spaesbilbao(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spaesbilbao(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.es-cadiz" || input1 == "--spa.es-cadiz" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spaescadiz(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.es-cadiz";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spaescadiz(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spaescadiz(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spaescadiz(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spaescadiz(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spaescadiz(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spaescadiz(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spaescadiz(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.es-madrid" || input1 == "--spa.es-madrid" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spaesmadrid(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.es-madrid";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spaesmadrid(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spaesmadrid(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spaesmadrid(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spaesmadrid(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spaesmadrid(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spaesmadrid(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spaesmadrid(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.mx-ciudad_de_mexico" || input1 == "--spa.mx-ciudad_de_mexico" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spamxciudaddemexico(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.mx-ciudad_de_mexico";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spamxciudaddemexico(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spamxciudaddemexico(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spamxciudaddemexico(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spamxciudaddemexico(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spamxciudaddemexico(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spamxciudaddemexico(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spamxciudaddemexico(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--spa.uy-montevideo" || input1 == "--spa.uy-montevideo" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modspa::spauymontevideo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--spa.uy-montevideo";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spauymontevideo(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spauymontevideo(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spauymontevideo(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modspa::spauymontevideo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modspa::spauymontevideo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modspa::spauymontevideo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modspa::spauymontevideo(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--tca" || input1 == "--tca" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modtca::tcacoriocotuhe(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcapecushillococha(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcaconazareth(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcabrumariacu(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcabrvilabetania(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--tca";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modtca::tcacoriocotuhe(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
let usefile = "old";
modtca::tcapecushillococha(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::tcaconazareth(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::tcabrumariacu(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::tcabrvilabetania(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modtca::tcacoriocotuhe(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::tcapecushillococha(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::tcaconazareth(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::tcabrumariacu(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::tcabrvilabetania(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modtca::tcacoriocotuhe(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
let usefile = "old";
modtca::tcapecushillococha(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::tcaconazareth(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::tcabrumariacu(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::tcabrvilabetania(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modtca::tcacoriocotuhe(&original_text, usefile, outputfile, reset, red, cyan, yellow);
let usefile = "old";
modtca::tcapecushillococha(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcaconazareth(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcabrumariacu(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcabrvilabetania(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modtca::tcacoriocotuhe(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcapecushillococha(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcaconazareth(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcabrumariacu(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcabrvilabetania(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modtca::tcacoriocotuhe(&original_text, usefile, outputfile, reset, red, cyan, yellow);
let usefile = "old";
modtca::tcapecushillococha(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcaconazareth(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcabrumariacu(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcabrvilabetania(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modtca::tcacoriocotuhe(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcapecushillococha(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcaconazareth(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcabrumariacu(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::tcabrvilabetania(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--tca.br-umariacu" || input1 == "--tca.br-umariacu" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modtca::tcabrumariacu(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--tca.br-umariacu";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modtca::tcabrumariacu(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modtca::tcabrumariacu(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modtca::tcabrumariacu(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modtca::tcabrumariacu(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modtca::tcabrumariacu(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modtca::tcabrumariacu(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modtca::tcabrumariacu(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--tca.br-vila_betania" || input1 == "--tca.br-vila_betania" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modtca::tcabrvilabetania(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--tca.br-vila_betania";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modtca::tcabrvilabetania(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modtca::tcabrvilabetania(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modtca::tcabrvilabetania(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modtca::tcabrvilabetania(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modtca::tcabrvilabetania(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modtca::tcabrvilabetania(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modtca::tcabrvilabetania(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--tca.co-nazareth" || input1 == "--tca.co-nazareth" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modtca::tcaconazareth(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--tca.co-nazareth";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modtca::tcaconazareth(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modtca::tcaconazareth(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modtca::tcaconazareth(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modtca::tcaconazareth(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modtca::tcaconazareth(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modtca::tcaconazareth(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modtca::tcaconazareth(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--tca.co-rio_cotuhe" || input1 == "--tca.co-rio_cotuhe" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modtca::tcacoriocotuhe(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--tca.co-rio_cotuhe";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modtca::tcacoriocotuhe(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modtca::tcacoriocotuhe(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modtca::tcacoriocotuhe(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modtca::tcacoriocotuhe(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modtca::tcacoriocotuhe(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modtca::tcacoriocotuhe(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modtca::tcacoriocotuhe(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ipa" && input2 == "--tca.pe-cushillococha" || input1 == "--tca.pe-cushillococha" && input2 == "--ipa" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modtca::tcapecushillococha(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ipa--tca.pe-cushillococha";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modtca::tcapecushillococha(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modtca::tcapecushillococha(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modtca::tcapecushillococha(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modtca::tcapecushillococha(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modtca::tcapecushillococha(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modtca::tcapecushillococha(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modtca::tcapecushillococha(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
if input1 == "--ort" && input2 == "--tca" || input1 == "--tca" && input2 == "--ort" {
let str0 = args.get(3).expect(&(red.to_owned() + "No string inserted! See: --help" + reset));
if str0 == "-r" || str0 == "--repl" {
println!();
println!("{}", yellow.to_owned() + "LNGCNV INTERACTIVE SHELL (REPL MODE)" + reset);
println!();
println!("Insert your query... Type {}", cyan.to_owned() + "-q" + reset + " to quit:");
println!();
loop {
let mut input_repl = String::new();
io::stdin().read_line(&mut input_repl).expect("Unable to read entered data");
let original_text: &str = input_repl.trim();
if original_text == "-q" {
return;
}
let usefile = "terminal";
let outputfile = "0";
modtca::orttcabr(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::orttcaco(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::orttcapeilv(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::orttcapeformabiap(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
}
}
if str0 == "-i" || str0 == "--input" {
let usefile = "new";
let inputfile = args.get(4).expect(&(red.to_owned() + "No file to read! See: --help" + reset));
if arg_cnt == 5 {
let inputfile_arg = inputfile.as_str();
let inputfile_str: &str = inputfile_arg.trim();
let outputfile = inputfile_str.to_owned() + "--ort--tca";
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(&outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + &outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modtca::orttcabr(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
let usefile = "old";
modtca::orttcaco(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::orttcapeilv(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::orttcapeformabiap(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile + " overwritten");
} else if option == "a" {
let usefile = "old";
modtca::orttcabr(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::orttcaco(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::orttcapeilv(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::orttcapeformabiap(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modtca::orttcabr(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
let usefile = "old";
modtca::orttcaco(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::orttcapeilv(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
modtca::orttcapeformabiap(&original_text, usefile, &outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
let output = args.get(5).expect(&(red.to_owned() + "Missing arguments! Use option: --output See: --help" + reset));
if output == "-o" || output == "--output" {
let outputfile = args.get(6).expect(&(red.to_owned() + "No output file specified! See: --help" + reset));
let original_text = fs::read_to_string(inputfile).expect(&(red.to_owned() + "Something went wrong reading the file!" + reset));
let fileexists: bool = Path::new(outputfile).is_file();
if fileexists {
println!("{}", red.to_owned() + "The file " + outputfile + " already exists!" + reset + " Overwrite (" + cyan + "o" + reset + ")/ Append (" + cyan + "a" + reset + ")/ Cancel (" + cyan + "other key" + reset + ")" + cyan);
let mut answer = String::new();
io::stdin().read_line(&mut answer).expect("Unable to read entered data");
print!("{reset}");
let option: &str = answer.trim();
if option == "o" {
modtca::orttcabr(&original_text, usefile, outputfile, reset, red, cyan, yellow);
let usefile = "old";
modtca::orttcaco(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::orttcapeilv(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::orttcapeformabiap(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("File {}", outputfile.clone() + " overwritten");
} else if option == "a" {
let usefile = "old";
modtca::orttcabr(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::orttcaco(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::orttcapeilv(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::orttcapeformabiap(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data appended to the file {outputfile}");
} else {
println!("Operation aborted");
}
return;
}
modtca::orttcabr(&original_text, usefile, outputfile, reset, red, cyan, yellow);
let usefile = "old";
modtca::orttcaco(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::orttcapeilv(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::orttcapeformabiap(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!("Data written to the file {outputfile}");
return;
}
panic!("{}", &(red.to_owned() + "Invalid arguments! Use option: --output See: --help" + reset))
}
let original_text = str0;
let usefile = "terminal";
let outputfile = "0";
modtca::orttcabr(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::orttcaco(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::orttcapeilv(&original_text, usefile, outputfile, reset, red, cyan, yellow);
modtca::orttcapeformabiap(&original_text, usefile, outputfile, reset, red, cyan, yellow);
println!();
return;
}
panic!("{}", red.to_owned() + "Invalid arguments provided! See: --help" + reset);
}