|
|
@ -25,12 +25,6 @@ macro_rules! app {
|
|
|
|
.required_unless_present_all(["infile", "outfile"])
|
|
|
|
.required_unless_present_all(["infile", "outfile"])
|
|
|
|
.display_order(1),
|
|
|
|
.display_order(1),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.arg(
|
|
|
|
|
|
|
|
Arg::new("ascii-only")
|
|
|
|
|
|
|
|
.help("The output file will not use UTF-8 charecters")
|
|
|
|
|
|
|
|
.long("ascii-only")
|
|
|
|
|
|
|
|
.display_order(2),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
.arg(
|
|
|
|
.arg(
|
|
|
|
Arg::new("infile")
|
|
|
|
Arg::new("infile")
|
|
|
|
.help("The file to uwu'ify")
|
|
|
|
.help("The file to uwu'ify")
|
|
|
@ -40,7 +34,7 @@ macro_rules! app {
|
|
|
|
.requires("outfile")
|
|
|
|
.requires("outfile")
|
|
|
|
.value_name("FILE")
|
|
|
|
.value_name("FILE")
|
|
|
|
.value_hint(clap::ValueHint::FilePath)
|
|
|
|
.value_hint(clap::ValueHint::FilePath)
|
|
|
|
.display_order(3),
|
|
|
|
.display_order(2),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.arg(
|
|
|
|
.arg(
|
|
|
|
Arg::new("outfile")
|
|
|
|
Arg::new("outfile")
|
|
|
@ -49,8 +43,28 @@ macro_rules! app {
|
|
|
|
.long("outfile")
|
|
|
|
.long("outfile")
|
|
|
|
.value_name("FILE")
|
|
|
|
.value_name("FILE")
|
|
|
|
.value_hint(clap::ValueHint::FilePath)
|
|
|
|
.value_hint(clap::ValueHint::FilePath)
|
|
|
|
|
|
|
|
.display_order(3),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
.arg(
|
|
|
|
|
|
|
|
Arg::new("ascii-only")
|
|
|
|
|
|
|
|
.help("The output file will only include ASCII faces")
|
|
|
|
|
|
|
|
.long("ascii-only")
|
|
|
|
|
|
|
|
.conflicts_with("unicode-only")
|
|
|
|
.display_order(4),
|
|
|
|
.display_order(4),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
.arg(
|
|
|
|
|
|
|
|
Arg::new("unicode-only")
|
|
|
|
|
|
|
|
.help("The output file will only include UTF-8 faces")
|
|
|
|
|
|
|
|
.long("unicode-only")
|
|
|
|
|
|
|
|
.display_order(5),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
.arg(
|
|
|
|
|
|
|
|
Arg::new("random")
|
|
|
|
|
|
|
|
.help("Flag to enable/disable random uwu'ifying")
|
|
|
|
|
|
|
|
.short('r')
|
|
|
|
|
|
|
|
.long("random")
|
|
|
|
|
|
|
|
.display_order(6),
|
|
|
|
|
|
|
|
)
|
|
|
|
.arg(
|
|
|
|
.arg(
|
|
|
|
Arg::new("words")
|
|
|
|
Arg::new("words")
|
|
|
|
.help("The modifier to determine how many words to be uwu'ified")
|
|
|
|
.help("The modifier to determine how many words to be uwu'ified")
|
|
|
@ -59,7 +73,7 @@ macro_rules! app {
|
|
|
|
.value_name("VALUE")
|
|
|
|
.value_name("VALUE")
|
|
|
|
.default_value("1")
|
|
|
|
.default_value("1")
|
|
|
|
.validator(is_between_zero_and_one)
|
|
|
|
.validator(is_between_zero_and_one)
|
|
|
|
.display_order(5),
|
|
|
|
.display_order(7),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.arg(
|
|
|
|
.arg(
|
|
|
|
Arg::new("faces")
|
|
|
|
Arg::new("faces")
|
|
|
@ -69,7 +83,7 @@ macro_rules! app {
|
|
|
|
.value_name("VALUE")
|
|
|
|
.value_name("VALUE")
|
|
|
|
.default_value("0.05")
|
|
|
|
.default_value("0.05")
|
|
|
|
.validator(is_between_zero_and_one)
|
|
|
|
.validator(is_between_zero_and_one)
|
|
|
|
.display_order(6),
|
|
|
|
.display_order(8),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.arg(
|
|
|
|
.arg(
|
|
|
|
Arg::new("actions")
|
|
|
|
Arg::new("actions")
|
|
|
@ -79,7 +93,7 @@ macro_rules! app {
|
|
|
|
.value_name("VALUE")
|
|
|
|
.value_name("VALUE")
|
|
|
|
.default_value("0.125")
|
|
|
|
.default_value("0.125")
|
|
|
|
.validator(is_between_zero_and_one)
|
|
|
|
.validator(is_between_zero_and_one)
|
|
|
|
.display_order(7),
|
|
|
|
.display_order(9),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.arg(
|
|
|
|
.arg(
|
|
|
|
Arg::new("stutters")
|
|
|
|
Arg::new("stutters")
|
|
|
@ -89,14 +103,7 @@ macro_rules! app {
|
|
|
|
.value_name("VALUE")
|
|
|
|
.value_name("VALUE")
|
|
|
|
.default_value("0.225")
|
|
|
|
.default_value("0.225")
|
|
|
|
.validator(is_between_zero_and_one)
|
|
|
|
.validator(is_between_zero_and_one)
|
|
|
|
.display_order(8),
|
|
|
|
.display_order(10),
|
|
|
|
)
|
|
|
|
|
|
|
|
.arg(
|
|
|
|
|
|
|
|
Arg::new("random")
|
|
|
|
|
|
|
|
.help("Flag to enable/disable random uwu'ifying")
|
|
|
|
|
|
|
|
.short('r')
|
|
|
|
|
|
|
|
.long("random")
|
|
|
|
|
|
|
|
.display_order(9),
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -121,12 +128,13 @@ fn main() {
|
|
|
|
matches.value_of("text"),
|
|
|
|
matches.value_of("text"),
|
|
|
|
matches.value_of("infile"),
|
|
|
|
matches.value_of("infile"),
|
|
|
|
matches.value_of("outfile"),
|
|
|
|
matches.value_of("outfile"),
|
|
|
|
|
|
|
|
matches.is_present("ascii-only"),
|
|
|
|
|
|
|
|
matches.is_present("unicode-only"),
|
|
|
|
|
|
|
|
matches.is_present("random"),
|
|
|
|
matches.value_of("words"),
|
|
|
|
matches.value_of("words"),
|
|
|
|
matches.value_of("faces"),
|
|
|
|
matches.value_of("faces"),
|
|
|
|
matches.value_of("actions"),
|
|
|
|
matches.value_of("actions"),
|
|
|
|
matches.value_of("stutters"),
|
|
|
|
matches.value_of("stutters"),
|
|
|
|
matches.is_present("ascii-only"),
|
|
|
|
|
|
|
|
matches.is_present("random"),
|
|
|
|
|
|
|
|
is_runtime!(
|
|
|
|
is_runtime!(
|
|
|
|
matches.occurrences_of("faces"),
|
|
|
|
matches.occurrences_of("faces"),
|
|
|
|
matches.occurrences_of("actions"),
|
|
|
|
matches.occurrences_of("actions"),
|
|
|
|