silly goober bot

feat: use kitty api

+510 -60
+496 -35
Cargo.lock
··· 51 51 ] 52 52 53 53 [[package]] 54 + name = "anstream" 55 + version = "0.6.14" 56 + source = "registry+https://github.com/rust-lang/crates.io-index" 57 + checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" 58 + dependencies = [ 59 + "anstyle", 60 + "anstyle-parse", 61 + "anstyle-query", 62 + "anstyle-wincon", 63 + "colorchoice", 64 + "is_terminal_polyfill", 65 + "utf8parse", 66 + ] 67 + 68 + [[package]] 69 + name = "anstyle" 70 + version = "1.0.7" 71 + source = "registry+https://github.com/rust-lang/crates.io-index" 72 + checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" 73 + 74 + [[package]] 75 + name = "anstyle-parse" 76 + version = "0.2.4" 77 + source = "registry+https://github.com/rust-lang/crates.io-index" 78 + checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" 79 + dependencies = [ 80 + "utf8parse", 81 + ] 82 + 83 + [[package]] 84 + name = "anstyle-query" 85 + version = "1.1.0" 86 + source = "registry+https://github.com/rust-lang/crates.io-index" 87 + checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" 88 + dependencies = [ 89 + "windows-sys 0.52.0", 90 + ] 91 + 92 + [[package]] 93 + name = "anstyle-wincon" 94 + version = "3.0.3" 95 + source = "registry+https://github.com/rust-lang/crates.io-index" 96 + checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" 97 + dependencies = [ 98 + "anstyle", 99 + "windows-sys 0.52.0", 100 + ] 101 + 102 + [[package]] 54 103 name = "anyhow" 55 104 version = "1.0.86" 56 105 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 146 195 "color-eyre", 147 196 "dotenv", 148 197 "humantime", 198 + "kittysay", 149 199 "poise", 150 200 "rand 0.8.5", 151 201 "regex", ··· 170 220 checksum = "6836f736e3f74b97b1e816f2ab9e1464a24f2fb114151a4c5ee3dce6ce413768" 171 221 dependencies = [ 172 222 "anyhow", 173 - "clap", 223 + "clap 2.34.0", 174 224 "phf", 175 225 "phf_codegen", 176 226 ] ··· 265 315 "atty", 266 316 "bitflags 1.3.2", 267 317 "strsim 0.8.0", 268 - "textwrap", 318 + "textwrap 0.11.0", 269 319 "unicode-width", 270 320 "vec_map", 271 321 ] 272 322 273 323 [[package]] 324 + name = "clap" 325 + version = "4.5.7" 326 + source = "registry+https://github.com/rust-lang/crates.io-index" 327 + checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" 328 + dependencies = [ 329 + "clap_builder", 330 + "clap_derive", 331 + ] 332 + 333 + [[package]] 334 + name = "clap-stdin" 335 + version = "0.4.0" 336 + source = "registry+https://github.com/rust-lang/crates.io-index" 337 + checksum = "bc126d12a0930c94c3548581294d5f19360ac02e408600b4d7619d7234e8b505" 338 + dependencies = [ 339 + "thiserror", 340 + ] 341 + 342 + [[package]] 343 + name = "clap_builder" 344 + version = "4.5.7" 345 + source = "registry+https://github.com/rust-lang/crates.io-index" 346 + checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" 347 + dependencies = [ 348 + "anstream", 349 + "anstyle", 350 + "clap_lex", 351 + "strsim 0.11.1", 352 + ] 353 + 354 + [[package]] 355 + name = "clap_derive" 356 + version = "4.5.5" 357 + source = "registry+https://github.com/rust-lang/crates.io-index" 358 + checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" 359 + dependencies = [ 360 + "heck", 361 + "proc-macro2", 362 + "quote", 363 + "syn 2.0.66", 364 + ] 365 + 366 + [[package]] 367 + name = "clap_lex" 368 + version = "0.7.1" 369 + source = "registry+https://github.com/rust-lang/crates.io-index" 370 + checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" 371 + 372 + [[package]] 274 373 name = "color-eyre" 275 374 version = "0.6.3" 276 375 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 296 395 "tracing-core", 297 396 "tracing-error", 298 397 ] 398 + 399 + [[package]] 400 + name = "colorchoice" 401 + version = "1.0.1" 402 + source = "registry+https://github.com/rust-lang/crates.io-index" 403 + checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" 299 404 300 405 [[package]] 301 406 name = "command_attr" ··· 309 414 ] 310 415 311 416 [[package]] 417 + name = "console" 418 + version = "0.15.8" 419 + source = "registry+https://github.com/rust-lang/crates.io-index" 420 + checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" 421 + dependencies = [ 422 + "encode_unicode", 423 + "lazy_static", 424 + "libc", 425 + "unicode-width", 426 + "windows-sys 0.52.0", 427 + ] 428 + 429 + [[package]] 312 430 name = "core-foundation" 313 431 version = "0.9.4" 314 432 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 358 476 checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" 359 477 360 478 [[package]] 479 + name = "crossterm" 480 + version = "0.27.0" 481 + source = "registry+https://github.com/rust-lang/crates.io-index" 482 + checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" 483 + dependencies = [ 484 + "bitflags 2.5.0", 485 + "crossterm_winapi", 486 + "libc", 487 + "mio", 488 + "parking_lot", 489 + "signal-hook", 490 + "signal-hook-mio", 491 + "winapi", 492 + ] 493 + 494 + [[package]] 495 + name = "crossterm_winapi" 496 + version = "0.9.1" 497 + source = "registry+https://github.com/rust-lang/crates.io-index" 498 + checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" 499 + dependencies = [ 500 + "winapi", 501 + ] 502 + 503 + [[package]] 361 504 name = "crypto-common" 362 505 version = "0.1.6" 363 506 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 454 597 ] 455 598 456 599 [[package]] 600 + name = "displaydoc" 601 + version = "0.2.4" 602 + source = "registry+https://github.com/rust-lang/crates.io-index" 603 + checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" 604 + dependencies = [ 605 + "proc-macro2", 606 + "quote", 607 + "syn 2.0.66", 608 + ] 609 + 610 + [[package]] 457 611 name = "dotenv" 458 612 version = "0.15.0" 459 613 source = "registry+https://github.com/rust-lang/crates.io-index" 460 614 checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" 615 + 616 + [[package]] 617 + name = "encode_unicode" 618 + version = "0.3.6" 619 + source = "registry+https://github.com/rust-lang/crates.io-index" 620 + checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" 461 621 462 622 [[package]] 463 623 name = "encoding_rs" ··· 724 884 checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 725 885 726 886 [[package]] 887 + name = "heck" 888 + version = "0.5.0" 889 + source = "registry+https://github.com/rust-lang/crates.io-index" 890 + checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 891 + 892 + [[package]] 727 893 name = "hermit-abi" 728 894 version = "0.1.19" 729 895 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 783 949 784 950 [[package]] 785 951 name = "http-body-util" 786 - version = "0.1.1" 952 + version = "0.1.2" 787 953 source = "registry+https://github.com/rust-lang/crates.io-index" 788 - checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" 954 + checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" 789 955 dependencies = [ 790 956 "bytes", 791 - "futures-core", 957 + "futures-util", 792 958 "http 1.1.0", 793 959 "http-body 1.0.0", 794 960 "pin-project-lite", ··· 796 962 797 963 [[package]] 798 964 name = "httparse" 799 - version = "1.8.0" 965 + version = "1.9.2" 800 966 source = "registry+https://github.com/rust-lang/crates.io-index" 801 - checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 967 + checksum = "9f3935c160d00ac752e09787e6e6bfc26494c2183cc922f1bc678a60d4733bc2" 802 968 803 969 [[package]] 804 970 name = "httpdate" ··· 930 1096 ] 931 1097 932 1098 [[package]] 1099 + name = "icu_collections" 1100 + version = "1.5.0" 1101 + source = "registry+https://github.com/rust-lang/crates.io-index" 1102 + checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" 1103 + dependencies = [ 1104 + "displaydoc", 1105 + "yoke", 1106 + "zerofrom", 1107 + "zerovec", 1108 + ] 1109 + 1110 + [[package]] 1111 + name = "icu_locid" 1112 + version = "1.5.0" 1113 + source = "registry+https://github.com/rust-lang/crates.io-index" 1114 + checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" 1115 + dependencies = [ 1116 + "displaydoc", 1117 + "litemap", 1118 + "tinystr", 1119 + "writeable", 1120 + "zerovec", 1121 + ] 1122 + 1123 + [[package]] 1124 + name = "icu_locid_transform" 1125 + version = "1.5.0" 1126 + source = "registry+https://github.com/rust-lang/crates.io-index" 1127 + checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" 1128 + dependencies = [ 1129 + "displaydoc", 1130 + "icu_locid", 1131 + "icu_locid_transform_data", 1132 + "icu_provider", 1133 + "tinystr", 1134 + "zerovec", 1135 + ] 1136 + 1137 + [[package]] 1138 + name = "icu_locid_transform_data" 1139 + version = "1.5.0" 1140 + source = "registry+https://github.com/rust-lang/crates.io-index" 1141 + checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" 1142 + 1143 + [[package]] 1144 + name = "icu_normalizer" 1145 + version = "1.5.0" 1146 + source = "registry+https://github.com/rust-lang/crates.io-index" 1147 + checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" 1148 + dependencies = [ 1149 + "displaydoc", 1150 + "icu_collections", 1151 + "icu_normalizer_data", 1152 + "icu_properties", 1153 + "icu_provider", 1154 + "smallvec", 1155 + "utf16_iter", 1156 + "utf8_iter", 1157 + "write16", 1158 + "zerovec", 1159 + ] 1160 + 1161 + [[package]] 1162 + name = "icu_normalizer_data" 1163 + version = "1.5.0" 1164 + source = "registry+https://github.com/rust-lang/crates.io-index" 1165 + checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" 1166 + 1167 + [[package]] 1168 + name = "icu_properties" 1169 + version = "1.5.0" 1170 + source = "registry+https://github.com/rust-lang/crates.io-index" 1171 + checksum = "1f8ac670d7422d7f76b32e17a5db556510825b29ec9154f235977c9caba61036" 1172 + dependencies = [ 1173 + "displaydoc", 1174 + "icu_collections", 1175 + "icu_locid_transform", 1176 + "icu_properties_data", 1177 + "icu_provider", 1178 + "tinystr", 1179 + "zerovec", 1180 + ] 1181 + 1182 + [[package]] 1183 + name = "icu_properties_data" 1184 + version = "1.5.0" 1185 + source = "registry+https://github.com/rust-lang/crates.io-index" 1186 + checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" 1187 + 1188 + [[package]] 1189 + name = "icu_provider" 1190 + version = "1.5.0" 1191 + source = "registry+https://github.com/rust-lang/crates.io-index" 1192 + checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" 1193 + dependencies = [ 1194 + "displaydoc", 1195 + "icu_locid", 1196 + "icu_provider_macros", 1197 + "stable_deref_trait", 1198 + "tinystr", 1199 + "writeable", 1200 + "yoke", 1201 + "zerofrom", 1202 + "zerovec", 1203 + ] 1204 + 1205 + [[package]] 1206 + name = "icu_provider_macros" 1207 + version = "1.5.0" 1208 + source = "registry+https://github.com/rust-lang/crates.io-index" 1209 + checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" 1210 + dependencies = [ 1211 + "proc-macro2", 1212 + "quote", 1213 + "syn 2.0.66", 1214 + ] 1215 + 1216 + [[package]] 933 1217 name = "ident_case" 934 1218 version = "1.0.1" 935 1219 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 937 1221 938 1222 [[package]] 939 1223 name = "idna" 940 - version = "0.5.0" 1224 + version = "1.0.0" 941 1225 source = "registry+https://github.com/rust-lang/crates.io-index" 942 - checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" 1226 + checksum = "4716a3a0933a1d01c2f72450e89596eb51dd34ef3c211ccd875acdf1f8fe47ed" 943 1227 dependencies = [ 944 - "unicode-bidi", 945 - "unicode-normalization", 1228 + "icu_normalizer", 1229 + "icu_properties", 1230 + "smallvec", 1231 + "utf8_iter", 946 1232 ] 947 1233 948 1234 [[package]] ··· 968 1254 checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" 969 1255 970 1256 [[package]] 1257 + name = "is_terminal_polyfill" 1258 + version = "1.70.0" 1259 + source = "registry+https://github.com/rust-lang/crates.io-index" 1260 + checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" 1261 + 1262 + [[package]] 971 1263 name = "itoa" 972 1264 version = "1.0.11" 973 1265 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 983 1275 ] 984 1276 985 1277 [[package]] 1278 + name = "kittysay" 1279 + version = "0.8.0" 1280 + source = "registry+https://github.com/rust-lang/crates.io-index" 1281 + checksum = "069387989a3b4c9824320975e3689503053c49ee46de1c3b15597a20574d66c6" 1282 + dependencies = [ 1283 + "clap 4.5.7", 1284 + "clap-stdin", 1285 + "color-eyre", 1286 + "console", 1287 + "crossterm", 1288 + "textwrap 0.16.1", 1289 + "unicode-width", 1290 + ] 1291 + 1292 + [[package]] 986 1293 name = "lazy_static" 987 1294 version = "1.4.0" 988 1295 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1005 1312 version = "0.4.14" 1006 1313 source = "registry+https://github.com/rust-lang/crates.io-index" 1007 1314 checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" 1315 + 1316 + [[package]] 1317 + name = "litemap" 1318 + version = "0.7.3" 1319 + source = "registry+https://github.com/rust-lang/crates.io-index" 1320 + checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" 1008 1321 1009 1322 [[package]] 1010 1323 name = "lock_api" ··· 1075 1388 checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" 1076 1389 dependencies = [ 1077 1390 "libc", 1391 + "log", 1078 1392 "wasi 0.11.0+wasi-snapshot-preview1", 1079 1393 "windows-sys 0.48.0", 1080 1394 ] ··· 1864 2178 ] 1865 2179 1866 2180 [[package]] 2181 + name = "signal-hook" 2182 + version = "0.3.17" 2183 + source = "registry+https://github.com/rust-lang/crates.io-index" 2184 + checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" 2185 + dependencies = [ 2186 + "libc", 2187 + "signal-hook-registry", 2188 + ] 2189 + 2190 + [[package]] 2191 + name = "signal-hook-mio" 2192 + version = "0.2.3" 2193 + source = "registry+https://github.com/rust-lang/crates.io-index" 2194 + checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" 2195 + dependencies = [ 2196 + "libc", 2197 + "mio", 2198 + "signal-hook", 2199 + ] 2200 + 2201 + [[package]] 2202 + name = "signal-hook-registry" 2203 + version = "1.4.2" 2204 + source = "registry+https://github.com/rust-lang/crates.io-index" 2205 + checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" 2206 + dependencies = [ 2207 + "libc", 2208 + ] 2209 + 2210 + [[package]] 1867 2211 name = "siphasher" 1868 2212 version = "0.3.11" 1869 2213 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1900 2244 checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 1901 2245 1902 2246 [[package]] 2247 + name = "smawk" 2248 + version = "0.3.2" 2249 + source = "registry+https://github.com/rust-lang/crates.io-index" 2250 + checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" 2251 + 2252 + [[package]] 1903 2253 name = "socket2" 1904 2254 version = "0.5.7" 1905 2255 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1914 2264 version = "0.9.8" 1915 2265 source = "registry+https://github.com/rust-lang/crates.io-index" 1916 2266 checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 2267 + 2268 + [[package]] 2269 + name = "stable_deref_trait" 2270 + version = "1.2.0" 2271 + source = "registry+https://github.com/rust-lang/crates.io-index" 2272 + checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 1917 2273 1918 2274 [[package]] 1919 2275 name = "static_assertions" ··· 1968 2324 checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" 1969 2325 1970 2326 [[package]] 2327 + name = "synstructure" 2328 + version = "0.13.1" 2329 + source = "registry+https://github.com/rust-lang/crates.io-index" 2330 + checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" 2331 + dependencies = [ 2332 + "proc-macro2", 2333 + "quote", 2334 + "syn 2.0.66", 2335 + ] 2336 + 2337 + [[package]] 1971 2338 name = "system-configuration" 1972 2339 version = "0.5.1" 1973 2340 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2016 2383 ] 2017 2384 2018 2385 [[package]] 2386 + name = "textwrap" 2387 + version = "0.16.1" 2388 + source = "registry+https://github.com/rust-lang/crates.io-index" 2389 + checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" 2390 + dependencies = [ 2391 + "smawk", 2392 + "unicode-linebreak", 2393 + "unicode-width", 2394 + ] 2395 + 2396 + [[package]] 2019 2397 name = "thiserror" 2020 2398 version = "1.0.61" 2021 2399 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2077 2455 ] 2078 2456 2079 2457 [[package]] 2080 - name = "tinyvec" 2081 - version = "1.6.0" 2458 + name = "tinystr" 2459 + version = "0.7.6" 2082 2460 source = "registry+https://github.com/rust-lang/crates.io-index" 2083 - checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 2461 + checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" 2084 2462 dependencies = [ 2085 - "tinyvec_macros", 2463 + "displaydoc", 2464 + "zerovec", 2086 2465 ] 2087 - 2088 - [[package]] 2089 - name = "tinyvec_macros" 2090 - version = "0.1.1" 2091 - source = "registry+https://github.com/rust-lang/crates.io-index" 2092 - checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2093 2466 2094 2467 [[package]] 2095 2468 name = "tokio" ··· 2344 2717 ] 2345 2718 2346 2719 [[package]] 2347 - name = "unicode-bidi" 2348 - version = "0.3.15" 2349 - source = "registry+https://github.com/rust-lang/crates.io-index" 2350 - checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" 2351 - 2352 - [[package]] 2353 2720 name = "unicode-ident" 2354 2721 version = "1.0.12" 2355 2722 source = "registry+https://github.com/rust-lang/crates.io-index" 2356 2723 checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 2357 2724 2358 2725 [[package]] 2359 - name = "unicode-normalization" 2360 - version = "0.1.23" 2726 + name = "unicode-linebreak" 2727 + version = "0.1.5" 2361 2728 source = "registry+https://github.com/rust-lang/crates.io-index" 2362 - checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" 2363 - dependencies = [ 2364 - "tinyvec", 2365 - ] 2729 + checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" 2366 2730 2367 2731 [[package]] 2368 2732 name = "unicode-width" ··· 2378 2742 2379 2743 [[package]] 2380 2744 name = "url" 2381 - version = "2.5.0" 2745 + version = "2.5.1" 2382 2746 source = "registry+https://github.com/rust-lang/crates.io-index" 2383 - checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" 2747 + checksum = "f7c25da092f0a868cdf09e8674cd3b7ef3a7d92a24253e663a2fb85e2496de56" 2384 2748 dependencies = [ 2385 2749 "form_urlencoded", 2386 2750 "idna", ··· 2393 2757 version = "0.7.6" 2394 2758 source = "registry+https://github.com/rust-lang/crates.io-index" 2395 2759 checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" 2760 + 2761 + [[package]] 2762 + name = "utf16_iter" 2763 + version = "1.0.5" 2764 + source = "registry+https://github.com/rust-lang/crates.io-index" 2765 + checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" 2766 + 2767 + [[package]] 2768 + name = "utf8_iter" 2769 + version = "1.0.4" 2770 + source = "registry+https://github.com/rust-lang/crates.io-index" 2771 + checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 2772 + 2773 + [[package]] 2774 + name = "utf8parse" 2775 + version = "0.2.2" 2776 + source = "registry+https://github.com/rust-lang/crates.io-index" 2777 + checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 2396 2778 2397 2779 [[package]] 2398 2780 name = "uwl" ··· 2759 3141 ] 2760 3142 2761 3143 [[package]] 3144 + name = "write16" 3145 + version = "1.0.0" 3146 + source = "registry+https://github.com/rust-lang/crates.io-index" 3147 + checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" 3148 + 3149 + [[package]] 3150 + name = "writeable" 3151 + version = "0.5.5" 3152 + source = "registry+https://github.com/rust-lang/crates.io-index" 3153 + checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" 3154 + 3155 + [[package]] 3156 + name = "yoke" 3157 + version = "0.7.4" 3158 + source = "registry+https://github.com/rust-lang/crates.io-index" 3159 + checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" 3160 + dependencies = [ 3161 + "serde", 3162 + "stable_deref_trait", 3163 + "yoke-derive", 3164 + "zerofrom", 3165 + ] 3166 + 3167 + [[package]] 3168 + name = "yoke-derive" 3169 + version = "0.7.4" 3170 + source = "registry+https://github.com/rust-lang/crates.io-index" 3171 + checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" 3172 + dependencies = [ 3173 + "proc-macro2", 3174 + "quote", 3175 + "syn 2.0.66", 3176 + "synstructure", 3177 + ] 3178 + 3179 + [[package]] 3180 + name = "zerofrom" 3181 + version = "0.1.4" 3182 + source = "registry+https://github.com/rust-lang/crates.io-index" 3183 + checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" 3184 + dependencies = [ 3185 + "zerofrom-derive", 3186 + ] 3187 + 3188 + [[package]] 3189 + name = "zerofrom-derive" 3190 + version = "0.1.4" 3191 + source = "registry+https://github.com/rust-lang/crates.io-index" 3192 + checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" 3193 + dependencies = [ 3194 + "proc-macro2", 3195 + "quote", 3196 + "syn 2.0.66", 3197 + "synstructure", 3198 + ] 3199 + 3200 + [[package]] 2762 3201 name = "zeroize" 2763 3202 version = "1.8.1" 2764 3203 source = "registry+https://github.com/rust-lang/crates.io-index" 2765 3204 checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" 3205 + 3206 + [[package]] 3207 + name = "zerovec" 3208 + version = "0.10.2" 3209 + source = "registry+https://github.com/rust-lang/crates.io-index" 3210 + checksum = "bb2cc8827d6c0994478a15c53f374f46fbd41bea663d809b14744bc42e6b109c" 3211 + dependencies = [ 3212 + "yoke", 3213 + "zerofrom", 3214 + "zerovec-derive", 3215 + ] 3216 + 3217 + [[package]] 3218 + name = "zerovec-derive" 3219 + version = "0.10.2" 3220 + source = "registry+https://github.com/rust-lang/crates.io-index" 3221 + checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7" 3222 + dependencies = [ 3223 + "proc-macro2", 3224 + "quote", 3225 + "syn 2.0.66", 3226 + ]
+1
Cargo.toml
··· 15 15 color-eyre = "0.6.3" 16 16 dotenv = "0.15.0" 17 17 humantime = "2.1.0" 18 + kittysay = "0.8.0" 18 19 poise = "0.6.1" 19 20 rand = "0.8.5" 20 21 regex = "1.10.5"
+1 -10
default.nix
··· 5 5 openssl, 6 6 darwin, 7 7 pkg-config, 8 - kittysay, 9 - makeWrapper, 10 8 rev ? "dirty", 11 9 }: 12 10 let ··· 30 28 cargoLock.lockFile = ./Cargo.lock; 31 29 32 30 buildInputs = 33 - [ 34 - openssl 35 - makeWrapper 36 - ] 31 + [ openssl ] 37 32 ++ lib.optionals stdenv.isDarwin ( 38 33 with darwin.apple_sdk.frameworks; 39 34 [ ··· 48 43 env = { 49 44 BUILD_REV = rev; 50 45 }; 51 - 52 - postInstall = '' 53 - wrapProgram "$out/bin/blahaj" --prefix PATH : "${lib.makeBinPath [ kittysay ]}" 54 - ''; 55 46 56 47 meta = { 57 48 inherit (p) description homepage;
-4
shell.nix
··· 1 1 { 2 2 clippy, 3 3 rustfmt, 4 - kittysay, 5 4 cargo-shear, 6 5 callPackage, 7 6 rust-analyzer, ··· 16 15 rustfmt 17 16 rust-analyzer 18 17 cargo-shear 19 - 20 - # runtime things for testing 21 - kittysay 22 18 ] ++ (oa.nativeBuildInputs or [ ]); 23 19 })
+12 -11
src/commands/fun/kittysay.rs
··· 1 1 use color_eyre::eyre::Result; 2 - use regex::Regex; 3 - use std::process::Command; 2 + use kittysay::{print, FormatOptions}; 4 3 5 4 use crate::Context; 6 5 7 6 /// Make the kitty say something :3 8 7 #[poise::command(slash_command, guild_only)] 9 - pub async fn kittysay(ctx: Context<'_>, #[description = "speak"] input: String) -> Result<()> { 10 - let re = Regex::new(r"[^:a-zA-Z0-9\s]").unwrap(); 11 - let sanitized_input = re.replace_all(&input, "").to_string(); 8 + pub async fn kittysay( 9 + ctx: Context<'_>, 10 + #[description = "say"] input: String, 11 + #[description = "think"] think: Option<bool>, 12 + ) -> Result<()> { 13 + let opts = FormatOptions { 14 + think: think.unwrap_or(false), 15 + width: 45, 16 + }; 12 17 13 - let output = Command::new("kittysay") 14 - .arg(&sanitized_input) 15 - .output() 16 - .expect("Failed to execute kittysay"); 18 + let output = print(&input, &opts); 17 19 18 - ctx.say(format!("```{}```", String::from_utf8_lossy(&output.stdout))) 19 - .await?; 20 + ctx.say(format!("```{output}```")).await?; 20 21 Ok(()) 21 22 }