Compare commits
No commits in common. "3b13b1f470598232f04ab64c2e28e2474de0e315" and "ab4b4590046b09bd5b52856936c3faaa1c1fa00c" have entirely different histories.
3b13b1f470
...
ab4b459004
4 changed files with 58 additions and 199 deletions
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pride"
|
name = "pride"
|
||||||
version = "0.3.0"
|
version = "0.2.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
168
src/help.rs
168
src/help.rs
|
@ -1,168 +0,0 @@
|
||||||
//! help and list text
|
|
||||||
|
|
||||||
use std::process::exit;
|
|
||||||
|
|
||||||
use crate::VERSION;
|
|
||||||
|
|
||||||
/// displays the program's help text
|
|
||||||
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 ♥");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// shows a list of all flags
|
|
||||||
pub fn list_text() {
|
|
||||||
println!("pride v{VERSION}
|
|
||||||
|
|
||||||
flag list:
|
|
||||||
agender agender pride flag
|
|
||||||
aromantic aromantic pride flag
|
|
||||||
aroace aromantic-asexual pride flag
|
|
||||||
asexual asexual pride flag
|
|
||||||
bigender bigender pride flag
|
|
||||||
bisexual bisexual pride flag
|
|
||||||
demiboy demiboy pride flag
|
|
||||||
demigender demigender pride flag
|
|
||||||
demigirl demigirl pride flag
|
|
||||||
demiromantic demiromantic pride flag
|
|
||||||
demisexual demisexual pride flag
|
|
||||||
gay 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
|
|
||||||
nonbinary nonbinary pride flag
|
|
||||||
pansexual pansexual pride flag
|
|
||||||
rainbow six-color rainbow flag
|
|
||||||
progress progress arrow rainbow flag
|
|
||||||
transgender transgender pride flag");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// handle help details by 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
|
|
||||||
progress The 2018 Progess rainbow pride flag designed by Daniel Quasar");
|
|
||||||
},
|
|
||||||
"progress"
|
|
||||||
=> { println!("Daniel Quasar's 2018 Progress rainbow pride flag.\n\nnames:\n 'progress'"); }
|
|
||||||
|
|
||||||
"transgender" | "trans"
|
|
||||||
=> {
|
|
||||||
println!("The transgender pride flag designed by Monica Helms in 1999.
|
|
||||||
|
|
||||||
names:
|
|
||||||
'transgender', 'trans'");
|
|
||||||
},
|
|
||||||
|
|
||||||
// alphabetical below this point
|
|
||||||
|
|
||||||
"aromantic" | "aro"
|
|
||||||
=> { println!("The aromantic pride flag.\n\nnames:\n 'aromantic', 'aro'"); }
|
|
||||||
"asexual" | "ace"
|
|
||||||
=> { println!("The asexual pride flag.\n\nnames:\n 'asexual', 'ace'"); }
|
|
||||||
"aroace" | "aromantic-asexual"
|
|
||||||
=> {
|
|
||||||
println!("The aromantic-asexual pride flag designed by aroaesflags on tumblr.
|
|
||||||
|
|
||||||
names:
|
|
||||||
'aroace', 'aromantic-asexual'
|
|
||||||
|
|
||||||
variants:
|
|
||||||
halves The side-by-side aromantic and asexual aroace flag
|
|
||||||
side-by-side
|
|
||||||
sbs
|
|
||||||
|
|
||||||
notes:
|
|
||||||
Side-by-side flag currently only displays in terminals 20 lines or taller.");
|
|
||||||
},
|
|
||||||
|
|
||||||
"bisexual" | "bi"
|
|
||||||
=> {
|
|
||||||
println!("The bisexual flag designed by Michael Page in 1998.
|
|
||||||
|
|
||||||
names:
|
|
||||||
'bisexual', 'bi'");
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
"gay" | "mlm"
|
|
||||||
=> {
|
|
||||||
println!("The 7-stripe gay men pride flag designed by @gayflagblog on tumblr in 2019.
|
|
||||||
|
|
||||||
names:
|
|
||||||
'gay', 'mlm'");
|
|
||||||
},
|
|
||||||
|
|
||||||
"gender-nonconforming" | "gendernonconforming" | "gnc"
|
|
||||||
=> { println!("The gender-nonconforming pride flag.\n\nnames:\n 'gender-nonconforming', 'gendernonconforming', 'gnc'"); },
|
|
||||||
|
|
||||||
|
|
||||||
"lesbian"
|
|
||||||
=> {
|
|
||||||
println!("The 5-stripe lesbian flag designed by Emily Gwen in 2018.
|
|
||||||
|
|
||||||
names:
|
|
||||||
'lesbian'
|
|
||||||
|
|
||||||
variants:
|
|
||||||
7-color 7-stripe flag, also designed in 2018 by Emily Gwen");
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
"nonbinary" | "nb"
|
|
||||||
=> {
|
|
||||||
println!("The nonbinary pride flag designed by Kyle Rowan in 2014.
|
|
||||||
|
|
||||||
names:
|
|
||||||
'nonbinary', 'nb'");
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
"pansexual" | "pan"
|
|
||||||
=> {
|
|
||||||
println!("The pansexual pride flag designed by Jasper V around 2010
|
|
||||||
|
|
||||||
names:
|
|
||||||
'pansexual', 'pan'");
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
_
|
|
||||||
=> {
|
|
||||||
println!("pride: no help found for {flag}!\n");
|
|
||||||
help_text();
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
75
src/main.rs
75
src/main.rs
|
@ -11,7 +11,6 @@ mod color;
|
||||||
mod complex;
|
mod complex;
|
||||||
mod draw;
|
mod draw;
|
||||||
mod flag;
|
mod flag;
|
||||||
mod help;
|
|
||||||
mod util;
|
mod util;
|
||||||
mod variant;
|
mod variant;
|
||||||
|
|
||||||
|
@ -25,20 +24,18 @@ fn main() {
|
||||||
|
|
||||||
// handle help flag
|
// handle help flag
|
||||||
if args.contains(["-h", "--help"]) {
|
if args.contains(["-h", "--help"]) {
|
||||||
let target = args.subcommand().unwrap();
|
help_text();
|
||||||
if target.is_some() { help::flag_help(&target.unwrap()); }
|
|
||||||
else { help::help_text(); }
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle list flag
|
// handle list flag
|
||||||
if args.contains(["-l", "--list"]) {
|
if args.contains(["-l", "--list"]) {
|
||||||
help::list_text();
|
list_text();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle version flag
|
// handle version flag
|
||||||
if args.contains(["-v", "--version"]) {
|
if args.contains("--version") {
|
||||||
println!("pride v{VERSION}");
|
println!("pride v{VERSION}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -136,14 +133,7 @@ fn main() {
|
||||||
// => complex::intersex(),
|
// => complex::intersex(),
|
||||||
|
|
||||||
Some("lesbian")
|
Some("lesbian")
|
||||||
=> {
|
=> flag::lesbian(),
|
||||||
match variant.as_deref() {
|
|
||||||
Some("7-color")
|
|
||||||
=> variant::lesbian_7(),
|
|
||||||
_
|
|
||||||
=> flag::lesbian()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Some("multisexual" | "m-spec" | "mspec")
|
Some("multisexual" | "m-spec" | "mspec")
|
||||||
=> flag::multisexual(),
|
=> flag::multisexual(),
|
||||||
|
@ -157,8 +147,8 @@ fn main() {
|
||||||
Some("pansexual" | "pan")
|
Some("pansexual" | "pan")
|
||||||
=> flag::pansexual(),
|
=> flag::pansexual(),
|
||||||
|
|
||||||
// Some("polyamory" | "polyamorous" | "poly")
|
Some("polyamory" | "polyamorous" | "poly")
|
||||||
// => complex::polyamory(small),
|
=> complex::polyamory(small),
|
||||||
|
|
||||||
Some("polysexual")
|
Some("polysexual")
|
||||||
=> flag::polysexual(),
|
=> flag::polysexual(),
|
||||||
|
@ -166,8 +156,7 @@ fn main() {
|
||||||
Some("transgender" | "trans")
|
Some("transgender" | "trans")
|
||||||
=> flag::transgender(),
|
=> flag::transgender(),
|
||||||
|
|
||||||
|
_ => { help_text(); exit(1) }
|
||||||
_ => { help::help_text(); exit(1) }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// draw flag
|
// draw flag
|
||||||
|
@ -175,3 +164,53 @@ 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!(" aroace aromantic/asexual pride flag");
|
||||||
|
println!(" bigender bigender pride flag");
|
||||||
|
println!(" bi, bisexual bisexual pride flag");
|
||||||
|
println!(" demiromantic demiromantic pride flag");
|
||||||
|
println!(" demisexual demisexual pride flag");
|
||||||
|
// println!(" disability disability pride flag");
|
||||||
|
println!(" gay, mlm gay men pride flag");
|
||||||
|
println!(" genderfluid genderfluid pride flag");
|
||||||
|
println!(" gender-nonconforming gender nonconforming pride flag");
|
||||||
|
println!(" genderqueer genderqueer pride flag");
|
||||||
|
println!(" gendervoid gendervoid pride flag");
|
||||||
|
// println!(" intersex intersex pride flag");
|
||||||
|
println!(" lesbian lesbian pride flag");
|
||||||
|
println!(" multisexual multisexual pride flag");
|
||||||
|
println!(" multigender multigender pride flag");
|
||||||
|
println!(" nb, nonbinary nonbinary pride flag");
|
||||||
|
println!(" pan, pansexual pansexual pride flag");
|
||||||
|
println!(" polyamory polyamorous pride flag");
|
||||||
|
println!(" polysexual polysexual pride flag");
|
||||||
|
println!(" pride, rainbow six-color rainbow flag");
|
||||||
|
println!(" progress progress arrow flag");
|
||||||
|
println!(" trans, transgender transgender pride flag");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,15 +35,3 @@ pub fn philadelphia() -> Flag {
|
||||||
Flag::Stripes(colors)
|
Flag::Stripes(colors)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn lesbian_7() -> Flag {
|
|
||||||
let orange1 = rgb(0xD52D00); // gender non-conformity
|
|
||||||
let orange2 = rgb(0xEF7627); // independence
|
|
||||||
let orange3 = rgb(0xFF9A56); // community
|
|
||||||
// white // unique relationships with womanhood
|
|
||||||
let pink1 = rgb(0xD162A4); // serenity and peace
|
|
||||||
let pink2 = rgb(0xB55690); // love and sex
|
|
||||||
let pink3 = rgb(0xA30262); // femininity
|
|
||||||
|
|
||||||
Flag::Stripes(vec![orange1, orange2, orange3, WHITE, pink1, pink2, pink3])
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue