Compare commits
No commits in common. "4749f1a0aadc43853c8553721bab9c1d7104dd8e" and "47d63cd7f53d057b7510e3cb12a820a4ea7ae3c1" have entirely different histories.
4749f1a0aa
...
47d63cd7f5
3 changed files with 44 additions and 94 deletions
|
@ -83,14 +83,6 @@ pub fn genderfluid() -> Colors {
|
|||
vec![pink, WHITE, violet, BLACK, blue]
|
||||
}
|
||||
|
||||
pub fn gender_nonconforming() -> Colors {
|
||||
let purple = rgb(0x50284D);
|
||||
let magenta = rgb(0x96467B);
|
||||
let blue = rgb(0x5C96F7);
|
||||
|
||||
vec![purple, purple, magenta, blue, WHITE, blue, magenta, purple, purple]
|
||||
}
|
||||
|
||||
pub fn genderqueer() -> Colors {
|
||||
let purple = rgb(0xB899DF);
|
||||
let green = rgb(0x6B8E3B);
|
||||
|
|
77
src/help.rs
77
src/help.rs
|
@ -1,77 +0,0 @@
|
|||
|
||||
use crate::VERSION;
|
||||
|
||||
|
||||
pub fn help_text() {
|
||||
println!("pride v{VERSION}
|
||||
Valerie Wolfe <sleeplessval@gmail.com>
|
||||
Display pride flags in the terminal.
|
||||
|
||||
usage: pride [flags] [name]
|
||||
|
||||
args:
|
||||
<name> The pride flag to display
|
||||
|
||||
flags:
|
||||
-h, --help Shows this help text
|
||||
--version Show version information
|
||||
-l, --list Prints a list of printable flags
|
||||
-s, --small Prints a small version without holding
|
||||
|
||||
Use 'pride --list' to see a list of printable flags
|
||||
|
||||
~ You're loved and you matter ♥");
|
||||
}
|
||||
|
||||
pub fn list_text() {
|
||||
println!("pride v{VERSION}
|
||||
|
||||
flag list:
|
||||
agender agender pride flag
|
||||
aro, aromantic aromantic pride flag
|
||||
ace, asexual asexual pride flag
|
||||
bigender bigender pride flag
|
||||
bi, bisexual bisexual pride flag
|
||||
gay, mlm gay men pride flag
|
||||
genderfluid genderfluid pride flag
|
||||
gender-nonconforming gender nonconforming pride flag
|
||||
genderqueer genderqueer pride flag
|
||||
gendervoid gendervoid pride flag
|
||||
lesbian lesbian pride flag
|
||||
multigender multigender pride flag
|
||||
nb, nonbinary nonbinary pride flag
|
||||
pan, pansexual pansexual pride flag
|
||||
pride, rainbow six-color rainbow flag
|
||||
trans, transgender transgender pride flag");
|
||||
}
|
||||
|
||||
pub fn flag_help(flag: &str) {
|
||||
match flag {
|
||||
"pride" | "rainbow"
|
||||
=> {
|
||||
println!("The ubiquitous 1979 6-color rainbow pride flag, representing the larger queer community.
|
||||
|
||||
names:
|
||||
'pride', 'rainbow'
|
||||
|
||||
variants:
|
||||
8-color Gilbert Baker's original 1978 flag with 8 stripes
|
||||
gilbert-baker
|
||||
sex-and-magic
|
||||
philadelphia The 2017 Philadelphia Pride flag with black and brown stripes");
|
||||
},
|
||||
|
||||
"transgender" | "trans"
|
||||
=> {
|
||||
println!("The transgender pride flag designed by Monica Helms in 1999.
|
||||
|
||||
names:
|
||||
'transgender', 'trans'
|
||||
");
|
||||
}
|
||||
|
||||
_
|
||||
=> help_text()
|
||||
}
|
||||
}
|
||||
|
53
src/main.rs
53
src/main.rs
|
@ -5,7 +5,6 @@ use pico_args::Arguments;
|
|||
mod color;
|
||||
mod draw;
|
||||
mod flag;
|
||||
mod help;
|
||||
mod variant;
|
||||
|
||||
use crate::color::Colors;
|
||||
|
@ -18,15 +17,13 @@ fn main() {
|
|||
|
||||
// handle help flag
|
||||
if args.contains(["-h", "--help"]) {
|
||||
let target = args.subcommand().unwrap();
|
||||
if target.is_some() { help::flag_help(&target.unwrap()); }
|
||||
else { help::help_text(); }
|
||||
help_text();
|
||||
return;
|
||||
}
|
||||
|
||||
// handle list flag
|
||||
if args.contains(["-l", "--list"]) {
|
||||
help::list_text();
|
||||
list_text();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -82,9 +79,6 @@ fn main() {
|
|||
Some("genderfluid")
|
||||
=> flag::genderfluid(),
|
||||
|
||||
Some("gender-nonconforming" | "gnc" | "gendernonconforming")
|
||||
=> flag::gender_nonconforming(),
|
||||
|
||||
Some("genderqueer")
|
||||
=> flag::genderqueer(),
|
||||
|
||||
|
@ -103,7 +97,7 @@ fn main() {
|
|||
Some("pansexual" | "pan")
|
||||
=> flag::pansexual(),
|
||||
|
||||
_ => { help::help_text(); exit(1) } // (or die)
|
||||
_ => { help_text(); exit(1) } // (or die)
|
||||
};
|
||||
|
||||
if small { draw::small(colors); }
|
||||
|
@ -111,3 +105,44 @@ fn main() {
|
|||
|
||||
}
|
||||
|
||||
fn help_text() {
|
||||
println!("pride v{VERSION}");
|
||||
println!("Valerie Wolfe <sleeplessval@gmail.com>");
|
||||
println!("Show pride flags in the terminal.\n");
|
||||
|
||||
println!("usage: pride [flags] [name]\n");
|
||||
|
||||
println!("args:");
|
||||
println!(" <name> The pride flag to display\n");
|
||||
|
||||
println!("flags:");
|
||||
println!(" -h, --help Shows this help text");
|
||||
println!(" --version Show version information");
|
||||
println!(" -l, --list Prints a list of printable flags");
|
||||
println!(" -s, --small Prints a small version without holding");
|
||||
|
||||
println!("\nUse 'pride --list' to see a list of printable flags");
|
||||
println!("\n~ You're loved and you matter ♥");
|
||||
}
|
||||
|
||||
fn list_text() {
|
||||
println!("pride v{}", env!("CARGO_PKG_VERSION"));
|
||||
println!("\nFlag list:");
|
||||
println!(" agender agender pride flag");
|
||||
println!(" aro, aromantic aromantic pride flag");
|
||||
println!(" ace, asexual asexual pride flag");
|
||||
println!(" bigender bigender pride flag");
|
||||
println!(" bi, bisexual bisexual pride flag");
|
||||
println!(" gay, mlm gay men pride flag");
|
||||
println!(" genderfluid genderfluid pride flag");
|
||||
println!(" genderqueer genderqueer pride flag");
|
||||
println!(" gendervoid gendervoid pride flag");
|
||||
println!(" lesbian lesbian pride flag");
|
||||
println!(" multigender multigender pride flag");
|
||||
println!(" nb, nonbinary nonbinary pride flag");
|
||||
println!(" pan, pansexual pansexual pride flag");
|
||||
println!(" pride, rainbow six-color rainbow flag");
|
||||
// println!(" progress progress arrow flag");
|
||||
println!(" trans, transgender transgender pride flag");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue