├── .gitignore ├── src ├── main.rs ├── lib.rs ├── cli.rs └── quote.rs ├── Cargo.toml ├── flake.nix ├── license ├── readme.md ├── .github └── workflows │ └── nix.yml ├── flake.lock └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Error; 2 | use gigagei::cli::Args; 3 | use gigagei::get_quote_and_print; 4 | 5 | fn main() -> Result<(), Error> { 6 | let args: Args = argh::from_env(); 7 | 8 | get_quote_and_print(&args) 9 | } 10 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "gigagei" 3 | version = "0.3.0" 4 | edition = "2018" 5 | description = "random quote fetching console utility" 6 | repository = "https://github.com/q60/gigagei" 7 | license = "Unlicense" 8 | readme = "readme.md" 9 | 10 | [profile.release] 11 | opt-level = 3 12 | lto = "fat" 13 | codegen-units = 1 14 | panic = "abort" 15 | strip = true 16 | 17 | [dependencies] 18 | ureq = "3.0.10" 19 | serde = { version = "1.0.219", features = ["derive"] } 20 | serde_json = "1.0.140" 21 | textwrap = {version = "0.16.2", features = ["terminal_size"]} 22 | anyhow = "1.0.97" 23 | owo-colors = "4.2.0" 24 | argh = "0.1.13" 25 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "gigagei"; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 6 | utils.url = "github:numtide/flake-utils"; 7 | }; 8 | 9 | outputs = { 10 | self, 11 | nixpkgs, 12 | utils, 13 | }: 14 | utils.lib.eachDefaultSystem 15 | (system: let 16 | pkgs = import nixpkgs {inherit system;}; 17 | in { 18 | packages = { 19 | default = pkgs.rustPlatform.buildRustPackage { 20 | name = "gigagei"; 21 | 22 | nativeBuildInputs = [pkgs.clippy]; 23 | 24 | cargoLock.lockFile = ./Cargo.lock; 25 | src = pkgs.lib.cleanSource ./.; 26 | }; 27 | }; 28 | 29 | apps.default = utils.lib.mkApp {drv = self.packages.${system}.default;}; 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # ᎩᎦᎨᎢ ![rust](https://img.shields.io/badge/-Rust-DD3516?style=for-the-badge&logo=rust) 2 | 3 | [![Crates.io Version](https://img.shields.io/crates/v/gigagei?style=for-the-badge)](https://crates.io/crates/gigagei) 4 | 5 | **ᎩᎦᎨᎢ** (IPA: \[gigagei\]) is a random quote fetching console utility. Written in Rust. 6 | 7 | ![screenshot](https://github.com/user-attachments/assets/e4c1f7a0-e67e-42b7-91fe-81a1dc0f99d0) 8 | 9 | 10 | ## installing 11 | 12 | + use via the flake 13 | + `cargo install gigagei` 14 | + use latest pre-built binary from [releases](https://github.com/q60/gigagei/releases) 15 | 16 | 17 | ## options 18 | 19 | ```text 20 | Usage: gigagei [-b ] [-l ] [-a] [-n] [-j] [-w ] 21 | 22 | A random quote fetching console utility 23 | 24 | Options: 25 | -b, --backend quote fetching API, must be one of: forismatic, hapesire. 26 | default is hapesire 27 | -l, --language quote language, must be one of: en[glish], ru[ssian]. 28 | default is en 29 | -a, --ascii-quotation 30 | force ASCII quotation marks 31 | -n, --no-colors disables colors 32 | -j, --json return quote in JSON 33 | -w, --wrap-width wrap width in characters, default is terminal width 34 | -h, --help, help display usage information 35 | ``` 36 | 37 | 38 | ## building and installing manually 39 | 40 | you need *Rust* to build **ᎩᎦᎨᎢ**. 41 | 42 | ```sh 43 | cargo build --release 44 | ``` 45 | 46 | 47 | ## running 48 | 49 | ```sh 50 | gigagei 51 | ``` 52 | 53 | -------------------------------------------------------------------------------- /.github/workflows/nix.yml: -------------------------------------------------------------------------------- 1 | name: "cachix" 2 | on: 3 | push: 4 | jobs: 5 | build: 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: actions/checkout@v4 9 | - name: install nix 10 | uses: cachix/install-nix-action@v25 11 | with: 12 | nix_path: nixpkgs=channel:nixos-unstable 13 | - name: test 14 | run: | 15 | cargo test 16 | - name: install cachix 17 | run: | 18 | nix profile install nixpkgs#cachix 19 | - name: install jq 20 | run: | 21 | nix profile install nixpkgs#jq 22 | - name: build & push 23 | run: | 24 | nix build --json \ 25 | | jq -r '.[].outputs | to_entries[].value' \ 26 | | cachix push kira 27 | env: 28 | CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_AUTH_TOKEN }}' 29 | 30 | build-aarch64: 31 | runs-on: ubuntu-24.04-arm 32 | steps: 33 | - uses: actions/checkout@v4 34 | - name: install nix 35 | uses: cachix/install-nix-action@v25 36 | with: 37 | nix_path: nixpkgs=channel:nixos-unstable 38 | - name: test 39 | run: | 40 | cargo test 41 | - name: install cachix 42 | run: | 43 | nix profile install nixpkgs#cachix 44 | - name: install jq 45 | run: | 46 | nix profile install nixpkgs#jq 47 | - name: build & push 48 | run: | 49 | nix build --json \ 50 | | jq -r '.[].outputs | to_entries[].value' \ 51 | | cachix push kira 52 | env: 53 | CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_AUTH_TOKEN }}' 54 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "nixpkgs": { 4 | "locked": { 5 | "lastModified": 1742069588, 6 | "narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=", 7 | "owner": "nixos", 8 | "repo": "nixpkgs", 9 | "rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5", 10 | "type": "github" 11 | }, 12 | "original": { 13 | "owner": "nixos", 14 | "ref": "nixos-unstable", 15 | "repo": "nixpkgs", 16 | "type": "github" 17 | } 18 | }, 19 | "root": { 20 | "inputs": { 21 | "nixpkgs": "nixpkgs", 22 | "utils": "utils" 23 | } 24 | }, 25 | "systems": { 26 | "locked": { 27 | "lastModified": 1681028828, 28 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 29 | "owner": "nix-systems", 30 | "repo": "default", 31 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 32 | "type": "github" 33 | }, 34 | "original": { 35 | "owner": "nix-systems", 36 | "repo": "default", 37 | "type": "github" 38 | } 39 | }, 40 | "utils": { 41 | "inputs": { 42 | "systems": "systems" 43 | }, 44 | "locked": { 45 | "lastModified": 1731533236, 46 | "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 47 | "owner": "numtide", 48 | "repo": "flake-utils", 49 | "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 50 | "type": "github" 51 | }, 52 | "original": { 53 | "owner": "numtide", 54 | "repo": "flake-utils", 55 | "type": "github" 56 | } 57 | } 58 | }, 59 | "root": "root", 60 | "version": 7 61 | } 62 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | #![doc = include_str!("../readme.md")] 2 | 3 | pub mod cli; 4 | pub mod quote; 5 | 6 | use anyhow::Error; 7 | use cli::Args; 8 | use owo_colors::OwoColorize as _; 9 | use quote::Backend; 10 | use quote::Quote; 11 | 12 | pub const GUILLEMETS: (&str, &str) = ("«", "»"); 13 | pub const CURLY_QUOTES: (&str, &str) = ("“", "”"); 14 | pub const GERMAN_QUOTES: (&str, &str) = ("„", "“"); 15 | 16 | pub const FORISMATIC_URL: &str = "https://api.forismatic.com/api/1.0/?method=getQuote&format=json"; 17 | pub const HAPESIRE_URL: &str = "https://hapesire.kira.computer/api/quotes/random"; 18 | 19 | /// Prints out the quote and it's author (if not absent) using [`Args`]. 20 | pub fn get_quote_and_print(args: &Args) -> Result<(), Error> { 21 | let language: &str = args.get_language(); 22 | 23 | let quote_struct: Quote = match args.backend.to_lowercase().as_str() { 24 | "forismatic" => Backend::Forismatic { language }.get_quote_and_parse()?, 25 | "hapesire" | _ => Backend::Hapesire { language }.get_quote_and_parse()?, 26 | }; 27 | 28 | if args.json { 29 | let json: String = quote_struct.serialize_to_json()?; 30 | 31 | println!("{json}"); 32 | } else { 33 | let Quote { mut text, author } = quote_struct; 34 | 35 | textwrap::fill_inplace(&mut text, args.wrap_width - 2); 36 | 37 | let (text_style, author_style) = args.get_colors(); 38 | let (left_quote, right_quote) = args.get_quotation_marks(language); 39 | 40 | text = replace_quotations(&text, language); 41 | 42 | println!("{left_quote}{}{right_quote}", text.style(text_style)); 43 | 44 | if let Some(author) = author { 45 | println!("{}", author.style(author_style)); 46 | } 47 | } 48 | 49 | Ok(()) 50 | } 51 | 52 | /// Returns new [`String`] with quotation marks replaced according to the language. 53 | fn replace_quotations(text: &str, language: &str) -> String { 54 | if language == "ru" { 55 | text.replace(GUILLEMETS.0, GERMAN_QUOTES.0) 56 | .replace(GUILLEMETS.1, GERMAN_QUOTES.1) 57 | } else { 58 | text.replace('"', "'") 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/cli.rs: -------------------------------------------------------------------------------- 1 | //! CLI module. 2 | 3 | use super::CURLY_QUOTES; 4 | use super::GUILLEMETS; 5 | use argh::FromArgs; 6 | use owo_colors::Style; 7 | 8 | #[derive(FromArgs)] 9 | #[argh(help_triggers("-h", "--help", "help"))] 10 | /// A random quote fetching console utility 11 | pub struct Args { 12 | /// quote fetching API, must be one of: forismatic, hapesire. default is hapesire 13 | #[argh(option, short = 'b', default = "\"hapesire\".to_string()")] 14 | pub backend: String, 15 | 16 | /// quote language, must be one of: en\[glish\], ru\[ssian\]. default is en 17 | #[argh(option, short = 'l', default = "\"en\".to_string()")] 18 | pub language: String, 19 | 20 | /// force ASCII quotation marks 21 | #[argh(switch, short = 'a')] 22 | pub ascii_quotation: bool, 23 | 24 | /// disables colors 25 | #[argh(switch, short = 'n')] 26 | pub no_colors: bool, 27 | 28 | /// return quote in JSON 29 | #[argh(switch, short = 'j')] 30 | pub json: bool, 31 | 32 | /// wrap width in characters, default is terminal width 33 | #[argh(option, short = 'w', default = "textwrap::termwidth()")] 34 | pub wrap_width: usize, 35 | } 36 | 37 | impl Args { 38 | /// Returns a tuple of styles to use on quote and its author. 39 | pub fn get_colors(&self) -> (Style, Style) { 40 | if self.no_colors { 41 | let s = Style::new(); 42 | (s, s) 43 | } else { 44 | ( 45 | Style::new().bright_blue().bold(), 46 | Style::new().bright_yellow(), 47 | ) 48 | } 49 | } 50 | 51 | /// Returns a language code from the `ascii_quotation` option. 52 | pub fn get_language(&self) -> &str { 53 | if self.language.to_lowercase().starts_with("en") { 54 | "en" 55 | } else { 56 | "ru" 57 | } 58 | } 59 | 60 | /// Returns a tuple of quotation marks to use on quotes, considers `ascii_quotation` option and language. 61 | pub fn get_quotation_marks(&self, lang: &str) -> (&str, &str) { 62 | match (lang, self.ascii_quotation) { 63 | ("en" | "ru", true) => ("\"", "\""), 64 | ("ru", false) => GUILLEMETS, 65 | _ => CURLY_QUOTES, 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/quote.rs: -------------------------------------------------------------------------------- 1 | //! Quotes API module. 2 | 3 | use super::FORISMATIC_URL; 4 | use super::HAPESIRE_URL; 5 | use anyhow::Context as _; 6 | use anyhow::Result; 7 | use serde::Deserialize; 8 | use serde::Serialize; 9 | 10 | /// Enumerates quotes backends. 11 | pub enum Backend<'a> { 12 | /// Forismatic backend for quotes, provides quotes in English and Russian. 13 | Forismatic { language: &'a str }, 14 | 15 | /// Forismatic backend for quotes, provides quotes in English and Russian. 16 | Hapesire { language: &'a str }, 17 | } 18 | 19 | impl Backend<'_> { 20 | /// Gets a quote from the API and deserializes it to a [`Quote`]. 21 | /// 22 | /// This function replaces inaccurately escaped apostrophes, which occur regularly in API responses from Forismatic. 23 | /// 24 | /// # Errors 25 | /// 26 | /// Returns an error in several cases: 27 | /// 28 | /// * GET request fails 29 | /// * body cannot be parsed to a UTF-8 string 30 | /// * fails at deserializing [`String`] to [`Quote`] 31 | pub fn get_quote_and_parse(&self) -> Result { 32 | match self { 33 | Self::Forismatic { language } => Forismatic::get_quote_and_parse(language), 34 | Self::Hapesire { language } => Hapesire::get_quote_and_parse(language), 35 | } 36 | } 37 | } 38 | 39 | #[derive(Deserialize)] 40 | #[serde(rename_all = "camelCase")] 41 | /// Forismatic API response structure. 42 | struct Forismatic { 43 | /// quote text. 44 | quote_text: String, 45 | 46 | /// quote author, may be absent. 47 | quote_author: String, 48 | } 49 | 50 | #[derive(Deserialize)] 51 | struct Hapesire { 52 | data: HapesireObject, 53 | } 54 | 55 | #[derive(Deserialize)] 56 | struct HapesireObject { 57 | attributes: Quote, 58 | } 59 | 60 | impl Forismatic { 61 | /// Gets a quote from the API and deserializes it to a [`Quote`]. 62 | /// 63 | /// This function replaces inaccurately escaped apostrophes, which occur regularly in API responses from Forismatic. 64 | /// 65 | /// # Errors 66 | /// 67 | /// Returns an error in several cases: 68 | /// 69 | /// * GET request fails 70 | /// * body cannot be parsed to a UTF-8 string 71 | /// * fails at deserializing [`String`] to [`Quote`] 72 | pub fn get_quote_and_parse(lang: &str) -> Result { 73 | let uri = format!("{FORISMATIC_URL}&lang={lang}"); 74 | 75 | let response = request_get(&uri)?.replace("\\'", "'"); // i really hate this API 76 | 77 | let Self { 78 | quote_text, 79 | quote_author, 80 | } = serde_json::from_str::(&response).context("failed to deserialize JSON")?; 81 | 82 | let text = quote_text.trim().to_string(); 83 | let author = quote_author.trim().to_string(); 84 | 85 | Ok(Quote { 86 | text, 87 | author: if author.is_empty() { 88 | None 89 | } else { 90 | Some(author) 91 | }, 92 | }) 93 | } 94 | } 95 | 96 | impl Hapesire { 97 | /// Gets a quote from the API and deserializes it to a [`Quote`]. 98 | /// 99 | /// This function replaces inaccurately escaped apostrophes, which occur regularly in API responses from Forismatic. 100 | /// 101 | /// # Errors 102 | /// 103 | /// Returns an error in several cases: 104 | /// 105 | /// * GET request fails 106 | /// * body cannot be parsed to a UTF-8 string 107 | /// * fails at deserializing [`String`] to [`Quote`] 108 | pub fn get_quote_and_parse(lang: &str) -> Result { 109 | let uri = format!("{HAPESIRE_URL}/{lang}"); 110 | 111 | let response = request_get(&uri)?; 112 | let object = 113 | serde_json::from_str::(&response).context("failed to deserialize JSON")?; 114 | 115 | Ok(object.data.attributes) 116 | } 117 | } 118 | 119 | #[derive(Serialize, Deserialize, Clone)] 120 | /// Quote structure. 121 | pub struct Quote { 122 | /// quote text. 123 | pub text: String, 124 | 125 | /// quote author. 126 | pub author: Option, 127 | } 128 | 129 | impl Quote { 130 | /// Serializes a [`Quote`] to a JSON string. 131 | /// 132 | /// # Errors 133 | /// 134 | /// Returns an error on parsing failure. 135 | pub fn serialize_to_json(self) -> Result { 136 | serde_json::to_string(&self).context("failed to serialize Quote") 137 | } 138 | } 139 | 140 | /// Performs a GET request using [`ureq`] and returns the body as a [`String`]. 141 | /// 142 | /// # Errors 143 | /// 144 | /// Returns an error if the GET request fails or if the body cannot be parsed to a UTF-8 string. 145 | pub fn request_get(uri: &str) -> Result { 146 | let mut response = ureq::get(uri).call().context("request error")?; 147 | let string = response 148 | .body_mut() 149 | .read_to_string() 150 | .context("failed to read response")?; 151 | 152 | Ok(string) 153 | } 154 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "adler2" 7 | version = "2.0.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 10 | 11 | [[package]] 12 | name = "anyhow" 13 | version = "1.0.97" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" 16 | 17 | [[package]] 18 | name = "argh" 19 | version = "0.1.13" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "34ff18325c8a36b82f992e533ece1ec9f9a9db446bd1c14d4f936bac88fcd240" 22 | dependencies = [ 23 | "argh_derive", 24 | "argh_shared", 25 | "rust-fuzzy-search", 26 | ] 27 | 28 | [[package]] 29 | name = "argh_derive" 30 | version = "0.1.13" 31 | source = "registry+https://github.com/rust-lang/crates.io-index" 32 | checksum = "adb7b2b83a50d329d5d8ccc620f5c7064028828538bdf5646acd60dc1f767803" 33 | dependencies = [ 34 | "argh_shared", 35 | "proc-macro2", 36 | "quote", 37 | "syn", 38 | ] 39 | 40 | [[package]] 41 | name = "argh_shared" 42 | version = "0.1.13" 43 | source = "registry+https://github.com/rust-lang/crates.io-index" 44 | checksum = "a464143cc82dedcdc3928737445362466b7674b5db4e2eb8e869846d6d84f4f6" 45 | dependencies = [ 46 | "serde", 47 | ] 48 | 49 | [[package]] 50 | name = "base64" 51 | version = "0.22.1" 52 | source = "registry+https://github.com/rust-lang/crates.io-index" 53 | checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 54 | 55 | [[package]] 56 | name = "bitflags" 57 | version = "2.9.0" 58 | source = "registry+https://github.com/rust-lang/crates.io-index" 59 | checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" 60 | 61 | [[package]] 62 | name = "bytes" 63 | version = "1.10.1" 64 | source = "registry+https://github.com/rust-lang/crates.io-index" 65 | checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 66 | 67 | [[package]] 68 | name = "cc" 69 | version = "1.2.16" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" 72 | dependencies = [ 73 | "shlex", 74 | ] 75 | 76 | [[package]] 77 | name = "cfg-if" 78 | version = "1.0.0" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 81 | 82 | [[package]] 83 | name = "crc32fast" 84 | version = "1.4.2" 85 | source = "registry+https://github.com/rust-lang/crates.io-index" 86 | checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" 87 | dependencies = [ 88 | "cfg-if", 89 | ] 90 | 91 | [[package]] 92 | name = "errno" 93 | version = "0.3.10" 94 | source = "registry+https://github.com/rust-lang/crates.io-index" 95 | checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" 96 | dependencies = [ 97 | "libc", 98 | "windows-sys 0.52.0", 99 | ] 100 | 101 | [[package]] 102 | name = "flate2" 103 | version = "1.1.0" 104 | source = "registry+https://github.com/rust-lang/crates.io-index" 105 | checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" 106 | dependencies = [ 107 | "crc32fast", 108 | "miniz_oxide", 109 | ] 110 | 111 | [[package]] 112 | name = "fnv" 113 | version = "1.0.7" 114 | source = "registry+https://github.com/rust-lang/crates.io-index" 115 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 116 | 117 | [[package]] 118 | name = "getrandom" 119 | version = "0.2.15" 120 | source = "registry+https://github.com/rust-lang/crates.io-index" 121 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 122 | dependencies = [ 123 | "cfg-if", 124 | "libc", 125 | "wasi", 126 | ] 127 | 128 | [[package]] 129 | name = "gigagei" 130 | version = "0.3.0" 131 | dependencies = [ 132 | "anyhow", 133 | "argh", 134 | "owo-colors", 135 | "serde", 136 | "serde_json", 137 | "textwrap", 138 | "ureq", 139 | ] 140 | 141 | [[package]] 142 | name = "http" 143 | version = "1.3.1" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" 146 | dependencies = [ 147 | "bytes", 148 | "fnv", 149 | "itoa", 150 | ] 151 | 152 | [[package]] 153 | name = "httparse" 154 | version = "1.10.1" 155 | source = "registry+https://github.com/rust-lang/crates.io-index" 156 | checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" 157 | 158 | [[package]] 159 | name = "itoa" 160 | version = "1.0.15" 161 | source = "registry+https://github.com/rust-lang/crates.io-index" 162 | checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 163 | 164 | [[package]] 165 | name = "libc" 166 | version = "0.2.171" 167 | source = "registry+https://github.com/rust-lang/crates.io-index" 168 | checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" 169 | 170 | [[package]] 171 | name = "linux-raw-sys" 172 | version = "0.9.3" 173 | source = "registry+https://github.com/rust-lang/crates.io-index" 174 | checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" 175 | 176 | [[package]] 177 | name = "log" 178 | version = "0.4.26" 179 | source = "registry+https://github.com/rust-lang/crates.io-index" 180 | checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" 181 | 182 | [[package]] 183 | name = "memchr" 184 | version = "2.7.4" 185 | source = "registry+https://github.com/rust-lang/crates.io-index" 186 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 187 | 188 | [[package]] 189 | name = "miniz_oxide" 190 | version = "0.8.5" 191 | source = "registry+https://github.com/rust-lang/crates.io-index" 192 | checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" 193 | dependencies = [ 194 | "adler2", 195 | ] 196 | 197 | [[package]] 198 | name = "once_cell" 199 | version = "1.21.1" 200 | source = "registry+https://github.com/rust-lang/crates.io-index" 201 | checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" 202 | 203 | [[package]] 204 | name = "owo-colors" 205 | version = "4.2.0" 206 | source = "registry+https://github.com/rust-lang/crates.io-index" 207 | checksum = "1036865bb9422d3300cf723f657c2851d0e9ab12567854b1f4eba3d77decf564" 208 | 209 | [[package]] 210 | name = "percent-encoding" 211 | version = "2.3.1" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 214 | 215 | [[package]] 216 | name = "proc-macro2" 217 | version = "1.0.94" 218 | source = "registry+https://github.com/rust-lang/crates.io-index" 219 | checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" 220 | dependencies = [ 221 | "unicode-ident", 222 | ] 223 | 224 | [[package]] 225 | name = "quote" 226 | version = "1.0.40" 227 | source = "registry+https://github.com/rust-lang/crates.io-index" 228 | checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 229 | dependencies = [ 230 | "proc-macro2", 231 | ] 232 | 233 | [[package]] 234 | name = "ring" 235 | version = "0.17.14" 236 | source = "registry+https://github.com/rust-lang/crates.io-index" 237 | checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" 238 | dependencies = [ 239 | "cc", 240 | "cfg-if", 241 | "getrandom", 242 | "libc", 243 | "untrusted", 244 | "windows-sys 0.52.0", 245 | ] 246 | 247 | [[package]] 248 | name = "rust-fuzzy-search" 249 | version = "0.1.1" 250 | source = "registry+https://github.com/rust-lang/crates.io-index" 251 | checksum = "a157657054ffe556d8858504af8a672a054a6e0bd9e8ee531059100c0fa11bb2" 252 | 253 | [[package]] 254 | name = "rustix" 255 | version = "1.0.3" 256 | source = "registry+https://github.com/rust-lang/crates.io-index" 257 | checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96" 258 | dependencies = [ 259 | "bitflags", 260 | "errno", 261 | "libc", 262 | "linux-raw-sys", 263 | "windows-sys 0.52.0", 264 | ] 265 | 266 | [[package]] 267 | name = "rustls" 268 | version = "0.23.25" 269 | source = "registry+https://github.com/rust-lang/crates.io-index" 270 | checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c" 271 | dependencies = [ 272 | "log", 273 | "once_cell", 274 | "ring", 275 | "rustls-pki-types", 276 | "rustls-webpki", 277 | "subtle", 278 | "zeroize", 279 | ] 280 | 281 | [[package]] 282 | name = "rustls-pemfile" 283 | version = "2.2.0" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" 286 | dependencies = [ 287 | "rustls-pki-types", 288 | ] 289 | 290 | [[package]] 291 | name = "rustls-pki-types" 292 | version = "1.11.0" 293 | source = "registry+https://github.com/rust-lang/crates.io-index" 294 | checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" 295 | 296 | [[package]] 297 | name = "rustls-webpki" 298 | version = "0.103.0" 299 | source = "registry+https://github.com/rust-lang/crates.io-index" 300 | checksum = "0aa4eeac2588ffff23e9d7a7e9b3f971c5fb5b7ebc9452745e0c232c64f83b2f" 301 | dependencies = [ 302 | "ring", 303 | "rustls-pki-types", 304 | "untrusted", 305 | ] 306 | 307 | [[package]] 308 | name = "ryu" 309 | version = "1.0.20" 310 | source = "registry+https://github.com/rust-lang/crates.io-index" 311 | checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 312 | 313 | [[package]] 314 | name = "serde" 315 | version = "1.0.219" 316 | source = "registry+https://github.com/rust-lang/crates.io-index" 317 | checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 318 | dependencies = [ 319 | "serde_derive", 320 | ] 321 | 322 | [[package]] 323 | name = "serde_derive" 324 | version = "1.0.219" 325 | source = "registry+https://github.com/rust-lang/crates.io-index" 326 | checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 327 | dependencies = [ 328 | "proc-macro2", 329 | "quote", 330 | "syn", 331 | ] 332 | 333 | [[package]] 334 | name = "serde_json" 335 | version = "1.0.140" 336 | source = "registry+https://github.com/rust-lang/crates.io-index" 337 | checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" 338 | dependencies = [ 339 | "itoa", 340 | "memchr", 341 | "ryu", 342 | "serde", 343 | ] 344 | 345 | [[package]] 346 | name = "shlex" 347 | version = "1.3.0" 348 | source = "registry+https://github.com/rust-lang/crates.io-index" 349 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 350 | 351 | [[package]] 352 | name = "smawk" 353 | version = "0.3.2" 354 | source = "registry+https://github.com/rust-lang/crates.io-index" 355 | checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" 356 | 357 | [[package]] 358 | name = "subtle" 359 | version = "2.6.1" 360 | source = "registry+https://github.com/rust-lang/crates.io-index" 361 | checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" 362 | 363 | [[package]] 364 | name = "syn" 365 | version = "2.0.100" 366 | source = "registry+https://github.com/rust-lang/crates.io-index" 367 | checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" 368 | dependencies = [ 369 | "proc-macro2", 370 | "quote", 371 | "unicode-ident", 372 | ] 373 | 374 | [[package]] 375 | name = "terminal_size" 376 | version = "0.4.2" 377 | source = "registry+https://github.com/rust-lang/crates.io-index" 378 | checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" 379 | dependencies = [ 380 | "rustix", 381 | "windows-sys 0.59.0", 382 | ] 383 | 384 | [[package]] 385 | name = "textwrap" 386 | version = "0.16.2" 387 | source = "registry+https://github.com/rust-lang/crates.io-index" 388 | checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" 389 | dependencies = [ 390 | "smawk", 391 | "terminal_size", 392 | "unicode-linebreak", 393 | "unicode-width", 394 | ] 395 | 396 | [[package]] 397 | name = "unicode-ident" 398 | version = "1.0.18" 399 | source = "registry+https://github.com/rust-lang/crates.io-index" 400 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 401 | 402 | [[package]] 403 | name = "unicode-linebreak" 404 | version = "0.1.5" 405 | source = "registry+https://github.com/rust-lang/crates.io-index" 406 | checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" 407 | 408 | [[package]] 409 | name = "unicode-width" 410 | version = "0.2.0" 411 | source = "registry+https://github.com/rust-lang/crates.io-index" 412 | checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" 413 | 414 | [[package]] 415 | name = "untrusted" 416 | version = "0.9.0" 417 | source = "registry+https://github.com/rust-lang/crates.io-index" 418 | checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" 419 | 420 | [[package]] 421 | name = "ureq" 422 | version = "3.0.10" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | checksum = "4b0351ca625c7b41a8e4f9bb6c5d9755f67f62c2187ebedecacd9974674b271d" 425 | dependencies = [ 426 | "base64", 427 | "flate2", 428 | "log", 429 | "percent-encoding", 430 | "rustls", 431 | "rustls-pemfile", 432 | "rustls-pki-types", 433 | "ureq-proto", 434 | "utf-8", 435 | "webpki-roots", 436 | ] 437 | 438 | [[package]] 439 | name = "ureq-proto" 440 | version = "0.3.5" 441 | source = "registry+https://github.com/rust-lang/crates.io-index" 442 | checksum = "ae239d0a3341aebc94259414d1dc67cfce87d41cbebc816772c91b77902fafa4" 443 | dependencies = [ 444 | "base64", 445 | "http", 446 | "httparse", 447 | "log", 448 | ] 449 | 450 | [[package]] 451 | name = "utf-8" 452 | version = "0.7.6" 453 | source = "registry+https://github.com/rust-lang/crates.io-index" 454 | checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" 455 | 456 | [[package]] 457 | name = "wasi" 458 | version = "0.11.0+wasi-snapshot-preview1" 459 | source = "registry+https://github.com/rust-lang/crates.io-index" 460 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 461 | 462 | [[package]] 463 | name = "webpki-roots" 464 | version = "0.26.8" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" 467 | dependencies = [ 468 | "rustls-pki-types", 469 | ] 470 | 471 | [[package]] 472 | name = "windows-sys" 473 | version = "0.52.0" 474 | source = "registry+https://github.com/rust-lang/crates.io-index" 475 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 476 | dependencies = [ 477 | "windows-targets", 478 | ] 479 | 480 | [[package]] 481 | name = "windows-sys" 482 | version = "0.59.0" 483 | source = "registry+https://github.com/rust-lang/crates.io-index" 484 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 485 | dependencies = [ 486 | "windows-targets", 487 | ] 488 | 489 | [[package]] 490 | name = "windows-targets" 491 | version = "0.52.6" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 494 | dependencies = [ 495 | "windows_aarch64_gnullvm", 496 | "windows_aarch64_msvc", 497 | "windows_i686_gnu", 498 | "windows_i686_gnullvm", 499 | "windows_i686_msvc", 500 | "windows_x86_64_gnu", 501 | "windows_x86_64_gnullvm", 502 | "windows_x86_64_msvc", 503 | ] 504 | 505 | [[package]] 506 | name = "windows_aarch64_gnullvm" 507 | version = "0.52.6" 508 | source = "registry+https://github.com/rust-lang/crates.io-index" 509 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 510 | 511 | [[package]] 512 | name = "windows_aarch64_msvc" 513 | version = "0.52.6" 514 | source = "registry+https://github.com/rust-lang/crates.io-index" 515 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 516 | 517 | [[package]] 518 | name = "windows_i686_gnu" 519 | version = "0.52.6" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 522 | 523 | [[package]] 524 | name = "windows_i686_gnullvm" 525 | version = "0.52.6" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 528 | 529 | [[package]] 530 | name = "windows_i686_msvc" 531 | version = "0.52.6" 532 | source = "registry+https://github.com/rust-lang/crates.io-index" 533 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 534 | 535 | [[package]] 536 | name = "windows_x86_64_gnu" 537 | version = "0.52.6" 538 | source = "registry+https://github.com/rust-lang/crates.io-index" 539 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 540 | 541 | [[package]] 542 | name = "windows_x86_64_gnullvm" 543 | version = "0.52.6" 544 | source = "registry+https://github.com/rust-lang/crates.io-index" 545 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 546 | 547 | [[package]] 548 | name = "windows_x86_64_msvc" 549 | version = "0.52.6" 550 | source = "registry+https://github.com/rust-lang/crates.io-index" 551 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 552 | 553 | [[package]] 554 | name = "zeroize" 555 | version = "1.8.1" 556 | source = "registry+https://github.com/rust-lang/crates.io-index" 557 | checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" 558 | --------------------------------------------------------------------------------