From 5528177e527b1f4cc183b28eb4483201b74291e1 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 5 Jan 2021 05:04:26 +0300 Subject: [PATCH] Some /code staff --- .gitignore | 1 + Cargo.lock | 3178 --------------------------------- Cargo.toml | 74 +- assets/README.md | 6 +- assets/sync_from_bat.py | 42 +- assets/syntaxes/.gitignore | 6 +- assets/themes/.gitignore | 8 +- assets/themes/Dracula.tmTheme | 1880 +++++++++---------- src/commands.rs | 1154 ++++++------ src/handlers.rs | 368 ++-- 10 files changed, 1770 insertions(+), 4947 deletions(-) delete mode 100644 Cargo.lock diff --git a/.gitignore b/.gitignore index 5688ef8..8507133 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ memory.sqlite3 /video /voice /.idea +Cargo.lock \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index a6fe17e..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,3178 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "ab_glyph_rasterizer" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9fe5e32de01730eb1f6b7f5b51c17e03e2325bf40a74f754f04f130043affff" - -[[package]] -name = "adler" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" - -[[package]] -name = "adler32" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" - -[[package]] -name = "ahash" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" - -[[package]] -name = "aho-corasick" -version = "0.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" -dependencies = [ - "memchr", -] - -[[package]] -name = "ansi_term" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "anyhow" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee67c11feeac938fae061b232e38e0b6d94f97a9df10e6271319325ac4c56a86" - -[[package]] -name = "arrayref" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - -[[package]] -name = "async-trait" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" - -[[package]] -name = "autocfg" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" - -[[package]] -name = "base64" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" -dependencies = [ - "byteorder", -] - -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - -[[package]] -name = "bincode" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d" -dependencies = [ - "byteorder", - "serde", -] - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" - -[[package]] -name = "blake2b_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" -dependencies = [ - "arrayref", - "arrayvec", - "constant_time_eq", -] - -[[package]] -name = "block" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" - -[[package]] -name = "bumpalo" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" - -[[package]] -name = "bytemuck" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41aa2ec95ca3b5c54cf73c91acf06d24f4495d5f1b1c12506ae3483d646177ac" - -[[package]] -name = "byteorder" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" - -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - -[[package]] -name = "cc" -version = "1.0.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "clap" -version = "2.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" -dependencies = [ - "ansi_term", - "atty", - "bitflags", - "strsim", - "term_size", - "textwrap", - "unicode-width", - "vec_map", -] - -[[package]] -name = "clipboard" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a904646c0340239dcf7c51677b33928bf24fdf424b79a57909c0109075b2e7" -dependencies = [ - "clipboard-win 2.2.0", - "objc", - "objc-foundation", - "objc_id", - "x11-clipboard", -] - -[[package]] -name = "clipboard-win" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a093d6fed558e5fe24c3dfc85a68bb68f1c824f440d3ba5aca189e2998786b" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "clipboard-win" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5123c6b97286809fea9e38d2c9bf530edbcb9fc0d8f8272c28b0c95f067fa92d" -dependencies = [ - "error-code", - "str-buf", - "winapi 0.3.9", -] - -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - -[[package]] -name = "cmake" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb6210b637171dfba4cda12e579ac6dc73f5165ad56133e5d72ef3131f320855" -dependencies = [ - "cc", -] - -[[package]] -name = "cocoa" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832" -dependencies = [ - "bitflags", - "block", - "cocoa-foundation", - "core-foundation 0.9.1", - "core-graphics", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" -dependencies = [ - "bitflags", - "block", - "core-foundation 0.9.1", - "core-graphics-types", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - -[[package]] -name = "const_fn" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd51eab21ab4fd6a3bf889e2d0958c0a6e3a61ad04260325e919e652a2a62826" - -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - -[[package]] -name = "conv" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ff10625fd0ac447827aa30ea8b861fead473bb60aeb73af6c1c58caf0d1299" -dependencies = [ - "custom_derive", -] - -[[package]] -name = "core-foundation" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" -dependencies = [ - "core-foundation-sys 0.6.2", - "libc", -] - -[[package]] -name = "core-foundation" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" -dependencies = [ - "core-foundation-sys 0.8.2", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" - -[[package]] -name = "core-foundation-sys" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" - -[[package]] -name = "core-graphics" -version = "0.22.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "269f35f69b542b80e736a20a89a05215c0ce80c2c03c514abb2e318b78379d86" -dependencies = [ - "bitflags", - "core-foundation 0.9.1", - "core-graphics-types", - "foreign-types", - "libc", -] - -[[package]] -name = "core-graphics-types" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" -dependencies = [ - "bitflags", - "core-foundation 0.9.1", - "foreign-types", - "libc", -] - -[[package]] -name = "core-text" -version = "19.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c7f46e8b820fd5f4b28528104b28b0a91cbe9e9c5bde8017087fb44bc93a60" -dependencies = [ - "core-foundation 0.9.1", - "core-graphics", - "foreign-types", - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d" -dependencies = [ - "cfg-if 1.0.0", - "const_fn", - "crossbeam-utils", - "lazy_static", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" -dependencies = [ - "autocfg 1.0.1", - "cfg-if 1.0.0", - "lazy_static", -] - -[[package]] -name = "ct-logs" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" -dependencies = [ - "sct", -] - -[[package]] -name = "custom_derive" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9" - -[[package]] -name = "deflate" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174" -dependencies = [ - "adler32", - "byteorder", -] - -[[package]] -name = "desubot" -version = "0.1.0" -dependencies = [ - "async-trait", - "bytes", - "env_logger 0.7.1", - "futures", - "html-escape", - "hyper", - "hyper-rustls", - "hyper-tls", - "log 0.4.11", - "markov", - "multipart", - "mystem", - "rand 0.7.3", - "regex", - "reqwest", - "rusqlite", - "serde_json", - "sha1", - "silicon", - "sqlparser", - "subprocess", - "telegram-bot", - "tokio", - "tracing", - "tracing-futures", - "uuid", -] - -[[package]] -name = "dirs" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" -dependencies = [ - "cfg-if 0.1.10", - "dirs-sys", -] - -[[package]] -name = "dirs" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142995ed02755914747cc6ca76fc7e4583cd18578746716d0508ea6ed558b9ff" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a" -dependencies = [ - "libc", - "redox_users", - "winapi 0.3.9", -] - -[[package]] -name = "dtoa" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d7ed2934d741c6b37e33e3832298e8850b53fd2d2bea03873375596c7cea4e" - -[[package]] -name = "dwrote" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" -dependencies = [ - "lazy_static", - "libc", - "winapi 0.3.9", - "wio", -] - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "encoding_rs" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801bbab217d7f79c0062f4f7205b5d4427c6d1a7bd7aafdd1475f7c59d62b283" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "env_logger" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -dependencies = [ - "atty", - "humantime 1.3.0", - "log 0.4.11", - "regex", - "termcolor", -] - -[[package]] -name = "env_logger" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26ecb66b4bdca6c1409b40fb255eefc2bd4f6d135dab3c3124f80ffa2a9661e" -dependencies = [ - "atty", - "humantime 2.0.1", - "log 0.4.11", - "termcolor", -] - -[[package]] -name = "error-code" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49c94f66f2d2c5ee8685039e458b4e6c9f13af7c28736baf10ce42966a5ab52" -dependencies = [ - "libc", - "str-buf", -] - -[[package]] -name = "expat-sys" -version = "2.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" -dependencies = [ - "cmake", - "pkg-config", -] - -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - -[[package]] -name = "fallible-streaming-iterator" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" - -[[package]] -name = "fixedbitset" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" - -[[package]] -name = "flate2" -version = "1.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7411863d55df97a419aa64cb4d2f167103ea9d767e2c54a1868b7ac3f6b47129" -dependencies = [ - "cfg-if 1.0.0", - "crc32fast", - "libc", - "miniz_oxide 0.4.3", -] - -[[package]] -name = "float-ord" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bad48618fdb549078c333a7a8528acb57af271d0433bdecd523eb620628364e" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "font-kit" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f9042cb45150fb2b2a012fc03d0f1d2071f18e90397b9d2a5ec8ade8464bf20" -dependencies = [ - "bitflags", - "byteorder", - "core-foundation 0.9.1", - "core-graphics", - "core-text", - "dirs 2.0.2", - "dwrote", - "float-ord", - "freetype", - "lazy_static", - "libc", - "log 0.4.11", - "pathfinder_geometry", - "pathfinder_simd", - "servo-fontconfig", - "walkdir", - "winapi 0.3.9", -] - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" -dependencies = [ - "matches", - "percent-encoding", -] - -[[package]] -name = "freetype" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee38378a9e3db1cc693b4f88d166ae375338a0ff75cb8263e1c601d51f35dc6" -dependencies = [ - "freetype-sys", - "libc", -] - -[[package]] -name = "freetype-sys" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" -dependencies = [ - "cmake", - "libc", - "pkg-config", -] - -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - -[[package]] -name = "futures" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748" - -[[package]] -name = "futures-executor" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caa2b2b68b880003057c1dd49f1ed937e38f22fcf6c212188a121f08cf40a65" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb" - -[[package]] -name = "futures-macro" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d" - -[[package]] -name = "futures-task" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d" -dependencies = [ - "once_cell", -] - -[[package]] -name = "futures-util" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project 1.0.2", - "pin-utils", - "proc-macro-hack", - "proc-macro-nested", - "slab", -] - -[[package]] -name = "getopts" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi", -] - -[[package]] -name = "h2" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", - "tracing-futures", -] - -[[package]] -name = "hashbrown" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" -dependencies = [ - "autocfg 1.0.1", -] - -[[package]] -name = "hashbrown" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashlink" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d99cf782f0dc4372d26846bec3de7804ceb5df083c2d4462c0b8d2330e894fa8" -dependencies = [ - "hashbrown 0.9.1", -] - -[[package]] -name = "heck" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hermit-abi" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" -dependencies = [ - "libc", -] - -[[package]] -name = "html-escape" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d348900ce941b7474395ba922ed3735a517df4546a2939ddb416ce85eeaa988e" -dependencies = [ - "utf8-width", -] - -[[package]] -name = "http" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84129d298a6d57d246960ff8eb831ca4af3f96d29e2e28848dae275408658e26" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "httparse" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" - -[[package]] -name = "httpdate" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" - -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", -] - -[[package]] -name = "humantime" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7a" - -[[package]] -name = "hyper" -version = "0.13.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ad767baac13b44d4529fcf58ba2cd0995e36e7b435bc5b039de6f47e880dbf" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project 1.0.2", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ea6215c7314d450ee45970ab8b3851ab447a0e6bafdd19e31b20a42dbb7faf" -dependencies = [ - "bytes", - "ct-logs", - "futures-util", - "hyper", - "rustls", - "rustls-native-certs", - "tokio", - "tokio-rustls", - "webpki", -] - -[[package]] -name = "hyper-tls" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-tls", -] - -[[package]] -name = "idna" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "image" -version = "0.23.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ce04077ead78e39ae8610ad26216aed811996b043d47beed5090db674f9e9b5" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "jpeg-decoder", - "num-iter", - "num-rational", - "num-traits", - "png", -] - -[[package]] -name = "imageproc" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7923654f3ce7cb6849d5dc9e544aaeab49c508a90b56c721b046e7234c74ab53" -dependencies = [ - "conv", - "image", - "itertools", - "num 0.3.1", - "rand 0.7.3", - "rand_distr", - "rayon", - "rulinalg", - "rusttype", -] - -[[package]] -name = "indexmap" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e47a3566dd4fd4eec714ae6ceabdee0caec795be835c223d92c2d40f1e8cf1c" -dependencies = [ - "autocfg 1.0.1", - "hashbrown 0.8.2", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - -[[package]] -name = "ipnet" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" - -[[package]] -name = "itertools" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" - -[[package]] -name = "jpeg-decoder" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc797adac5f083b8ff0ca6f6294a999393d76e197c36488e2ef732c4715f6fa3" -dependencies = [ - "byteorder", - "rayon", -] - -[[package]] -name = "js-sys" -version = "0.3.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d7383929f7c9c7c2d0fa596f325832df98c3704f2c60553080f7127a58175" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "libc" -version = "0.2.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb" - -[[package]] -name = "libsqlite3-sys" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d31059f22935e6c31830db5249ba2b7ecd54fd73a9909286f0a67aa55c2fbd" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "line-wrap" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" -dependencies = [ - "safemem", -] - -[[package]] -name = "linked-hash-map" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" - -[[package]] -name = "log" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -dependencies = [ - "log 0.4.11", -] - -[[package]] -name = "log" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" -dependencies = [ - "cfg-if 0.1.10", -] - -[[package]] -name = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", -] - -[[package]] -name = "markov" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6ad68e26d51a9558f65e93b9795c9422630d0932717a3235668bb9ab71e3fd" -dependencies = [ - "getopts", - "itertools", - "petgraph", - "rand 0.7.3", - "serde", - "serde_derive", - "serde_yaml", -] - -[[package]] -name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" - -[[package]] -name = "matrixmultiply" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcad67dcec2d58ff56f6292582377e6921afdf3bfbd533e26fb8900ae575e002" -dependencies = [ - "rawpointer", -] - -[[package]] -name = "memchr" -version = "2.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" - -[[package]] -name = "memoffset" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" -dependencies = [ - "autocfg 1.0.1", -] - -[[package]] -name = "mime" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" -dependencies = [ - "log 0.3.9", -] - -[[package]] -name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - -[[package]] -name = "mime_guess" -version = "1.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216929a5ee4dd316b1702eedf5e74548c123d370f47841ceaac38ca154690ca3" -dependencies = [ - "mime 0.2.6", - "phf", - "phf_codegen", - "unicase 1.4.2", -] - -[[package]] -name = "mime_guess" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" -dependencies = [ - "mime 0.3.16", - "unicase 2.6.0", -] - -[[package]] -name = "miniz_oxide" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" -dependencies = [ - "adler32", -] - -[[package]] -name = "miniz_oxide" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" -dependencies = [ - "adler", - "autocfg 1.0.1", -] - -[[package]] -name = "mio" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" -dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log 0.4.11", - "miow 0.2.2", - "net2", - "slab", - "winapi 0.2.8", -] - -[[package]] -name = "mio-named-pipes" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" -dependencies = [ - "log 0.4.11", - "mio", - "miow 0.3.6", - "winapi 0.3.9", -] - -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio", -] - -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - -[[package]] -name = "miow" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" -dependencies = [ - "socket2", - "winapi 0.3.9", -] - -[[package]] -name = "multipart" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136eed74cadb9edd2651ffba732b19a450316b680e4f48d6c79e905799e19d01" -dependencies = [ - "log 0.4.11", - "mime 0.2.6", - "mime_guess 1.8.8", - "rand 0.6.5", - "tempfile", -] - -[[package]] -name = "mystem" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac69b16b860268fce77cd499251a1149c0d4d2295638cf557a4102857c3815f" -dependencies = [ - "log 0.4.11", - "serde_json", - "subprocess", -] - -[[package]] -name = "native-tls" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4" -dependencies = [ - "lazy_static", - "libc", - "log 0.4.11", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework 2.0.0", - "security-framework-sys 2.0.0", - "tempfile", -] - -[[package]] -name = "net2" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "num" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" -dependencies = [ - "num-integer", - "num-iter", - "num-traits", -] - -[[package]] -name = "num" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b7a8e9be5e039e2ff869df49155f1c06bd01ade2117ec783e56ab0932b67a8f" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a41747ae4633fce5adffb4d2e81ffc5e89593cb19917f8fb2cc5ff76507bf" -dependencies = [ - "autocfg 1.0.1", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg 1.0.1", - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" -dependencies = [ - "autocfg 1.0.1", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" -dependencies = [ - "autocfg 1.0.1", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg 1.0.1", -] - -[[package]] -name = "num_cpus" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "objc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" -dependencies = [ - "malloc_buf", -] - -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -dependencies = [ - "block", - "objc", - "objc_id", -] - -[[package]] -name = "objc_id" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" -dependencies = [ - "objc", -] - -[[package]] -name = "once_cell" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" - -[[package]] -name = "onig" -version = "6.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b46fd9edbc018f0be4e366c24c46db44fac49cd01c039ae85308088b089dd5" -dependencies = [ - "bitflags", - "lazy_static", - "libc", - "onig_sys", -] - -[[package]] -name = "onig_sys" -version = "69.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed063c96cf4c0f2e5d09324409d158b38a0a85a7b90fbd68c8cad75c495d5775" -dependencies = [ - "cc", - "pkg-config", -] - -[[package]] -name = "openssl" -version = "0.10.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038d43985d1ddca7a9900630d8cd031b56e4794eecc2e9ea39dd17aa04399a70" -dependencies = [ - "bitflags", - "cfg-if 1.0.0", - "foreign-types", - "lazy_static", - "libc", - "openssl-sys", -] - -[[package]] -name = "openssl-probe" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" - -[[package]] -name = "openssl-sys" -version = "0.9.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921fc71883267538946025deffb622905ecad223c28efbfdef9bb59a0175f3e6" -dependencies = [ - "autocfg 1.0.1", - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "ordered-float" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" -dependencies = [ - "num-traits", -] - -[[package]] -name = "os_info" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2127a5da3c69035537febc04cd07008bb643653303b213a49b036d944531207" -dependencies = [ - "log 0.4.11", - "serde", - "winapi 0.3.9", -] - -[[package]] -name = "owned_ttf_parser" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f923fb806c46266c02ab4a5b239735c144bdeda724a50ed058e5226f594cde3" -dependencies = [ - "ttf-parser", -] - -[[package]] -name = "pasteboard" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a083d2a38c2dfd0b8669c28cec853dc5bbbf310f0886ff0a9cffe97e5e47b1a2" -dependencies = [ - "cocoa", - "objc", - "os_info", - "structopt", -] - -[[package]] -name = "pathfinder_geometry" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b7e7b4ea703700ce73ebf128e1450eb69c3a8329199ffbfb9b2a0418e5ad3" -dependencies = [ - "log 0.4.11", - "pathfinder_simd", -] - -[[package]] -name = "pathfinder_simd" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b451513912d6b3440e443aa75a73ab22203afedc4a90df8526d008c0f86f7cb3" -dependencies = [ - "rustc_version", -] - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "petgraph" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" -dependencies = [ - "fixedbitset", - "indexmap", -] - -[[package]] -name = "phf" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_codegen" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" -dependencies = [ - "phf_generator", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" -dependencies = [ - "phf_shared", - "rand 0.6.5", -] - -[[package]] -name = "phf_shared" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" -dependencies = [ - "siphasher", - "unicase 1.4.2", -] - -[[package]] -name = "pin-project" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" -dependencies = [ - "pin-project-internal 0.4.27", -] - -[[package]] -name = "pin-project" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccc2237c2c489783abd8c4c80e5450fc0e98644555b1364da68cc29aa151ca7" -dependencies = [ - "pin-project-internal 1.0.2", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-lite" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" - -[[package]] -name = "pin-project-lite" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" - -[[package]] -name = "plist" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dc57ccf442c7414b790e8e7b72fb4d776a66c7680129360946d9aaa6f5311e9" -dependencies = [ - "base64 0.13.0", - "chrono", - "indexmap", - "line-wrap", - "serde", - "xml-rs", -] - -[[package]] -name = "png" -version = "0.16.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" -dependencies = [ - "bitflags", - "crc32fast", - "deflate", - "miniz_oxide 0.3.7", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check 0.9.2", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check 0.9.2", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" - -[[package]] -name = "proc-macro2" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.7", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc 0.1.0", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg", - "rand_xorshift", - "winapi 0.3.9", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", -] - -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.3.1", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_distr" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96977acbdd3a6576fb1d27391900035bf3863d4a16422973a409b488cf29ffb2" -dependencies = [ - "rand 0.7.3", -] - -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi 0.3.9", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi 0.3.9", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.4.2", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rawpointer" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebac11a9d2e11f2af219b8b8d833b76b1ea0e054aa0e8d8e9e4cbde353bdf019" - -[[package]] -name = "rayon" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" -dependencies = [ - "autocfg 1.0.1", - "crossbeam-deque", - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "lazy_static", - "num_cpus", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - -[[package]] -name = "redox_users" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" -dependencies = [ - "getrandom", - "redox_syscall", - "rust-argon2", -] - -[[package]] -name = "regex" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", - "thread_local", -] - -[[package]] -name = "regex-syntax" -version = "0.6.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "reqwest" -version = "0.10.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c" -dependencies = [ - "base64 0.13.0", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "lazy_static", - "log 0.4.11", - "mime 0.3.16", - "mime_guess 2.0.3", - "native-tls", - "percent-encoding", - "pin-project-lite 0.2.0", - "serde", - "serde_urlencoded", - "tokio", - "tokio-tls", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - -[[package]] -name = "ring" -version = "0.16.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "024a1e66fea74c66c66624ee5622a7ff0e4b73a13b4f5c326ddb50c708944226" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin", - "untrusted", - "web-sys", - "winapi 0.3.9", -] - -[[package]] -name = "rulinalg" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04ada202c9685e1d72a7420c578e92b358dbf807d3dfabb676a3dab9cc3bb12f" -dependencies = [ - "matrixmultiply", - "num 0.1.42", -] - -[[package]] -name = "rusqlite" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38ee71cbab2c827ec0ac24e76f82eca723cee92c509a65f67dee393c25112" -dependencies = [ - "bitflags", - "fallible-iterator", - "fallible-streaming-iterator", - "hashlink", - "libsqlite3-sys", - "memchr", - "smallvec", -] - -[[package]] -name = "rust-argon2" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" -dependencies = [ - "base64 0.13.0", - "blake2b_simd", - "constant_time_eq", - "crossbeam-utils", -] - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] - -[[package]] -name = "rustls" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" -dependencies = [ - "base64 0.10.1", - "log 0.4.11", - "ring", - "sct", - "webpki", -] - -[[package]] -name = "rustls-native-certs" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ffebdbb48c14f84eba0b715197d673aff1dd22cc1007ca647e28483bbcc307" -dependencies = [ - "openssl-probe", - "rustls", - "schannel", - "security-framework 0.3.4", -] - -[[package]] -name = "rusttype" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc7c727aded0be18c5b80c1640eae0ac8e396abf6fa8477d96cb37d18ee5ec59" -dependencies = [ - "ab_glyph_rasterizer", - "owned_ttf_parser", -] - -[[package]] -name = "ryu" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" - -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" -dependencies = [ - "lazy_static", - "winapi 0.3.9", -] - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sct" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "security-framework" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" -dependencies = [ - "core-foundation 0.6.4", - "core-foundation-sys 0.6.2", - "libc", - "security-framework-sys 0.3.3", -] - -[[package]] -name = "security-framework" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" -dependencies = [ - "bitflags", - "core-foundation 0.9.1", - "core-foundation-sys 0.8.2", - "libc", - "security-framework-sys 2.0.0", -] - -[[package]] -name = "security-framework-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" -dependencies = [ - "core-foundation-sys 0.6.2", -] - -[[package]] -name = "security-framework-sys" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b" -dependencies = [ - "core-foundation-sys 0.8.2", - "libc", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "serde" -version = "1.0.118" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-value" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a663f873dedc4eac1a559d4c6bc0d0b2c34dc5ac4702e105014b8281489e44f" -dependencies = [ - "ordered-float", - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.118" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7baae0a99f1a324984bcdc5f0718384c1f69775f1c7eec8b859b71b443e3fd7" -dependencies = [ - "dtoa", - "linked-hash-map", - "serde", - "yaml-rust", -] - -[[package]] -name = "servo-fontconfig" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" -dependencies = [ - "libc", - "servo-fontconfig-sys", -] - -[[package]] -name = "servo-fontconfig-sys" -version = "5.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" -dependencies = [ - "expat-sys", - "freetype-sys", - "pkg-config", -] - -[[package]] -name = "sha1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" - -[[package]] -name = "signal-hook-registry" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" -dependencies = [ - "libc", -] - -[[package]] -name = "silicon" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae8edb8c29943ab67d141185aa9051251654476a28a06a3954fa21af6bb6df8" -dependencies = [ - "anyhow", - "clipboard", - "clipboard-win 4.0.3", - "conv", - "dirs 3.0.1", - "env_logger 0.8.2", - "font-kit", - "image", - "imageproc", - "log 0.4.11", - "pasteboard", - "pathfinder_geometry", - "structopt", - "syntect", - "tempfile", -] - -[[package]] -name = "siphasher" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" - -[[package]] -name = "slab" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" - -[[package]] -name = "smallvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a55ca5f3b68e41c979bf8c46a6f1da892ca4db8f94023ce0bd32407573b1ac0" - -[[package]] -name = "socket2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "sqlparser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a3da41f3ddf62cbf92635ace62dd037fad9a91c6871c514fbd404e2059f27d" -dependencies = [ - "log 0.4.11", -] - -[[package]] -name = "str-buf" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d44a3643b4ff9caf57abcee9c2c621d6c03d9135e0d8b589bd9afb5992cb176a" - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "structopt" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5277acd7ee46e63e5168a80734c9f6ee81b1367a7d8772a2d765df2a3705d28c" -dependencies = [ - "clap", - "lazy_static", - "structopt-derive", -] - -[[package]] -name = "structopt-derive" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba9cdfda491b814720b6b06e0cac513d922fc407582032e8706e9f137976f90" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "subprocess" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b9ad6c3e1b525a55872a4d2f2d404b3c959b7bbcbfd83c364580f68ed157bd" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "syn" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4211ce9909eb971f111059df92c45640aad50a619cf55cd76476be803c4c68e6" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "syntect" -version = "4.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bfac2b23b4d049dc9a89353b4e06bbc85a8f42020cccbe5409a115cf19031e5" -dependencies = [ - "bincode", - "bitflags", - "flate2", - "fnv", - "lazy_static", - "lazycell", - "onig", - "plist", - "regex-syntax", - "serde", - "serde_derive", - "serde_json", - "walkdir", -] - -[[package]] -name = "telegram-bot" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc9552e972bcb551705fcad45bd0b86eca12a22379db36cdfa6d053e1a19b2de" -dependencies = [ - "bytes", - "futures", - "hyper", - "hyper-tls", - "multipart", - "telegram-bot-raw", - "tokio", - "tracing", - "tracing-futures", -] - -[[package]] -name = "telegram-bot-raw" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4fc120e2b85d639fc932a4aa7c1b6a5f1189fb86948d7a02037d1d8f1ef559" -dependencies = [ - "bytes", - "serde", - "serde-value", - "serde_derive", - "serde_json", -] - -[[package]] -name = "tempfile" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "rand 0.7.3", - "redox_syscall", - "remove_dir_all", - "winapi 0.3.9", -] - -[[package]] -name = "term_size" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4129646ca0ed8f45d09b929036bafad5377103edd06e50bf574b353d2b08d9" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "termcolor" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "term_size", - "unicode-width", -] - -[[package]] -name = "thread_local" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "tinyvec" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" - -[[package]] -name = "tokio" -version = "0.2.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099837d3464c16a808060bb3f02263b412f6fafcb5d01c533d309985fbeebe48" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "iovec", - "lazy_static", - "libc", - "memchr", - "mio", - "mio-named-pipes", - "mio-uds", - "num_cpus", - "pin-project-lite 0.1.11", - "signal-hook-registry", - "slab", - "tokio-macros", - "winapi 0.3.9", -] - -[[package]] -name = "tokio-macros" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-rustls" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3068d891551949b37681724d6b73666787cc63fa8e255c812a41d2513aff9775" -dependencies = [ - "futures-core", - "rustls", - "tokio", - "webpki", -] - -[[package]] -name = "tokio-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log 0.4.11", - "pin-project-lite 0.1.11", - "tokio", -] - -[[package]] -name = "tower-service" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" - -[[package]] -name = "tracing" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" -dependencies = [ - "cfg-if 1.0.0", - "log 0.4.11", - "pin-project-lite 0.2.0", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "tracing-futures" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" -dependencies = [ - "pin-project 0.4.27", - "tracing", -] - -[[package]] -name = "try-lock" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" - -[[package]] -name = "ttf-parser" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5d7cd7ab3e47dda6e56542f4bbf3824c15234958c6e1bd6aaa347e93499fdc" - -[[package]] -name = "unicase" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -dependencies = [ - "version_check 0.1.5", -] - -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check 0.9.2", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -dependencies = [ - "matches", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" - -[[package]] -name = "unicode-width" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" - -[[package]] -name = "unicode-xid" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "url" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" -dependencies = [ - "form_urlencoded", - "idna", - "matches", - "percent-encoding", -] - -[[package]] -name = "utf8-width" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9071ac216321a4470a69fb2b28cfc68dcd1a39acd877c8be8e014df6772d8efa" - -[[package]] -name = "uuid" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11" -dependencies = [ - "rand 0.7.3", -] - -[[package]] -name = "vcpkg" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" - -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" - -[[package]] -name = "version_check" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" - -[[package]] -name = "walkdir" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" -dependencies = [ - "same-file", - "winapi 0.3.9", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log 0.4.11", - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasm-bindgen" -version = "0.2.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd364751395ca0f68cafb17666eee36b63077fb5ecd972bbcd74c90c4bf736e" -dependencies = [ - "cfg-if 1.0.0", - "serde", - "serde_json", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1114f89ab1f4106e5b55e688b828c0ab0ea593a1ea7c094b141b14cbaaec2d62" -dependencies = [ - "bumpalo", - "lazy_static", - "log 0.4.11", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fe9756085a84584ee9457a002b7cdfe0bfff169f45d2591d8be1345a6780e35" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6ac8995ead1f084a8dea1e65f194d0973800c7f571f6edd70adf06ecf77084" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a48c72f299d80557c7c62e37e7225369ecc0c963964059509fbafe917c7549" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e7811dd7f9398f14cc76efd356f98f03aa30419dea46aa810d71e819fc97158" - -[[package]] -name = "web-sys" -version = "0.3.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222b1ef9334f92a21d3fb53dc3fd80f30836959a90f9274a626d7e06315ba3c3" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "winreg" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "wio" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "x11-clipboard" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89bd49c06c9eb5d98e6ba6536cf64ac9f7ee3a009b2f53996d405b3944f6bcea" -dependencies = [ - "xcb", -] - -[[package]] -name = "xcb" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e917a3f24142e9ff8be2414e36c649d47d6cc2ba81f16201cdef96e533e02de" -dependencies = [ - "libc", - "log 0.4.11", -] - -[[package]] -name = "xml-rs" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a" - -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] diff --git a/Cargo.toml b/Cargo.toml index cf5a556..61ff8b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,38 +1,38 @@ -[package] -name = "desubot" -version = "0.1.0" -authors = ["AB "] -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -bytes = "0.5" -tokio = { version = "0.2", features = ["full"]} - -tracing = "0.1.9" -tracing-futures = "0.2" -multipart = { version = "0.16", default-features = false, features = ["client"] } - -telegram-bot = "0.8.0" -silicon = "0.4.0" -hyper = "0.13" -hyper-tls = { version = "0.4", optional = true } -futures = "0.3" -hyper-rustls = { version = "0.19", optional = true } - -rusqlite = { version = "0.24.2", features = ["bundled"]} -html-escape = "0.2" -regex = "1" -reqwest = "0.10.9" -uuid = { version = "0.8", features = ["v4"] } -sha1 = "*" -env_logger = "0.7" -log = { version = "^0.4.5", features = ["std"] } -subprocess = "0.2.6" -serde_json = "1.0" -markov = "1.1.0" -rand = "0.7.3" -mystem = "0.2.1" -async-trait = "0.1.42" +[package] +name = "desubot" +version = "0.1.0" +authors = ["AB "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +bytes = "0.5" +tokio = { version = "0.2", features = ["full"]} + +tracing = "0.1.9" +tracing-futures = "0.2" +multipart = { version = "0.16", default-features = false, features = ["client"] } + +telegram-bot = "0.8.0" +silicon = "0.4.0" +hyper = "0.13" +hyper-tls = { version = "0.4", optional = true } +futures = "0.3" +hyper-rustls = { version = "0.19", optional = true } + +rusqlite = { version = "0.24.2", features = ["bundled"]} +html-escape = "0.2" +regex = "1" +reqwest = "0.10.9" +uuid = { version = "0.8", features = ["v4"] } +sha1 = "*" +env_logger = "0.7" +log = { version = "^0.4.5", features = ["std"] } +subprocess = "0.2.6" +serde_json = "1.0" +markov = "1.1.0" +rand = "0.7.3" +mystem = "0.2.1" +async-trait = "0.1.42" sqlparser = "0.7.0" \ No newline at end of file diff --git a/assets/README.md b/assets/README.md index 339a990..5264b8e 100644 --- a/assets/README.md +++ b/assets/README.md @@ -1,3 +1,3 @@ -# Assets - -Silicon uses [bat](https://github.com/sharkdp/bat/tree/master/assets)'s syntax and theme resources. +# Assets + +Silicon uses [bat](https://github.com/sharkdp/bat/tree/master/assets)'s syntax and theme resources. diff --git a/assets/sync_from_bat.py b/assets/sync_from_bat.py index a0a255b..a42b59b 100644 --- a/assets/sync_from_bat.py +++ b/assets/sync_from_bat.py @@ -1,21 +1,21 @@ -#!/usr/bin/env python -# Sync themes and syntaxes from [bat](https://github.com/sharkdp/bat/tree/master/assets) - -import os -from glob import glob -from shutil import copy - -if not os.path.exists('../../bat'): - os.system('git clone https://github.com/sharkdp/bat ../../bat') -else: - os.system('git -C ../../bat pull') - -for syntax_file in glob('../../bat/assets/syntaxes/**/*.sublime-syntax'): - copy(syntax_file, './syntaxes/') - -for theme_file in glob('../../bat/assets/themes/**/*.tmTheme'): - copy(theme_file, './themes/') - -os.system('bat cache --build --source . --target .') - -print('Finished.') +#!/usr/bin/env python +# Sync themes and syntaxes from [bat](https://github.com/sharkdp/bat/tree/master/assets) + +import os +from glob import glob +from shutil import copy + +if not os.path.exists('../../bat'): + os.system('git clone https://github.com/sharkdp/bat ../../bat') +else: + os.system('git -C ../../bat pull') + +for syntax_file in glob('../../bat/assets/syntaxes/**/*.sublime-syntax'): + copy(syntax_file, './syntaxes/') + +for theme_file in glob('../../bat/assets/themes/**/*.tmTheme'): + copy(theme_file, './themes/') + +os.system('bat cache --build --source . --target .') + +print('Finished.') diff --git a/assets/syntaxes/.gitignore b/assets/syntaxes/.gitignore index 86d0cb2..44c5ea8 100644 --- a/assets/syntaxes/.gitignore +++ b/assets/syntaxes/.gitignore @@ -1,4 +1,4 @@ -# Ignore everything in this directory -* -# Except this file +# Ignore everything in this directory +* +# Except this file !.gitignore \ No newline at end of file diff --git a/assets/themes/.gitignore b/assets/themes/.gitignore index ca84813..a77311e 100644 --- a/assets/themes/.gitignore +++ b/assets/themes/.gitignore @@ -1,5 +1,5 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore +# Ignore everything in this directory +* +# Except this file +!.gitignore !Dracula.tmTheme \ No newline at end of file diff --git a/assets/themes/Dracula.tmTheme b/assets/themes/Dracula.tmTheme index c3434ec..88cc624 100644 --- a/assets/themes/Dracula.tmTheme +++ b/assets/themes/Dracula.tmTheme @@ -1,940 +1,940 @@ - - - - - - - - name - Dracula - settings - - - settings - - background - #282a36 - caret - #f8f8f0 - block_caret - #999a9e - foreground - #f8f8f2 - invisibles - #3B3A32 - lineHighlight - #44475a - selection - #44475a - findHighlight - #effb7b - findHighlightForeground - #000000 - selectionBorder - #222218 - activeGuide - #9D550FB0 - bracketsForeground - #F8F8F2A5 - bracketsOptions - underline - bracketContentsForeground - #F8F8F2A5 - bracketContentsOptions - underline - tagsOptions - stippled_underline - - - - name - Comment - scope - comment - settings - - foreground - #6272a4 - fontStyle - - - - - name - String - scope - string - settings - - foreground - #f1fa8c - - - - name - Number - scope - constant.numeric - settings - - foreground - #bd93f9 - - - - name - Built-in constant - scope - constant.language - settings - - foreground - #bd93f9 - - - - name - User-defined constant - scope - constant.character, constant.other - settings - - foreground - #bd93f9 - - - - name - Variable - scope - variable - settings - - fontStyle - - - - - name - Ruby's @variable - scope - variable.other.readwrite.instance - settings - - fontStyle - - foreground - #ffb86c - - - - name - String interpolation - scope - constant.character.escaped, constant.character.escape, string source, string source.ruby - settings - - fontStyle - - foreground - #ff79c6 - - - - name - Ruby Regexp - scope - source.ruby string.regexp.classic.ruby,source.ruby string.regexp.mod-r.ruby - settings - - fontStyle - - foreground - #ff5555 - - - - name - Keyword - scope - keyword - settings - - foreground - #ff79c6 - - - - name - Storage - scope - storage - settings - - fontStyle - - foreground - #ff79c6 - - - - name - Storage type - scope - storage.type - settings - - fontStyle - italic - foreground - #8be9fd - - - - name - Storage Type Namespace - scope - storage.type.namespace - settings - - fontStyle - italic - foreground - #8be9fd - - - - name - Storage Type Class - scope - storage.type.class - settings - - fontStyle - italic - foreground - #ff79c6 - - - - name - Class name - scope - entity.name.class - settings - - fontStyle - underline - foreground - #8be9fd - - - - name - Meta Path - scope - meta.path - settings - - fontStyle - underline - foreground - #66d9ef - - - - name - Inherited class - scope - entity.other.inherited-class - settings - - fontStyle - italic underline - foreground - #8be9fd - - - - name - Function name - scope - entity.name.function - settings - - fontStyle - - foreground - #50fa7b - - - - name - Function argument - scope - variable.parameter - settings - - fontStyle - italic - foreground - #ffb86c - - - - name - Tag name - scope - entity.name.tag - settings - - fontStyle - - foreground - #ff79c6 - - - - name - Tag attribute - scope - entity.other.attribute-name - settings - - fontStyle - - foreground - #50fa7b - - - - name - Library function - scope - support.function - settings - - fontStyle - - foreground - #8be9fd - - - - name - Library constant - scope - support.constant - settings - - fontStyle - - foreground - #6be5fd - - - - name - Library class/type - scope - support.type, support.class - settings - - fontStyle - italic - foreground - #66d9ef - - - - name - Library variable - scope - support.other.variable - settings - - fontStyle - - - - - name - Support Other Namespace - scope - support.other.namespace - settings - - fontStyle - italic - foreground - #66d9ef - - - - name - Invalid - scope - invalid - settings - - background - #ff79c6 - fontStyle - - foreground - #F8F8F0 - - - - name - Invalid deprecated - scope - invalid.deprecated - settings - - background - #bd93f9 - foreground - #F8F8F0 - - - - name - JSON String - scope - meta.structure.dictionary.json string.quoted.double.json - settings - - foreground - #CFCFC2 - - - - name - diff.header - scope - meta.diff, meta.diff.header - settings - - foreground - #6272a4 - - - - name - diff.deleted - scope - markup.deleted - settings - - foreground - #ff79c6 - - - - name - diff.inserted - scope - markup.inserted - settings - - foreground - #50fa7b - - - - name - diff.changed - scope - markup.changed - settings - - foreground - #E6DB74 - - - - scope - constant.numeric.line-number.find-in-files - match - settings - - foreground - #bd93f9 - - - - scope - entity.name.filename - settings - - foreground - #E6DB74 - - - - scope - message.error - settings - - foreground - #F83333 - - - - name - JSON Punctuation - scope - punctuation.definition.string.begin.json - meta.structure.dictionary.value.json, punctuation.definition.string.end.json - meta.structure.dictionary.value.json - settings - - foreground - #EEEEEE - - - - name - JSON Structure - scope - meta.structure.dictionary.json string.quoted.double.json - settings - - foreground - #8be9fd - - - - name - JSON String - scope - meta.structure.dictionary.value.json string.quoted.double.json - settings - - foreground - #f1fa8c - - - - name - JSON: 6 deep - scope - meta meta meta meta meta meta meta.structure.dictionary.value string - settings - - foreground - #50fa7b - - - - name - JSON: 5 deep - scope - meta meta meta meta meta meta.structure.dictionary.value string - settings - - foreground - #ffb86c - - - - name - JSON: 4 deep - scope - meta meta meta meta meta.structure.dictionary.value string - settings - - foreground - #ff79c6 - - - - name - JSON: 3 deep - scope - meta meta meta meta.structure.dictionary.value string - settings - - foreground - #bd93f9 - - - - name - JSON: 2 deep - scope - meta meta meta.structure.dictionary.value string - settings - - foreground - #50fa7b - - - - name - JSON: 1 deep - scope - meta meta.structure.dictionary.value string - settings - - foreground - #ffb86c - - - - - - name - Markup: strike - scope - markup.strike - settings - - fontStyle - italic - foreground - #FFB86C - - - - name - Markup: bold - scope - markup.bold - settings - - fontStyle - bold - foreground - #FFB86C - - - - name - Markup: italic - scope - markup.italic - settings - - fontStyle - italic - foreground - #FFB86C - - - - name - Markdown: heading - scope - markup.heading - settings - - foreground - #8BE9FD - - - - name - Markdown: List Items Punctuation - scope - punctuation.definition.list_item.markdown - settings - - foreground - #FF79C6 - - - - name - Markdown: Blockquote - scope - markup.quote - settings - - fontStyle - italic - foreground - #6272A4 - - - - name - Markdown: Blockquote Punctuation - scope - punctuation.definition.blockquote.markdown - settings - - fontStyle - italic - background - #6272A4 - foreground - #6272A4 - - - - name - Markdown: Separator - scope - meta.separator - settings - - foreground - #6272A4 - - - - name - Markup: raw inline - scope - text.html.markdown markup.raw.inline - settings - - foreground - #50FA7B - - - - name - Markup: underline - scope - markup.underline - settings - - fontStyle - underline - foreground - #BD93F9 - - - - name - Markup: Raw block - scope - markup.raw.block - settings - - foreground - #CFCFC2 - - - - name - Markdown: Raw Block fenced source - scope - markup.raw.block.fenced.markdown source - settings - - foreground - #F8F8F2 - - - - name - Markdown: Fenced Bode Block - scope - punctuation.definition.fenced.markdown, variable.language.fenced.markdown - settings - - fontStyle - italic - foreground - #6272A4 - - - - name - Markdown: Fenced Language - scope - variable.language.fenced.markdown - settings - - fontStyle - italic - foreground - #6272A4 - - - - name - Punctuation Accessor - scope - punctuation.accessor - settings - - foreground - #FF79C6 - - - - name - Meta Function Return Type - scope - meta.function.return-type - settings - - foreground - #FF79C6 - - - - name - Punctuation Section Block Begin - scope - punctuation.section.block.begin - settings - - foreground - #ffffff - - - - name - Punctuation Section Block End - scope - punctuation.section.block.end - settings - - foreground - #ffffff - - - - name - Punctuation Section Embedded Begin - scope - punctuation.section.embedded.begin - settings - - foreground - #ff79c6 - - - - name - Punctuation Section Embedded End - scope - punctuation.section.embedded.end - settings - - foreground - #ff79c6 - - - - name - Punctuation Separator Namespace - scope - punctuation.separator.namespace - settings - - foreground - #ff79c6 - - - - name - Variable Function - scope - variable.function - settings - - foreground - #50fa7b - - - - name - Variable Other - scope - variable.other - settings - - foreground - #ffffff - - - - name - Variable Language - scope - variable.language - settings - - foreground - #bd93f9 - - - - name - Entity Name Module Ruby - scope - entity.name.module.ruby - settings - - foreground - #8be9fd - - - - name - Entity Name Constant Ruby - scope - entity.name.constant.ruby - settings - - foreground - #bd93f9 - - - - name - Support Function Builtin Ruby - scope - support.function.builtin.ruby - settings - - foreground - #ffffff - - - - name - Storage Type Namespace CS - scope - storage.type.namespace.cs - settings - - foreground - #ff79c6 - - - - name - Entity Name Namespace CS - scope - entity.name.namespace.cs - settings - - foreground - #8be9fd - - - - uuid - 83091B89-765E-4F0D-9275-0EC6CB084126 - colorSpaceName - sRGB - semanticClass - theme.dracula - author - Zeno Rocha - - + + + + + + + + name + Dracula + settings + + + settings + + background + #282a36 + caret + #f8f8f0 + block_caret + #999a9e + foreground + #f8f8f2 + invisibles + #3B3A32 + lineHighlight + #44475a + selection + #44475a + findHighlight + #effb7b + findHighlightForeground + #000000 + selectionBorder + #222218 + activeGuide + #9D550FB0 + bracketsForeground + #F8F8F2A5 + bracketsOptions + underline + bracketContentsForeground + #F8F8F2A5 + bracketContentsOptions + underline + tagsOptions + stippled_underline + + + + name + Comment + scope + comment + settings + + foreground + #6272a4 + fontStyle + + + + + name + String + scope + string + settings + + foreground + #f1fa8c + + + + name + Number + scope + constant.numeric + settings + + foreground + #bd93f9 + + + + name + Built-in constant + scope + constant.language + settings + + foreground + #bd93f9 + + + + name + User-defined constant + scope + constant.character, constant.other + settings + + foreground + #bd93f9 + + + + name + Variable + scope + variable + settings + + fontStyle + + + + + name + Ruby's @variable + scope + variable.other.readwrite.instance + settings + + fontStyle + + foreground + #ffb86c + + + + name + String interpolation + scope + constant.character.escaped, constant.character.escape, string source, string source.ruby + settings + + fontStyle + + foreground + #ff79c6 + + + + name + Ruby Regexp + scope + source.ruby string.regexp.classic.ruby,source.ruby string.regexp.mod-r.ruby + settings + + fontStyle + + foreground + #ff5555 + + + + name + Keyword + scope + keyword + settings + + foreground + #ff79c6 + + + + name + Storage + scope + storage + settings + + fontStyle + + foreground + #ff79c6 + + + + name + Storage type + scope + storage.type + settings + + fontStyle + italic + foreground + #8be9fd + + + + name + Storage Type Namespace + scope + storage.type.namespace + settings + + fontStyle + italic + foreground + #8be9fd + + + + name + Storage Type Class + scope + storage.type.class + settings + + fontStyle + italic + foreground + #ff79c6 + + + + name + Class name + scope + entity.name.class + settings + + fontStyle + underline + foreground + #8be9fd + + + + name + Meta Path + scope + meta.path + settings + + fontStyle + underline + foreground + #66d9ef + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + fontStyle + italic underline + foreground + #8be9fd + + + + name + Function name + scope + entity.name.function + settings + + fontStyle + + foreground + #50fa7b + + + + name + Function argument + scope + variable.parameter + settings + + fontStyle + italic + foreground + #ffb86c + + + + name + Tag name + scope + entity.name.tag + settings + + fontStyle + + foreground + #ff79c6 + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + fontStyle + + foreground + #50fa7b + + + + name + Library function + scope + support.function + settings + + fontStyle + + foreground + #8be9fd + + + + name + Library constant + scope + support.constant + settings + + fontStyle + + foreground + #6be5fd + + + + name + Library class/type + scope + support.type, support.class + settings + + fontStyle + italic + foreground + #66d9ef + + + + name + Library variable + scope + support.other.variable + settings + + fontStyle + + + + + name + Support Other Namespace + scope + support.other.namespace + settings + + fontStyle + italic + foreground + #66d9ef + + + + name + Invalid + scope + invalid + settings + + background + #ff79c6 + fontStyle + + foreground + #F8F8F0 + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + background + #bd93f9 + foreground + #F8F8F0 + + + + name + JSON String + scope + meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #CFCFC2 + + + + name + diff.header + scope + meta.diff, meta.diff.header + settings + + foreground + #6272a4 + + + + name + diff.deleted + scope + markup.deleted + settings + + foreground + #ff79c6 + + + + name + diff.inserted + scope + markup.inserted + settings + + foreground + #50fa7b + + + + name + diff.changed + scope + markup.changed + settings + + foreground + #E6DB74 + + + + scope + constant.numeric.line-number.find-in-files - match + settings + + foreground + #bd93f9 + + + + scope + entity.name.filename + settings + + foreground + #E6DB74 + + + + scope + message.error + settings + + foreground + #F83333 + + + + name + JSON Punctuation + scope + punctuation.definition.string.begin.json - meta.structure.dictionary.value.json, punctuation.definition.string.end.json - meta.structure.dictionary.value.json + settings + + foreground + #EEEEEE + + + + name + JSON Structure + scope + meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #8be9fd + + + + name + JSON String + scope + meta.structure.dictionary.value.json string.quoted.double.json + settings + + foreground + #f1fa8c + + + + name + JSON: 6 deep + scope + meta meta meta meta meta meta meta.structure.dictionary.value string + settings + + foreground + #50fa7b + + + + name + JSON: 5 deep + scope + meta meta meta meta meta meta.structure.dictionary.value string + settings + + foreground + #ffb86c + + + + name + JSON: 4 deep + scope + meta meta meta meta meta.structure.dictionary.value string + settings + + foreground + #ff79c6 + + + + name + JSON: 3 deep + scope + meta meta meta meta.structure.dictionary.value string + settings + + foreground + #bd93f9 + + + + name + JSON: 2 deep + scope + meta meta meta.structure.dictionary.value string + settings + + foreground + #50fa7b + + + + name + JSON: 1 deep + scope + meta meta.structure.dictionary.value string + settings + + foreground + #ffb86c + + + + + + name + Markup: strike + scope + markup.strike + settings + + fontStyle + italic + foreground + #FFB86C + + + + name + Markup: bold + scope + markup.bold + settings + + fontStyle + bold + foreground + #FFB86C + + + + name + Markup: italic + scope + markup.italic + settings + + fontStyle + italic + foreground + #FFB86C + + + + name + Markdown: heading + scope + markup.heading + settings + + foreground + #8BE9FD + + + + name + Markdown: List Items Punctuation + scope + punctuation.definition.list_item.markdown + settings + + foreground + #FF79C6 + + + + name + Markdown: Blockquote + scope + markup.quote + settings + + fontStyle + italic + foreground + #6272A4 + + + + name + Markdown: Blockquote Punctuation + scope + punctuation.definition.blockquote.markdown + settings + + fontStyle + italic + background + #6272A4 + foreground + #6272A4 + + + + name + Markdown: Separator + scope + meta.separator + settings + + foreground + #6272A4 + + + + name + Markup: raw inline + scope + text.html.markdown markup.raw.inline + settings + + foreground + #50FA7B + + + + name + Markup: underline + scope + markup.underline + settings + + fontStyle + underline + foreground + #BD93F9 + + + + name + Markup: Raw block + scope + markup.raw.block + settings + + foreground + #CFCFC2 + + + + name + Markdown: Raw Block fenced source + scope + markup.raw.block.fenced.markdown source + settings + + foreground + #F8F8F2 + + + + name + Markdown: Fenced Bode Block + scope + punctuation.definition.fenced.markdown, variable.language.fenced.markdown + settings + + fontStyle + italic + foreground + #6272A4 + + + + name + Markdown: Fenced Language + scope + variable.language.fenced.markdown + settings + + fontStyle + italic + foreground + #6272A4 + + + + name + Punctuation Accessor + scope + punctuation.accessor + settings + + foreground + #FF79C6 + + + + name + Meta Function Return Type + scope + meta.function.return-type + settings + + foreground + #FF79C6 + + + + name + Punctuation Section Block Begin + scope + punctuation.section.block.begin + settings + + foreground + #ffffff + + + + name + Punctuation Section Block End + scope + punctuation.section.block.end + settings + + foreground + #ffffff + + + + name + Punctuation Section Embedded Begin + scope + punctuation.section.embedded.begin + settings + + foreground + #ff79c6 + + + + name + Punctuation Section Embedded End + scope + punctuation.section.embedded.end + settings + + foreground + #ff79c6 + + + + name + Punctuation Separator Namespace + scope + punctuation.separator.namespace + settings + + foreground + #ff79c6 + + + + name + Variable Function + scope + variable.function + settings + + foreground + #50fa7b + + + + name + Variable Other + scope + variable.other + settings + + foreground + #ffffff + + + + name + Variable Language + scope + variable.language + settings + + foreground + #bd93f9 + + + + name + Entity Name Module Ruby + scope + entity.name.module.ruby + settings + + foreground + #8be9fd + + + + name + Entity Name Constant Ruby + scope + entity.name.constant.ruby + settings + + foreground + #bd93f9 + + + + name + Support Function Builtin Ruby + scope + support.function.builtin.ruby + settings + + foreground + #ffffff + + + + name + Storage Type Namespace CS + scope + storage.type.namespace.cs + settings + + foreground + #ff79c6 + + + + name + Entity Name Namespace CS + scope + entity.name.namespace.cs + settings + + foreground + #8be9fd + + + + uuid + 83091B89-765E-4F0D-9275-0EC6CB084126 + colorSpaceName + sRGB + semanticClass + theme.dracula + author + Zeno Rocha + + diff --git a/src/commands.rs b/src/commands.rs index 8558f2c..41d93fe 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -1,577 +1,577 @@ -#![allow(unused_variables)] -use crate::db; -use crate::errors::Error; -use crate::errors::Error::{SQLITE3Error, SQLInvalidCommand}; -use async_trait::async_trait; -use html_escape::encode_text; -use markov::Chain; -use mystem::Case::Nominative; -use mystem::Gender::Feminine; -use mystem::MyStem; -use mystem::Person::First; -use mystem::Tense::{Inpresent, Past}; -use rand::seq::SliceRandom; -use rand::Rng; -use regex::Regex; -use silicon; -use sqlparser::ast::Statement; -use sqlparser::dialect::GenericDialect; -use sqlparser::parser::Parser; -use telegram_bot::prelude::*; -use telegram_bot::{Api, Message, ParseMode}; - -pub struct Here { - pub data: String, -} -pub struct Top { - pub data: String, -} -pub struct MarkovAll { - pub data: String, -} -pub struct Markov { - pub data: String, -} -pub struct Omedeto { - pub data: String, -} -pub struct Sql { - pub data: String, -} - -pub struct Code { - pub data: String, -} - -#[async_trait] -pub trait Execute { - async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error>; - async fn exec_with_result(&self, api: &Api, message: &Message) -> Result; - async fn exec_mystem( - &self, - api: &Api, - message: &Message, - mystem: &mut MyStem, - ) -> Result<(), Error>; -} - -#[async_trait] -impl Execute for Sql { - async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> { - unimplemented!() - } - - async fn exec_with_result(&self, api: &Api, message: &Message) -> Result { - let mut sql = self.data.clone(); - let is_head = if sql.starts_with('-') { - sql = sql.replacen("-", "", 1); - false - } else { - true - }; - let dialect = GenericDialect {}; - let ast: Vec = match Parser::parse_sql(&dialect, &sql) { - Ok(ast) => ast, - Err(_) => { - warn!("Invalid SQL - {}", sql); - return Err(SQLInvalidCommand); - } - }; - match ast.len() { - l if l > 1 => { - return Err(Error::SQLBannedCommand( - "🚫 One statement per message allowed 🚫".into(), - )) - } - _ => (), - } - match ast[0] { - sqlparser::ast::Statement::Query { .. } => {} - _ => { - return Err(Error::SQLBannedCommand( - "🚫 SELECT requests allowed only 🚫".into(), - )) - } - } - - let conn = db::open()?; - let mut stmt = conn.prepare_cached(&sql)?; - - let mut rows = match stmt.query(rusqlite::NO_PARAMS) { - Err(e) => return Err(SQLITE3Error(e)), - Ok(rows) => rows, - }; - - let mut res: Vec> = match rows.column_names() { - Some(n) => vec![n - .into_iter() - .map(|s| { - let t = String::from(s); - if t.len() > 10 { - "EMSGSIZE".to_string() - } else { - t - } - }) - .collect()], - None => return Err(SQLInvalidCommand), - }; - - let index_count = match rows.column_count() { - Some(c) => c, - None => return Err(SQLInvalidCommand), - }; - while let Some(row) = rows.next().unwrap() { - let mut tmp: Vec = Vec::new(); - for i in 0..index_count { - match row.get(i).unwrap_or(None) { - Some(rusqlite::types::Value::Text(t)) => tmp.push(t), - Some(rusqlite::types::Value::Integer(t)) => tmp.push(t.to_string()), - Some(rusqlite::types::Value::Blob(_)) => tmp.push("Binary".to_string()), - Some(rusqlite::types::Value::Real(t)) => tmp.push(t.to_string()), - Some(rusqlite::types::Value::Null) => tmp.push("Null".to_string()), - None => tmp.push("Null".to_string()), - }; - } - res.push(tmp); - } - if res.len() > 100 { - return Err(Error::SQLResultTooLong( - "SQL result too long. Lines limit is 100. Use LIMIT".to_string(), - )); - } - // add Header - let mut msg = if is_head { - let mut x = String::from(""); - for head in res[0].iter() { - x = format!("{} {}", x, head); - } - format!("{}{}", x, "\n") - } else { - String::new() - }; - - // remove header - res.remove(0); - - msg = format!("{}{}", msg, "
");
-        for line in res.iter() {
-            for field in line.iter() {
-                msg = format!("{}{}", msg, format!("{} ", field));
-            }
-            msg = format!("{}{}", msg, "\n");
-        }
-        msg = format!("{}{}", msg, "
"); - msg = if msg.len() > 4096 { - "🚫 Result is too big. Use LIMIT 🚫".into() - } else { - msg - }; - Ok(msg) - } - - #[allow(unused_variables)] - async fn exec_mystem( - &self, - api: &Api, - message: &Message, - mystem: &mut MyStem, - ) -> Result<(), Error> { - unimplemented!() - } -} - -#[async_trait] -impl Execute for Here { - async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> { - let members: Vec = db::get_members(message.chat.id()).unwrap(); - for u in &members { - debug!("Found user {:?} in chat {}", u, message.chat.id()); - } - let mut msg = "I summon you, ".to_string(); - for user in members { - let mention = match user.username { - Some(username) => format!("@{}", username), - _ => format!( - "{}", - encode_text(&user.id.to_string()), - encode_text(&user.first_name) - ), - }; - msg = format!("{} {}", msg, mention); - } - - match api - .send(message.text_reply(msg).parse_mode(ParseMode::Html)) - .await - { - Ok(_) => debug!("/here command sent to {}", message.chat.id()), - Err(_) => warn!("/here command sent failed to {}", message.chat.id()), - } - Ok(()) - } - - async fn exec_with_result(&self, api: &Api, message: &Message) -> Result { - unimplemented!() - } - - #[allow(unused_variables)] - async fn exec_mystem( - &self, - api: &Api, - message: &Message, - mystem: &mut MyStem, - ) -> Result<(), Error> { - unimplemented!() - } -} - -#[async_trait] -impl Execute for Top { - async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> { - let top = db::get_top(&message).await?; - let mut msg = "Your top using words:\n
".to_string();
-        let mut counter = 1;
-        for word in top.iter() {
-            msg = format!(
-                "{} {} {} - {}\n",
-                msg, counter, word.word, word.count
-            );
-            counter += 1;
-        }
-        msg = format!("{}{}", msg, "
"); - match api - .send(message.text_reply(msg).parse_mode(ParseMode::Html)) - .await - { - Ok(_) => debug!("/top command sent to {}", message.chat.id()), - Err(_) => warn!("/top command sent failed to {}", message.chat.id()), - } - Ok(()) - } - - async fn exec_with_result(&self, api: &Api, message: &Message) -> Result { - unimplemented!() - } - - #[allow(unused_variables)] - async fn exec_mystem( - &self, - api: &Api, - message: &Message, - mystem: &mut MyStem, - ) -> Result<(), Error> { - unimplemented!() - } -} - -#[async_trait] -impl Execute for MarkovAll { - async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> { - let messages = db::get_messages_random_all().await?; - let mut chain = Chain::new(); - chain.feed(messages); - let mut sentences = chain.generate(); - let mut msg = String::new(); - for _ in 1..rand::thread_rng().gen_range(2, 10) { - msg = format!("{} {}", msg, sentences.pop().unwrap()); - } - match api - .send(message.text_reply(msg.trim()).parse_mode(ParseMode::Html)) - .await - { - Ok(_) => debug!("/markov_all command sent to {}", message.chat.id()), - Err(_) => warn!("/markov_all command sent failed to {}", message.chat.id()), - } - //api.send(message.chat.text("Text to message chat")).await?; - //api.send(message.from.text("Private text")).await?; - Ok(()) - } - - async fn exec_with_result(&self, api: &Api, message: &Message) -> Result { - unimplemented!() - } - - #[allow(unused_variables)] - async fn exec_mystem( - &self, - api: &Api, - message: &Message, - mystem: &mut MyStem, - ) -> Result<(), Error> { - unimplemented!() - } -} - -#[async_trait] -impl Execute for Markov { - async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> { - let messages = db::get_messages_random_group(&message).await?; - let mut chain = Chain::new(); - chain.feed(messages); - let mut sentences = chain.generate(); - let mut msg = String::new(); - for _ in 1..rand::thread_rng().gen_range(2, 10) { - msg = format!("{} {}", msg, sentences.pop().unwrap()); - } - match api - .send(message.text_reply(msg.trim()).parse_mode(ParseMode::Html)) - .await - { - Ok(_) => debug!("/markov command sent to {}", message.chat.id()), - Err(_) => warn!("/markov command sent failed to {}", message.chat.id()), - } - //api.send(message.chat.text("Text to message chat")).await?; - //api.send(message.from.text("Private text")).await?; - Ok(()) - } - - async fn exec_with_result(&self, api: &Api, message: &Message) -> Result { - unimplemented!() - } - - #[allow(unused_variables)] - async fn exec_mystem( - &self, - api: &Api, - message: &Message, - mystem: &mut MyStem, - ) -> Result<(), Error> { - unimplemented!() - } -} - -#[async_trait] -impl Execute for Omedeto { - #[allow(unused_variables)] - async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> { - unimplemented!() - } - - async fn exec_with_result(&self, api: &Api, message: &Message) -> Result { - unimplemented!() - } - - #[warn(unused_must_use)] - async fn exec_mystem( - &self, - api: &Api, - message: &Message, - mystem: &mut MyStem, - ) -> Result<(), Error> { - let all_msg = db::get_messages_user_all(&message).await?; - let re = Regex::new(r"^[яЯ] [а-яА-Я]+(-[а-яА-Я]+(_[а-яА-Я]+)*)*").unwrap(); - let mut nouns: Vec = all_msg - .iter() - .filter(|m| re.is_match(m)) - .map(|m| m.split(' ').map(|s| s.to_string()).collect::>()[1].clone()) - .filter(|m| { - let stem = mystem.stemming(m.clone()).unwrap_or_default(); - if stem.is_empty() { - false - } else if stem[0].lex.is_empty() { - false - } else { - match stem[0].lex[0].grammem.part_of_speech { - mystem::PartOfSpeech::Noun => stem[0].lex[0] - .grammem - .facts - .contains(&mystem::Fact::Case(Nominative)), - _ => false, - } - } - }) - .map(|w| w.replace(|z| z == '.' || z == ',', "")) - .collect(); - nouns.sort(); - nouns.dedup(); - nouns.shuffle(&mut rand::thread_rng()); - //debug!("Found {} nouns. {:#?}", nouns.len(), nouns); - - let mut verbs_p: Vec = all_msg - .iter() - .filter(|m| re.is_match(m)) - .map(|m| m.split(' ').map(|s| s.to_string()).collect::>()[1].clone()) - .filter(|m| { - let stem = mystem.stemming(m.clone()).unwrap_or_default(); - if stem.is_empty() { - false - } else if stem[0].lex.is_empty() { - false - } else { - match stem[0].lex[0].grammem.part_of_speech { - mystem::PartOfSpeech::Verb => stem[0].lex[0] - .grammem - .facts - .contains(&mystem::Fact::Tense(Past)), - _ => false, - } - } - }) - .map(|w| w.replace(|z| z == '.' || z == ',', "")) - .collect(); - verbs_p.sort(); - verbs_p.dedup(); - verbs_p.shuffle(&mut rand::thread_rng()); - //debug!("Found {} past verbs. {:#?}", verbs_p.len(), verbs_p); - - let mut verbs_i: Vec = all_msg - .iter() - .filter(|m| re.is_match(m)) - .map(|m| m.split(' ').map(|s| s.to_string()).collect::>()[1].clone()) - .filter(|m| { - let stem = mystem.stemming(m.clone()).unwrap_or_default(); - if stem.is_empty() { - false - } else if stem[0].lex.is_empty() { - false - } else { - match stem[0].lex[0].grammem.part_of_speech { - mystem::PartOfSpeech::Verb => { - stem[0].lex[0] - .grammem - .facts - .contains(&mystem::Fact::Tense(Inpresent)) - && stem[0].lex[0] - .grammem - .facts - .contains(&mystem::Fact::Person(First)) - } - _ => false, - } - } - }) - .map(|w| w.replace(|z| z == '.' || z == ',', "")) - .collect(); - verbs_i.sort(); - verbs_i.dedup(); - verbs_i.shuffle(&mut rand::thread_rng()); - //debug!("Found {} inpresent verbs. {:#?}", verbs_i.len(), verbs_i); - - if nouns.is_empty() { - nouns.push(message.from.first_name.to_string()); - } - let start: Vec = vec![ - "С новым годом".into(), - "С НГ тебя".into(), - "Поздравляю".into(), - "Поздравляю с НГ".into(), - ]; - let placeholders: Vec = vec![ - "[ДАННЫЕ УДАЛЕНЫ]".into(), - "[СЕКРЕТНО]".into(), - "[НЕТ ДАННЫХ]".into(), - "[ОШИБКА ДОСТУПА]".into(), - ]; - //debug!("Nouns: {:#?}", nouns); - //debug!("Verbs: {:#?}", verbs); - - let fem = { - let mut fm = 0; - let mut mu = 0; - all_msg - .clone() - .into_iter() - .filter(|m| re.is_match(m)) - .map(|m| m.split(' ').map(|s| s.to_string()).collect::>()[1].clone()) - .map(|m| { - let stem = mystem.stemming(m.clone()).unwrap_or_default(); - if stem.is_empty() { - () - } else if stem[0].lex.is_empty() { - () - } else { - match stem[0].lex[0].grammem.part_of_speech { - mystem::PartOfSpeech::Verb => { - match stem[0].lex[0] - .grammem - .facts - .contains(&mystem::Fact::Tense(Past)) - { - true => { - if stem[0].lex[0] - .grammem - .facts - .contains(&mystem::Fact::Gender(Feminine)) - { - fm = fm + 1; - } else { - mu = mu + 1; - } - } - false => (), - } - } - _ => (), - } - } - }) - .for_each(drop); - //debug!("fm - {}, mu - {}", fm, mu); - if fm >= mu { - true - } else { - false - } - }; - //debug!("Is Feminine - {}", fem); - let result = format!( - "{} {} известн{} как {}, {}, а так же конечно {}. В прошедшем году ты часто давал{} нам знать, что ты {}, {} и {}. Нередко ты говорил{} я {}, я {} или даже я {}. =*", - start.choose(&mut rand::thread_rng()).unwrap(), - message.from.first_name.to_string(), - { if fem { "ая" } else { "ый" } }, - nouns.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), - nouns.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), - nouns.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), - { if fem { "а" } else { "" } }, - verbs_p.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), - verbs_p.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), - verbs_p.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), - { if fem { "а" } else { "" } }, - verbs_i.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), - verbs_i.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), - verbs_i.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), - ); - match api - .send( - message - .text_reply(result.trim()) - .parse_mode(ParseMode::Html), - ) - .await - { - Ok(_) => debug!("/omedeto command sent to {}", message.chat.id()), - Err(_) => warn!("/omedeto command sent failed to {}", message.chat.id()), - } - Ok(()) - } -} - -#[async_trait] -impl Execute for Code { - async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> { - let lang = "Rust"; - let theme = "Dracula"; - let code = &self.data; - let (ps, ts) = silicon::utils::init_syntect(); - let syntax = ps - .find_syntax_by_token(lang) - .ok_or_else(|| ps.find_syntax_by_token("js")); - let theme = ts.themes.get(theme).ok_or_else(|| ts.themes.get("1337")); - debug!("{:?}", code); - Ok(()) - } - - async fn exec_with_result(&self, api: &Api, message: &Message) -> Result { - unimplemented!() - } - - async fn exec_mystem( - &self, - api: &Api, - message: &Message, - mystem: &mut MyStem, - ) -> Result<(), Error> { - unimplemented!() - } -} +#![allow(unused_variables)] +use crate::db; +use crate::errors::Error; +use crate::errors::Error::{SQLITE3Error, SQLInvalidCommand}; +use async_trait::async_trait; +use html_escape::encode_text; +use markov::Chain; +use mystem::Case::Nominative; +use mystem::Gender::Feminine; +use mystem::MyStem; +use mystem::Person::First; +use mystem::Tense::{Inpresent, Past}; +use rand::seq::SliceRandom; +use rand::Rng; +use regex::Regex; +use silicon; +use sqlparser::ast::Statement; +use sqlparser::dialect::GenericDialect; +use sqlparser::parser::Parser; +use telegram_bot::prelude::*; +use telegram_bot::{Api, Message, ParseMode}; + +pub struct Here { + pub data: String, +} +pub struct Top { + pub data: String, +} +pub struct MarkovAll { + pub data: String, +} +pub struct Markov { + pub data: String, +} +pub struct Omedeto { + pub data: String, +} +pub struct Sql { + pub data: String, +} + +pub struct Code { + pub data: String, +} + +#[async_trait] +pub trait Execute { + async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error>; + async fn exec_with_result(&self, api: &Api, message: &Message) -> Result; + async fn exec_mystem( + &self, + api: &Api, + message: &Message, + mystem: &mut MyStem, + ) -> Result<(), Error>; +} + +#[async_trait] +impl Execute for Sql { + async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> { + unimplemented!() + } + + async fn exec_with_result(&self, api: &Api, message: &Message) -> Result { + let mut sql = self.data.clone(); + let is_head = if sql.starts_with('-') { + sql = sql.replacen("-", "", 1); + false + } else { + true + }; + let dialect = GenericDialect {}; + let ast: Vec = match Parser::parse_sql(&dialect, &sql) { + Ok(ast) => ast, + Err(_) => { + warn!("Invalid SQL - {}", sql); + return Err(SQLInvalidCommand); + } + }; + match ast.len() { + l if l > 1 => { + return Err(Error::SQLBannedCommand( + "🚫 One statement per message allowed 🚫".into(), + )) + } + _ => (), + } + match ast[0] { + sqlparser::ast::Statement::Query { .. } => {} + _ => { + return Err(Error::SQLBannedCommand( + "🚫 SELECT requests allowed only 🚫".into(), + )) + } + } + + let conn = db::open()?; + let mut stmt = conn.prepare_cached(&sql)?; + + let mut rows = match stmt.query(rusqlite::NO_PARAMS) { + Err(e) => return Err(SQLITE3Error(e)), + Ok(rows) => rows, + }; + + let mut res: Vec> = match rows.column_names() { + Some(n) => vec![n + .into_iter() + .map(|s| { + let t = String::from(s); + if t.len() > 10 { + "EMSGSIZE".to_string() + } else { + t + } + }) + .collect()], + None => return Err(SQLInvalidCommand), + }; + + let index_count = match rows.column_count() { + Some(c) => c, + None => return Err(SQLInvalidCommand), + }; + while let Some(row) = rows.next().unwrap() { + let mut tmp: Vec = Vec::new(); + for i in 0..index_count { + match row.get(i).unwrap_or(None) { + Some(rusqlite::types::Value::Text(t)) => tmp.push(t), + Some(rusqlite::types::Value::Integer(t)) => tmp.push(t.to_string()), + Some(rusqlite::types::Value::Blob(_)) => tmp.push("Binary".to_string()), + Some(rusqlite::types::Value::Real(t)) => tmp.push(t.to_string()), + Some(rusqlite::types::Value::Null) => tmp.push("Null".to_string()), + None => tmp.push("Null".to_string()), + }; + } + res.push(tmp); + } + if res.len() > 100 { + return Err(Error::SQLResultTooLong( + "SQL result too long. Lines limit is 100. Use LIMIT".to_string(), + )); + } + // add Header + let mut msg = if is_head { + let mut x = String::from(""); + for head in res[0].iter() { + x = format!("{} {}", x, head); + } + format!("{}{}", x, "\n") + } else { + String::new() + }; + + // remove header + res.remove(0); + + msg = format!("{}{}", msg, "
");
+        for line in res.iter() {
+            for field in line.iter() {
+                msg = format!("{}{}", msg, format!("{} ", field));
+            }
+            msg = format!("{}{}", msg, "\n");
+        }
+        msg = format!("{}{}", msg, "
"); + msg = if msg.len() > 4096 { + "🚫 Result is too big. Use LIMIT 🚫".into() + } else { + msg + }; + Ok(msg) + } + + #[allow(unused_variables)] + async fn exec_mystem( + &self, + api: &Api, + message: &Message, + mystem: &mut MyStem, + ) -> Result<(), Error> { + unimplemented!() + } +} + +#[async_trait] +impl Execute for Here { + async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> { + let members: Vec = db::get_members(message.chat.id()).unwrap(); + for u in &members { + debug!("Found user {:?} in chat {}", u, message.chat.id()); + } + let mut msg = "I summon you, ".to_string(); + for user in members { + let mention = match user.username { + Some(username) => format!("@{}", username), + _ => format!( + "{}", + encode_text(&user.id.to_string()), + encode_text(&user.first_name) + ), + }; + msg = format!("{} {}", msg, mention); + } + + match api + .send(message.text_reply(msg).parse_mode(ParseMode::Html)) + .await + { + Ok(_) => debug!("/here command sent to {}", message.chat.id()), + Err(_) => warn!("/here command sent failed to {}", message.chat.id()), + } + Ok(()) + } + + async fn exec_with_result(&self, api: &Api, message: &Message) -> Result { + unimplemented!() + } + + #[allow(unused_variables)] + async fn exec_mystem( + &self, + api: &Api, + message: &Message, + mystem: &mut MyStem, + ) -> Result<(), Error> { + unimplemented!() + } +} + +#[async_trait] +impl Execute for Top { + async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> { + let top = db::get_top(&message).await?; + let mut msg = "Your top using words:\n
".to_string();
+        let mut counter = 1;
+        for word in top.iter() {
+            msg = format!(
+                "{} {} {} - {}\n",
+                msg, counter, word.word, word.count
+            );
+            counter += 1;
+        }
+        msg = format!("{}{}", msg, "
"); + match api + .send(message.text_reply(msg).parse_mode(ParseMode::Html)) + .await + { + Ok(_) => debug!("/top command sent to {}", message.chat.id()), + Err(_) => warn!("/top command sent failed to {}", message.chat.id()), + } + Ok(()) + } + + async fn exec_with_result(&self, api: &Api, message: &Message) -> Result { + unimplemented!() + } + + #[allow(unused_variables)] + async fn exec_mystem( + &self, + api: &Api, + message: &Message, + mystem: &mut MyStem, + ) -> Result<(), Error> { + unimplemented!() + } +} + +#[async_trait] +impl Execute for MarkovAll { + async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> { + let messages = db::get_messages_random_all().await?; + let mut chain = Chain::new(); + chain.feed(messages); + let mut sentences = chain.generate(); + let mut msg = String::new(); + for _ in 1..rand::thread_rng().gen_range(2, 10) { + msg = format!("{} {}", msg, sentences.pop().unwrap()); + } + match api + .send(message.text_reply(msg.trim()).parse_mode(ParseMode::Html)) + .await + { + Ok(_) => debug!("/markov_all command sent to {}", message.chat.id()), + Err(_) => warn!("/markov_all command sent failed to {}", message.chat.id()), + } + //api.send(message.chat.text("Text to message chat")).await?; + //api.send(message.from.text("Private text")).await?; + Ok(()) + } + + async fn exec_with_result(&self, api: &Api, message: &Message) -> Result { + unimplemented!() + } + + #[allow(unused_variables)] + async fn exec_mystem( + &self, + api: &Api, + message: &Message, + mystem: &mut MyStem, + ) -> Result<(), Error> { + unimplemented!() + } +} + +#[async_trait] +impl Execute for Markov { + async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> { + let messages = db::get_messages_random_group(&message).await?; + let mut chain = Chain::new(); + chain.feed(messages); + let mut sentences = chain.generate(); + let mut msg = String::new(); + for _ in 1..rand::thread_rng().gen_range(2, 10) { + msg = format!("{} {}", msg, sentences.pop().unwrap()); + } + match api + .send(message.text_reply(msg.trim()).parse_mode(ParseMode::Html)) + .await + { + Ok(_) => debug!("/markov command sent to {}", message.chat.id()), + Err(_) => warn!("/markov command sent failed to {}", message.chat.id()), + } + //api.send(message.chat.text("Text to message chat")).await?; + //api.send(message.from.text("Private text")).await?; + Ok(()) + } + + async fn exec_with_result(&self, api: &Api, message: &Message) -> Result { + unimplemented!() + } + + #[allow(unused_variables)] + async fn exec_mystem( + &self, + api: &Api, + message: &Message, + mystem: &mut MyStem, + ) -> Result<(), Error> { + unimplemented!() + } +} + +#[async_trait] +impl Execute for Omedeto { + #[allow(unused_variables)] + async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> { + unimplemented!() + } + + async fn exec_with_result(&self, api: &Api, message: &Message) -> Result { + unimplemented!() + } + + #[warn(unused_must_use)] + async fn exec_mystem( + &self, + api: &Api, + message: &Message, + mystem: &mut MyStem, + ) -> Result<(), Error> { + let all_msg = db::get_messages_user_all(&message).await?; + let re = Regex::new(r"^[яЯ] [а-яА-Я]+(-[а-яА-Я]+(_[а-яА-Я]+)*)*").unwrap(); + let mut nouns: Vec = all_msg + .iter() + .filter(|m| re.is_match(m)) + .map(|m| m.split(' ').map(|s| s.to_string()).collect::>()[1].clone()) + .filter(|m| { + let stem = mystem.stemming(m.clone()).unwrap_or_default(); + if stem.is_empty() { + false + } else if stem[0].lex.is_empty() { + false + } else { + match stem[0].lex[0].grammem.part_of_speech { + mystem::PartOfSpeech::Noun => stem[0].lex[0] + .grammem + .facts + .contains(&mystem::Fact::Case(Nominative)), + _ => false, + } + } + }) + .map(|w| w.replace(|z| z == '.' || z == ',', "")) + .collect(); + nouns.sort(); + nouns.dedup(); + nouns.shuffle(&mut rand::thread_rng()); + //debug!("Found {} nouns. {:#?}", nouns.len(), nouns); + + let mut verbs_p: Vec = all_msg + .iter() + .filter(|m| re.is_match(m)) + .map(|m| m.split(' ').map(|s| s.to_string()).collect::>()[1].clone()) + .filter(|m| { + let stem = mystem.stemming(m.clone()).unwrap_or_default(); + if stem.is_empty() { + false + } else if stem[0].lex.is_empty() { + false + } else { + match stem[0].lex[0].grammem.part_of_speech { + mystem::PartOfSpeech::Verb => stem[0].lex[0] + .grammem + .facts + .contains(&mystem::Fact::Tense(Past)), + _ => false, + } + } + }) + .map(|w| w.replace(|z| z == '.' || z == ',', "")) + .collect(); + verbs_p.sort(); + verbs_p.dedup(); + verbs_p.shuffle(&mut rand::thread_rng()); + //debug!("Found {} past verbs. {:#?}", verbs_p.len(), verbs_p); + + let mut verbs_i: Vec = all_msg + .iter() + .filter(|m| re.is_match(m)) + .map(|m| m.split(' ').map(|s| s.to_string()).collect::>()[1].clone()) + .filter(|m| { + let stem = mystem.stemming(m.clone()).unwrap_or_default(); + if stem.is_empty() { + false + } else if stem[0].lex.is_empty() { + false + } else { + match stem[0].lex[0].grammem.part_of_speech { + mystem::PartOfSpeech::Verb => { + stem[0].lex[0] + .grammem + .facts + .contains(&mystem::Fact::Tense(Inpresent)) + && stem[0].lex[0] + .grammem + .facts + .contains(&mystem::Fact::Person(First)) + } + _ => false, + } + } + }) + .map(|w| w.replace(|z| z == '.' || z == ',', "")) + .collect(); + verbs_i.sort(); + verbs_i.dedup(); + verbs_i.shuffle(&mut rand::thread_rng()); + //debug!("Found {} inpresent verbs. {:#?}", verbs_i.len(), verbs_i); + + if nouns.is_empty() { + nouns.push(message.from.first_name.to_string()); + } + let start: Vec = vec![ + "С новым годом".into(), + "С НГ тебя".into(), + "Поздравляю".into(), + "Поздравляю с НГ".into(), + ]; + let placeholders: Vec = vec![ + "[ДАННЫЕ УДАЛЕНЫ]".into(), + "[СЕКРЕТНО]".into(), + "[НЕТ ДАННЫХ]".into(), + "[ОШИБКА ДОСТУПА]".into(), + ]; + //debug!("Nouns: {:#?}", nouns); + //debug!("Verbs: {:#?}", verbs); + + let fem = { + let mut fm = 0; + let mut mu = 0; + all_msg + .clone() + .into_iter() + .filter(|m| re.is_match(m)) + .map(|m| m.split(' ').map(|s| s.to_string()).collect::>()[1].clone()) + .map(|m| { + let stem = mystem.stemming(m.clone()).unwrap_or_default(); + if stem.is_empty() { + () + } else if stem[0].lex.is_empty() { + () + } else { + match stem[0].lex[0].grammem.part_of_speech { + mystem::PartOfSpeech::Verb => { + match stem[0].lex[0] + .grammem + .facts + .contains(&mystem::Fact::Tense(Past)) + { + true => { + if stem[0].lex[0] + .grammem + .facts + .contains(&mystem::Fact::Gender(Feminine)) + { + fm = fm + 1; + } else { + mu = mu + 1; + } + } + false => (), + } + } + _ => (), + } + } + }) + .for_each(drop); + //debug!("fm - {}, mu - {}", fm, mu); + if fm >= mu { + true + } else { + false + } + }; + //debug!("Is Feminine - {}", fem); + let result = format!( + "{} {} известн{} как {}, {}, а так же конечно {}. В прошедшем году ты часто давал{} нам знать, что ты {}, {} и {}. Нередко ты говорил{} я {}, я {} или даже я {}. =*", + start.choose(&mut rand::thread_rng()).unwrap(), + message.from.first_name.to_string(), + { if fem { "ая" } else { "ый" } }, + nouns.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), + nouns.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), + nouns.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), + { if fem { "а" } else { "" } }, + verbs_p.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), + verbs_p.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), + verbs_p.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), + { if fem { "а" } else { "" } }, + verbs_i.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), + verbs_i.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), + verbs_i.pop().unwrap_or(placeholders.choose(&mut rand::thread_rng()).unwrap().to_string()), + ); + match api + .send( + message + .text_reply(result.trim()) + .parse_mode(ParseMode::Html), + ) + .await + { + Ok(_) => debug!("/omedeto command sent to {}", message.chat.id()), + Err(_) => warn!("/omedeto command sent failed to {}", message.chat.id()), + } + Ok(()) + } +} + +#[async_trait] +impl Execute for Code { + async fn exec(&self, api: &Api, message: &Message) -> Result<(), Error> { + let lang = "Rust"; + let theme = "Dracula"; + let code = &self.data; + let (ps, ts) = silicon::utils::init_syntect(); + let syntax = ps + .find_syntax_by_token(lang) + .ok_or_else(|| ps.find_syntax_by_token("js")); + let theme = ts.themes.get(theme).ok_or_else(|| ts.themes.get("1337")); + debug!("{:?}", code); + Ok(()) + } + + async fn exec_with_result(&self, api: &Api, message: &Message) -> Result { + unimplemented!() + } + + async fn exec_mystem( + &self, + api: &Api, + message: &Message, + mystem: &mut MyStem, + ) -> Result<(), Error> { + unimplemented!() + } +} diff --git a/src/handlers.rs b/src/handlers.rs index 70260f8..b7b4595 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -1,184 +1,184 @@ -//use crate::commands::Command; -use crate::commands::{Code, Execute, Here, Markov, MarkovAll, Omedeto, Sql, Top}; -use crate::db; -use crate::errors; -use crate::utils; -use mystem::MyStem; -use telegram_bot::*; - -pub async fn handler( - api: Api, - message: Message, - token: String, - mystem: &mut MyStem, - me: User, -) -> Result<(), errors::Error> { - match message.kind { - MessageKind::Text { ref data, .. } => { - let title = utils::get_title(&message); - info!( - "<{}({})>[{}({})]: {}", - &message.chat.id(), - title, - &message.from.id, - &message.from.first_name, - data - ); - db::add_sentence(&message, mystem).await?; - let cleaned_message = data.replace(&format!("@{}", me.clone().username.unwrap()), ""); - match cleaned_message.as_str() { - s if s.contains("/here") => { - Here { - data: "".to_string(), - } - .exec(&api, &message) - .await? - } - s if s.to_string().starts_with("/sql") => match { - Sql { - data: s.replace("/sql ", ""), - } - .exec_with_result(&api, &message) - .await - } { - Ok(msg) => { - let _ = api - .send( - message - .text_reply(msg) - .parse_mode(ParseMode::Html), - ) - .await?; - }, - Err(e) => { - let _ = api - .send( - message - .text_reply(format!("Error: {:#?}", e)) - .parse_mode(ParseMode::Html), - ) - .await?; - } - }, - s if s.to_string().starts_with("/code") => { - Code { - data: s.to_string(), - } - .exec(&api, &message) - .await? - } - "/top" => { - Top { - data: "".to_string(), - } - .exec(&api, &message) - .await? - } - "/stat" => { - Top { - data: "".to_string(), - } - .exec(&api, &message) - .await? - } - "/markov_all" => { - MarkovAll { - data: "".to_string(), - } - .exec(&api, &message) - .await? - } - "/markov" => { - Markov { - data: "".to_string(), - } - .exec(&api, &message) - .await? - } - "/omedeto" => { - Omedeto { - data: "".to_string(), - } - .exec_mystem(&api, &message, mystem) - .await? - } - _ => (), - } - } - MessageKind::Photo { ref caption, .. } => { - let title = utils::get_title(&message); - info!( - "<{}({})>[{}({})]: *PHOTO* {}", - &message.chat.id(), - title, - &message.from.id, - &message.from.first_name, - caption.clone().unwrap_or("NO_TITLE".to_string()) - ); - utils::get_files(api, message, token).await?; - } - - MessageKind::Document { ref caption, .. } => { - let title = utils::get_title(&message); - info!( - "<{}({})>[{}({})]: *DOCUMENT* {}", - &message.chat.id(), - title, - &message.from.id, - &message.from.first_name, - caption.clone().unwrap_or("NO_TITLE".to_string()) - ); - utils::get_files(api, message, token).await?; - } - - MessageKind::Sticker { .. } => { - let title = utils::get_title(&message); - info!( - "<{}({})>[{}({})]: *STICKER*", - &message.chat.id(), - title, - &message.from.id, - &message.from.first_name, - ); - utils::get_files(api, message, token).await?; - } - - MessageKind::Voice { .. } => { - let title = utils::get_title(&message); - info!( - "<{}({})>[{}({})]: *VOICE*", - &message.chat.id(), - title, - &message.from.id, - &message.from.first_name, - ); - utils::get_files(api, message, token).await?; - } - - MessageKind::Video { .. } => { - let title = utils::get_title(&message); - info!( - "<{}({})>[{}({})]: *VIDEO*", - &message.chat.id(), - title, - &message.from.id, - &message.from.first_name, - ); - utils::get_files(api, message, token).await?; - } - - MessageKind::VideoNote { .. } => { - let title = utils::get_title(&message); - info!( - "<{}({})>[{}({})]: *VIDEO_NOTE*", - &message.chat.id(), - title, - &message.from.id, - &message.from.first_name, - ); - utils::get_files(api, message, token).await?; - } - _ => (), - }; - Ok(()) -} +//use crate::commands::Command; +use crate::commands::{Code, Execute, Here, Markov, MarkovAll, Omedeto, Sql, Top}; +use crate::db; +use crate::errors; +use crate::utils; +use mystem::MyStem; +use telegram_bot::*; + +pub async fn handler( + api: Api, + message: Message, + token: String, + mystem: &mut MyStem, + me: User, +) -> Result<(), errors::Error> { + match message.kind { + MessageKind::Text { ref data, .. } => { + let title = utils::get_title(&message); + info!( + "<{}({})>[{}({})]: {}", + &message.chat.id(), + title, + &message.from.id, + &message.from.first_name, + data + ); + db::add_sentence(&message, mystem).await?; + let cleaned_message = data.replace(&format!("@{}", me.clone().username.unwrap()), ""); + match cleaned_message.as_str() { + s if s.contains("/here") => { + Here { + data: "".to_string(), + } + .exec(&api, &message) + .await? + } + s if s.to_string().starts_with("/sql") => match { + Sql { + data: s.replace("/sql ", ""), + } + .exec_with_result(&api, &message) + .await + } { + Ok(msg) => { + let _ = api + .send( + message + .text_reply(msg) + .parse_mode(ParseMode::Html), + ) + .await?; + }, + Err(e) => { + let _ = api + .send( + message + .text_reply(format!("Error: {:#?}", e)) + .parse_mode(ParseMode::Html), + ) + .await?; + } + }, + s if s.to_string().starts_with("/code") => { + Code { + data: s.to_string(), + } + .exec(&api, &message) + .await? + } + "/top" => { + Top { + data: "".to_string(), + } + .exec(&api, &message) + .await? + } + "/stat" => { + Top { + data: "".to_string(), + } + .exec(&api, &message) + .await? + } + "/markov_all" => { + MarkovAll { + data: "".to_string(), + } + .exec(&api, &message) + .await? + } + "/markov" => { + Markov { + data: "".to_string(), + } + .exec(&api, &message) + .await? + } + "/omedeto" => { + Omedeto { + data: "".to_string(), + } + .exec_mystem(&api, &message, mystem) + .await? + } + _ => (), + } + } + MessageKind::Photo { ref caption, .. } => { + let title = utils::get_title(&message); + info!( + "<{}({})>[{}({})]: *PHOTO* {}", + &message.chat.id(), + title, + &message.from.id, + &message.from.first_name, + caption.clone().unwrap_or("NO_TITLE".to_string()) + ); + utils::get_files(api, message, token).await?; + } + + MessageKind::Document { ref caption, .. } => { + let title = utils::get_title(&message); + info!( + "<{}({})>[{}({})]: *DOCUMENT* {}", + &message.chat.id(), + title, + &message.from.id, + &message.from.first_name, + caption.clone().unwrap_or("NO_TITLE".to_string()) + ); + utils::get_files(api, message, token).await?; + } + + MessageKind::Sticker { .. } => { + let title = utils::get_title(&message); + info!( + "<{}({})>[{}({})]: *STICKER*", + &message.chat.id(), + title, + &message.from.id, + &message.from.first_name, + ); + utils::get_files(api, message, token).await?; + } + + MessageKind::Voice { .. } => { + let title = utils::get_title(&message); + info!( + "<{}({})>[{}({})]: *VOICE*", + &message.chat.id(), + title, + &message.from.id, + &message.from.first_name, + ); + utils::get_files(api, message, token).await?; + } + + MessageKind::Video { .. } => { + let title = utils::get_title(&message); + info!( + "<{}({})>[{}({})]: *VIDEO*", + &message.chat.id(), + title, + &message.from.id, + &message.from.first_name, + ); + utils::get_files(api, message, token).await?; + } + + MessageKind::VideoNote { .. } => { + let title = utils::get_title(&message); + info!( + "<{}({})>[{}({})]: *VIDEO_NOTE*", + &message.chat.id(), + title, + &message.from.id, + &message.from.first_name, + ); + utils::get_files(api, message, token).await?; + } + _ => (), + }; + Ok(()) +}