added colors, list entries, and match arms for three "complex" flags (progress, polyam, intersex)
This commit is contained in:
parent
5e56206086
commit
a003aaa797
4 changed files with 42 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pride"
|
name = "pride"
|
||||||
version = "0.0.1"
|
version = "0.1.0"
|
||||||
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
|
||||||
|
|
|
@ -49,4 +49,3 @@ pub fn draw(colors: &[Fg<Rgb>]) {
|
||||||
stdout.flush().ok();
|
stdout.flush().ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
29
src/flag.rs
29
src/flag.rs
|
@ -5,6 +5,21 @@ use crate::draw::draw;
|
||||||
|
|
||||||
pub static BLOCK: &str = "█";
|
pub static BLOCK: &str = "█";
|
||||||
|
|
||||||
|
pub fn progress(small: bool) {
|
||||||
|
let red = color::Fg(color::Rgb(0xE5, 0x00, 0x00));
|
||||||
|
let orange = color::Fg(color::Rgb(0xFF, 0x8D, 0x00));
|
||||||
|
let yellow = color::Fg(color::Rgb(0xFF, 0xEE, 0x00));
|
||||||
|
let green = color::Fg(color::Rgb(0x02, 0x81, 0x21));
|
||||||
|
let blue = color::Fg(color::Rgb(0x00, 0x4C, 0xFF));
|
||||||
|
let purple = color::Fg(color::Rgb(0x77, 0x00, 0x88));
|
||||||
|
|
||||||
|
let white = color::Fg(color::Rgb(0xFF, 0xFF, 0xFF));
|
||||||
|
let pink = color::Fg(color::Rgb(0x7A, 0xCB, 0xF5));
|
||||||
|
let ltblue = color::Fg(color::Rgb(0xEA, 0xAC, 0xB8));
|
||||||
|
let brown = color::Fg(color::Rgb(0x61, 0x39, 0x15));
|
||||||
|
let black = color::Fg(color::Rgb(0x00, 0x00, 0x00));
|
||||||
|
}
|
||||||
|
|
||||||
pub fn pride(small: bool) {
|
pub fn pride(small: bool) {
|
||||||
let red = color::Fg(color::Rgb(0xE5, 0x00, 0x00));
|
let red = color::Fg(color::Rgb(0xE5, 0x00, 0x00));
|
||||||
let orange = color::Fg(color::Rgb(0xFF, 0x8D, 0x00));
|
let orange = color::Fg(color::Rgb(0xFF, 0x8D, 0x00));
|
||||||
|
@ -127,6 +142,11 @@ pub fn gendervoid(small: bool) {
|
||||||
} else { draw(&[navy, gray, black, gray, navy]); }
|
} else { draw(&[navy, gray, black, gray, navy]); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn intersex(small: bool) {
|
||||||
|
let yellow = color::Fg(color::Rgb(0xFF, 0xDA, 0x00));
|
||||||
|
let purple = color::Fg(color::Rgb(0x7A, 0x00, 0xAC));
|
||||||
|
}
|
||||||
|
|
||||||
pub fn lesbian(small: bool) {
|
pub fn lesbian(small: bool) {
|
||||||
let red = color::Fg(color::Rgb(0xD6, 0x28, 0x00));
|
let red = color::Fg(color::Rgb(0xD6, 0x28, 0x00));
|
||||||
let orange = color::Fg(color::Rgb(0xFF, 0x9B, 0x56));
|
let orange = color::Fg(color::Rgb(0xFF, 0x9B, 0x56));
|
||||||
|
@ -194,3 +214,12 @@ pub fn pansexual(small: bool) {
|
||||||
} else { draw(&[magenta, yellow, cyan]); }
|
} else { draw(&[magenta, yellow, cyan]); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn polyamorous() {
|
||||||
|
let blue = color::Fg(color::Rgb(0x01, 0x9F, 0xE3));
|
||||||
|
let magenta = color::Fg(color::Rgb(0xE5, 0x00, 0x51));
|
||||||
|
let purple = color::Fg(color::Rgb(0x34, 0x0C, 0x46));
|
||||||
|
|
||||||
|
let white = color::Fg(color::Rgb(0xFF, 0xFF, 0xFF));
|
||||||
|
let yellow = color::Fg(color::Rgb(0x00, 0xFC, 0xBF));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
13
src/main.rs
13
src/main.rs
|
@ -25,6 +25,8 @@ fn main() {
|
||||||
let subcommand = args.subcommand().unwrap();
|
let subcommand = args.subcommand().unwrap();
|
||||||
|
|
||||||
match subcommand.as_deref() {
|
match subcommand.as_deref() {
|
||||||
|
Some("progress") => flag::progress(small),
|
||||||
|
|
||||||
Some("pride") |
|
Some("pride") |
|
||||||
Some("gay") => flag::pride(small),
|
Some("gay") => flag::pride(small),
|
||||||
|
|
||||||
|
@ -45,6 +47,8 @@ fn main() {
|
||||||
|
|
||||||
Some("gendervoid") => flag::gendervoid(small),
|
Some("gendervoid") => flag::gendervoid(small),
|
||||||
|
|
||||||
|
Some("intersex") => flag::intersex(small),
|
||||||
|
|
||||||
Some("lesbian") => flag::lesbian(small),
|
Some("lesbian") => flag::lesbian(small),
|
||||||
|
|
||||||
Some("multigender") => flag::multigender(small),
|
Some("multigender") => flag::multigender(small),
|
||||||
|
@ -55,6 +59,11 @@ fn main() {
|
||||||
Some("pan") |
|
Some("pan") |
|
||||||
Some("pansexual") => flag::pansexual(small),
|
Some("pansexual") => flag::pansexual(small),
|
||||||
|
|
||||||
|
Some("poly") |
|
||||||
|
Some("polyam") |
|
||||||
|
Some("polyamory") |
|
||||||
|
Some("polyamorous") => flag::polyamorous(),
|
||||||
|
|
||||||
_ => { help_text(); exit(1) }
|
_ => { help_text(); exit(1) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,11 +96,13 @@ fn list_text() {
|
||||||
println!(" bi, bisexual bisexual pride flag");
|
println!(" bi, bisexual bisexual pride flag");
|
||||||
println!(" gay, pride six-color rainbow flag");
|
println!(" gay, pride six-color rainbow flag");
|
||||||
println!(" gendervoid gendervoid pride flag");
|
println!(" gendervoid gendervoid pride flag");
|
||||||
|
println!(" intersex intersex pride flag");
|
||||||
println!(" lesbian lesbian pride flag");
|
println!(" lesbian lesbian pride flag");
|
||||||
println!(" multigender multigender pride flag");
|
println!(" multigender multigender pride flag");
|
||||||
println!(" nb, nonbinary nonbinary pride flag");
|
println!(" nb, nonbinary nonbinary pride flag");
|
||||||
println!(" pan, pansexual pansexual pride flag");
|
println!(" pan, pansexual pansexual pride flag");
|
||||||
// println!(" progress progress arrow flag");
|
println!(" poly, polyamory polyamorous pride flag");
|
||||||
|
println!(" progress progress arrow flag");
|
||||||
println!(" trans, transgender transgender pride flag");
|
println!(" trans, transgender transgender pride flag");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue