diff --git a/Cargo.lock b/Cargo.lock index c6c0aa5..d649631 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,870 +4,1068 @@ name = "aho-corasick" version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" dependencies = [ - "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi", ] [[package]] name = "anyhow" -version = "1.0.34" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68803225a7b13e47191bab76f2687382b60d259e8cf37f6e1893658b84bb9479" [[package]] name = "array-init" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a51c983d65b6691893a791e55aa8bda43bbd9b11f947e5a9581710362277cc95" [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", + "winapi", ] [[package]] name = "audio-conv" version = "0.0.0" dependencies = [ - "anyhow 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.99.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "glib 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", - "globset 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer 0.16.5 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer-audio 0.16.5 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer-base 0.16.5 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_yaml 0.8.14 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow", + "clap", + "crossterm", + "derive_more", + "futures", + "glib", + "globset", + "gstreamer", + "gstreamer-audio", + "gstreamer-base", + "libc", + "num_cpus", + "regex", + "serde", + "serde_yaml", + "tokio", + "tui", + "walkdir", ] [[package]] name = "autocfg" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "bitflags" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "bstr" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "473fc6b38233f9af7baa94fb5852dca389e3d95b8e21c8e3719301462c5d9faf" dependencies = [ - "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", ] +[[package]] +name = "cassowary" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" + [[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 = "clap" version = "2.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" dependencies = [ - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term", + "atty", + "bitflags", + "strsim", + "textwrap", + "unicode-width", + "vec_map", +] + +[[package]] +name = "crossterm" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e86d73f2a0b407b5768d10a8c720cf5d2df49a9efc10ca09176d201ead4b7fb" +dependencies = [ + "bitflags", + "crossterm_winapi", + "lazy_static", + "libc", + "mio", + "parking_lot", + "signal-hook", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2265c3f8e080075d9b6417aa72293fc71662f34b4af2612d8d1b074d29510db" +dependencies = [ + "winapi", ] [[package]] name = "derive_more" version = "0.99.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "dtoa" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" [[package]] name = "either" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "futures" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0" dependencies = [ - "futures-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-executor 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", + "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 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-macro 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-nested 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project", + "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", ] [[package]] name = "glib" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c685013b7515e668f1b57a165b009d4d28cb139a8a989bbd699c10dad29d0c5" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-executor 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "glib-macros 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "glib-sys 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gobject-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "once_cell 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "once_cell", ] [[package]] name = "glib-macros" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41486a26d1366a8032b160b59065a59fb528530a46a49f627e7048fb8c064039" dependencies = [ - "anyhow 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-crate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-error 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow", + "heck", + "itertools", + "proc-macro-crate", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "glib-sys" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e9b997a66e9a23d073f2b1abb4dbfc3925e0b8952f67efd8d9b6e168e4cdc1" dependencies = [ - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "system-deps 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "system-deps", ] [[package]] name = "globset" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c152169ef1e421390738366d2f796655fec62621dabbd0fd476f905934061e4a" dependencies = [ - "aho-corasick 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", - "bstr 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick", + "bstr", + "fnv", + "log", + "regex", ] [[package]] name = "gobject-sys" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "952133b60c318a62bf82ee75b93acc7e84028a093e06b9e27981c2b6fe68218c" dependencies = [ - "glib-sys 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "system-deps 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys", + "libc", + "system-deps", ] [[package]] name = "gstreamer" version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d50f822055923f1cbede233aa5dfd4ee957cf328fb3076e330886094e11d6cf" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "glib 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", - "glib-sys 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gobject-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "muldiv 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "once_cell 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "paste 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "pretty-hex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "cfg-if 1.0.0", + "futures-channel", + "futures-core", + "futures-util", + "glib", + "glib-sys", + "gobject-sys", + "gstreamer-sys", + "libc", + "muldiv", + "num-rational", + "once_cell", + "paste", + "pretty-hex", + "thiserror", ] [[package]] name = "gstreamer-audio" version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b926a2fa1b6756cf4087fe54ac20bb9951131efe8529dfb5c151b490d9dfe242" dependencies = [ - "array-init 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "glib 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", - "glib-sys 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gobject-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer 0.16.5 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer-audio-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer-base 0.16.5 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer-base-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "once_cell 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "array-init", + "bitflags", + "glib", + "glib-sys", + "gobject-sys", + "gstreamer", + "gstreamer-audio-sys", + "gstreamer-base", + "gstreamer-base-sys", + "gstreamer-sys", + "libc", + "once_cell", ] [[package]] name = "gstreamer-audio-sys" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b614d5e478ad2ff6f5699757d03f11f2868ea43164c651c60449bd0e3c6b7d75" dependencies = [ - "glib-sys 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gobject-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer-base-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "system-deps 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys", + "gobject-sys", + "gstreamer-base-sys", + "gstreamer-sys", + "libc", + "system-deps", ] [[package]] name = "gstreamer-base" version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bafd01c56f59cb10f4b5a10f97bb4bdf8c2b2784ae5b04da7e2d400cf6e6afcf" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "glib 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", - "glib-sys 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gobject-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer 0.16.5 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer-base-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "glib", + "glib-sys", + "gobject-sys", + "gstreamer", + "gstreamer-base-sys", + "gstreamer-sys", + "libc", ] [[package]] name = "gstreamer-base-sys" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4b7b6dc2d6e160a1ae28612f602bd500b3fa474ce90bf6bb2f08072682beef5" dependencies = [ - "glib-sys 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gobject-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "system-deps 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys", + "gobject-sys", + "gstreamer-sys", + "libc", + "system-deps", ] [[package]] name = "gstreamer-sys" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1f154082d01af5718c5f8a8eb4f565a4ea5586ad8833a8fc2c2aa6844b601d" dependencies = [ - "glib-sys 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gobject-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "system-deps 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", ] [[package]] name = "heck" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" dependencies = [ - "unicode-segmentation 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-segmentation", ] [[package]] name = "hermit-abi" version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" dependencies = [ - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", +] + +[[package]] +name = "instant" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" +dependencies = [ + "cfg-if 1.0.0", ] [[package]] name = "itertools" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" dependencies = [ - "either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "either", ] [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.80" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb" [[package]] name = "linked-hash-map" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" + +[[package]] +name = "lock_api" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" +dependencies = [ + "scopeguard", +] [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", ] [[package]] name = "memchr" version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" + +[[package]] +name = "mio" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f33bc887064ef1fd66020c9adfc45bb9f33d75a42096c81e7c56c65b75dd1a8b" +dependencies = [ + "libc", + "log", + "miow", + "ntapi", + "winapi", +] + +[[package]] +name = "miow" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" +dependencies = [ + "socket2", + "winapi", +] [[package]] name = "muldiv" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0419348c027fa7be448d2ae7ea0e4e04c2334c31dc4e74ab29f00a2a7ca69204" + +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi", +] [[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 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "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 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", ] [[package]] name = "num_cpus" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" dependencies = [ - "hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", ] [[package]] name = "once_cell" version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" + +[[package]] +name = "parking_lot" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c6d9b8427445284a09c55be860a15855ab580a417ccad9da88f5a06787ced0" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi", +] [[package]] name = "paste" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5d65c4d95931acda4498f675e332fcbdc9a06705cd07086c510e9b6009cd1c1" [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-internal", ] [[package]] name = "pin-project-internal" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] +[[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 = "pretty-hex" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5c99d529f0d30937f6f4b8a86d988047327bb88d04d2c4afc356de74722131" [[package]] name = "proc-macro-crate" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)", + "toml", ] [[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 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn", + "version_check", ] [[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 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "version_check", ] [[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 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid", ] [[package]] name = "quote" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", ] +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + [[package]] name = "regex" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" dependencies = [ - "aho-corasick 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "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 = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ - "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util", ] [[package]] -name = "serde" -version = "1.0.117" +name = "scopeguard" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "serde" +version = "1.0.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" dependencies = [ - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.117" +version = "1.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "serde_yaml" version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7baae0a99f1a324984bcdc5f0718384c1f69775f1c7eec8b859b71b443e3fd7" dependencies = [ - "dtoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "linked-hash-map 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "yaml-rust 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "dtoa", + "linked-hash-map", + "serde", + "yaml-rust", +] + +[[package]] +name = "signal-hook" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed" +dependencies = [ + "libc", + "mio", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-registry" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce32ea0c6c56d5eacaeb814fbed9960547021d3edd010ded1425f180536b20ab" +dependencies = [ + "libc", ] [[package]] name = "slab" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" + +[[package]] +name = "smallvec" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae524f056d7d770e174287294f562e95044c68e88dec909a00d2094805db9d75" + +[[package]] +name = "socket2" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97e0e9fd577458a4f61fb91fcb559ea2afecc54c934119421f9f5d3d5b1a1057" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "winapi", +] [[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "strum" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" [[package]] name = "strum_macros" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" dependencies = [ - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", + "heck", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "syn" -version = "1.0.53" +version = "1.0.54" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2af957a63d6bd42255c359c93d9bfdb97076bd3b820897ce55ffbfbf107f44" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] name = "system-deps" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f3ecc17269a19353b3558b313bba738b25d82993e30d62a18406a24aba4649b" dependencies = [ - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "strum 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", - "strum_macros 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)", - "version-compare 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "heck", + "pkg-config", + "strum", + "strum_macros", + "thiserror", + "toml", + "version-compare", ] [[package]] name = "textwrap" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width", ] [[package]] name = "thiserror" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9ae34b84616eedaaf1e9dd6026dbe00dcafa92aa0c8077cb69df1fcfe5e53e" dependencies = [ - "thiserror-impl 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror-impl", ] [[package]] name = "thiserror-impl" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ba20f23e85b10754cd195504aebf6a27e2e6cbe28c17778a0c930724628dd56" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "thread_local" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", +] + +[[package]] +name = "tokio" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "720ba21c25078711bf456d607987d95bce90f7c3bea5abe1db587862e7a1e87c" +dependencies = [ + "autocfg", + "pin-project-lite", + "slab", + "tokio-macros", +] + +[[package]] +name = "tokio-macros" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21d30fdbb5dc2d8f91049691aa1a9d4d4ae422a21c334ce8936e5886d30c5c45" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] name = "toml" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" dependencies = [ - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", +] + +[[package]] +name = "tui" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4e6c82bb967df89f20b875fa8835fab5d5622c6a5efa574a1f0b6d0aa6e8f6" +dependencies = [ + "bitflags", + "cassowary", + "crossterm", + "unicode-segmentation", + "unicode-width", ] [[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 = "vec_map" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version-compare" version = "0.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d63556a25bae6ea31b52e640d7c41d1ab27faba4ccb600013837a3d0b3994ca1" [[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 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file", + "winapi", + "winapi-util", ] [[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 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi", ] [[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 = "yaml-rust" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39f0c922f1a334134dc2f7a8b67dc5d25f0735263feec974345ff706bcf20b0d" dependencies = [ - "linked-hash-map 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "linked-hash-map", ] - -[metadata] -"checksum aho-corasick 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" -"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum anyhow 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)" = "bf8dcb5b4bbaa28653b647d8c77bd4ed40183b48882e130c1f1ffb73de069fd7" -"checksum array-init 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a51c983d65b6691893a791e55aa8bda43bbd9b11f947e5a9581710362277cc95" -"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -"checksum autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" -"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum bstr 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "473fc6b38233f9af7baa94fb5852dca389e3d95b8e21c8e3719301462c5d9faf" -"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -"checksum clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)" = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" -"checksum derive_more 0.99.11 (registry+https://github.com/rust-lang/crates.io-index)" = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" -"checksum dtoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" -"checksum either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" -"checksum fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -"checksum futures 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0" -"checksum futures-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64" -"checksum futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748" -"checksum futures-executor 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4caa2b2b68b880003057c1dd49f1ed937e38f22fcf6c212188a121f08cf40a65" -"checksum futures-io 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb" -"checksum futures-macro 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556" -"checksum futures-sink 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d" -"checksum futures-task 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d" -"checksum futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" -"checksum glib 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0c685013b7515e668f1b57a165b009d4d28cb139a8a989bbd699c10dad29d0c5" -"checksum glib-macros 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "41486a26d1366a8032b160b59065a59fb528530a46a49f627e7048fb8c064039" -"checksum glib-sys 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c7e9b997a66e9a23d073f2b1abb4dbfc3925e0b8952f67efd8d9b6e168e4cdc1" -"checksum globset 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c152169ef1e421390738366d2f796655fec62621dabbd0fd476f905934061e4a" -"checksum gobject-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "952133b60c318a62bf82ee75b93acc7e84028a093e06b9e27981c2b6fe68218c" -"checksum gstreamer 0.16.5 (registry+https://github.com/rust-lang/crates.io-index)" = "5d50f822055923f1cbede233aa5dfd4ee957cf328fb3076e330886094e11d6cf" -"checksum gstreamer-audio 0.16.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b926a2fa1b6756cf4087fe54ac20bb9951131efe8529dfb5c151b490d9dfe242" -"checksum gstreamer-audio-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b614d5e478ad2ff6f5699757d03f11f2868ea43164c651c60449bd0e3c6b7d75" -"checksum gstreamer-base 0.16.5 (registry+https://github.com/rust-lang/crates.io-index)" = "bafd01c56f59cb10f4b5a10f97bb4bdf8c2b2784ae5b04da7e2d400cf6e6afcf" -"checksum gstreamer-base-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a4b7b6dc2d6e160a1ae28612f602bd500b3fa474ce90bf6bb2f08072682beef5" -"checksum gstreamer-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fc1f154082d01af5718c5f8a8eb4f565a4ea5586ad8833a8fc2c2aa6844b601d" -"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -"checksum hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" -"checksum itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" -"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" -"checksum linked-hash-map 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" -"checksum log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" -"checksum memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" -"checksum muldiv 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0419348c027fa7be448d2ae7ea0e4e04c2334c31dc4e74ab29f00a2a7ca69204" -"checksum num-integer 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -"checksum num-rational 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" -"checksum num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -"checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -"checksum once_cell 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" -"checksum paste 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7151b083b0664ed58ed669fcdd92f01c3d2fdbf10af4931a301474950b52bfa9" -"checksum pin-project 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ccc2237c2c489783abd8c4c80e5450fc0e98644555b1364da68cc29aa151ca7" -"checksum pin-project-internal 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f" -"checksum pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -"checksum pkg-config 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" -"checksum pretty-hex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5c99d529f0d30937f6f4b8a86d988047327bb88d04d2c4afc356de74722131" -"checksum proc-macro-crate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -"checksum proc-macro-error 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -"checksum proc-macro-error-attr 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -"checksum proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)" = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" -"checksum proc-macro-nested 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" -"checksum proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" -"checksum quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" -"checksum regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" -"checksum regex-syntax 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" -"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -"checksum serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)" = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" -"checksum serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)" = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" -"checksum serde_yaml 0.8.14 (registry+https://github.com/rust-lang/crates.io-index)" = "f7baae0a99f1a324984bcdc5f0718384c1f69775f1c7eec8b859b71b443e3fd7" -"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -"checksum strum 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" -"checksum strum_macros 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" -"checksum syn 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)" = "8833e20724c24de12bbaba5ad230ea61c3eafb05b881c7c9d3cfe8638b187e68" -"checksum system-deps 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0f3ecc17269a19353b3558b313bba738b25d82993e30d62a18406a24aba4649b" -"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -"checksum thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "0e9ae34b84616eedaaf1e9dd6026dbe00dcafa92aa0c8077cb69df1fcfe5e53e" -"checksum thiserror-impl 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "9ba20f23e85b10754cd195504aebf6a27e2e6cbe28c17778a0c930724628dd56" -"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -"checksum toml 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)" = "75cf45bb0bef80604d001caaec0d09da99611b3c0fd39d3080468875cdb65645" -"checksum unicode-segmentation 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" -"checksum unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" -"checksum unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" -"checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" -"checksum version-compare 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d63556a25bae6ea31b52e640d7c41d1ab27faba4ccb600013837a3d0b3994ca1" -"checksum version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" -"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" -"checksum winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum yaml-rust 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "39f0c922f1a334134dc2f7a8b67dc5d25f0735263feec974345ff706bcf20b0d" diff --git a/Cargo.toml b/Cargo.toml index 300ef11..4cba9b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,3 +20,10 @@ serde_yaml = "0.8" regex = "1" globset = "0.4" derive_more = "0.99" +crossterm = "0.18" +tui = { version = "0.13", default-features = false, features = ["crossterm"] } + +[dependencies.tokio] +version = "0.3" +default-features = false +features = ["sync", "rt", "macros", "time"] diff --git a/flake.lock b/flake.lock index 44a666a..fc6a38a 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,20 @@ { "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1605370193, + "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5021eac20303a61fafe17224c087f5519baed54d", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "import-cargo": { "locked": { "lastModified": 1594305518, @@ -17,41 +32,24 @@ }, "nixpkgs": { "locked": { - "lastModified": 1606667422, - "narHash": "sha256-NhCeG6NpetMWkflygIn6vHipuxFbrKzlFScr8+PONYQ=", + "lastModified": 1608363953, + "narHash": "sha256-/gAJNaV0a9Yqx8i2CXkkw3H7LhL5Tw3aUao51S9AVKc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3c72bb875e67ad1bce805fe26a8a5d3a0e8078ed", + "rev": "453c116254abe3d7b6b9938ff8092447333db1aa", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-20.09", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1606725183, - "narHash": "sha256-QIdgDJUnT/Gq8vURmQqy1tTVpI0cWryoD9/auCAkQbE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "24eb3f87fc610f18de7076aee7c5a84ac5591e3e", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, "root": { "inputs": { + "flake-utils": "flake-utils", "import-cargo": "import-cargo", - "nixpkgs": "nixpkgs", - "nixpkgs-unstable": "nixpkgs-unstable" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index 75718a3..4f71304 100644 --- a/flake.nix +++ b/flake.nix @@ -2,18 +2,35 @@ description = "Converts audio files"; inputs = { + nixpkgs.url = github:NixOS/nixpkgs; + flake-utils.url = "github:numtide/flake-utils"; import-cargo.url = github:edolstra/import-cargo; - nixpkgs.url = github:NixOS/nixpkgs/nixos-20.09; - nixpkgs-unstable.url = github:NixOS/nixpkgs/nixos-unstable; }; - outputs = { self, nixpkgs, nixpkgs-unstable, import-cargo }: - let - inherit (import-cargo.builders) importCargo; - in { - defaultPackage.x86_64-linux = - with import nixpkgs { system = "x86_64-linux"; }; - stdenv.mkDerivation { + outputs = { self, flake-utils, nixpkgs, import-cargo }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + + buildtimeDeps = with pkgs; [ + cargo + rustc + pkg-config + ]; + + runtimeDeps = with pkgs; [ + gst_all_1.gstreamer + + # needed for opus, resample, ... + gst_all_1.gst-plugins-base + + # needed for flac + gst_all_1.gst-plugins-good + ]; + + inherit (import-cargo.builders) importCargo; + in { + defaultPackage = pkgs.stdenv.mkDerivation { name = "audio-conv"; src = self; @@ -21,22 +38,10 @@ # setupHook which makes sure that a CARGO_HOME with vendored dependencies # exists (importCargo { lockFile = ./Cargo.lock; inherit pkgs; }).cargoHome + ] + ++ buildtimeDeps; - # Build-time dependencies - cargo - rustc - pkg-config - ]; - - buildInputs = [ - gst_all_1.gstreamer - - # needed for opus, resample, ... - gst_all_1.gst-plugins-base - - # needed for flac - gst_all_1.gst-plugins-good - ]; + buildInputs = runtimeDeps; buildPhase = '' cargo build --release --offline @@ -47,25 +52,12 @@ ''; }; - devShell.x86_64-linux = - with import nixpkgs-unstable { system = "x86_64-linux"; }; - stdenv.mkDerivation { + devShell = pkgs.stdenv.mkDerivation { name = "audio-conv"; - buildInputs = [ - cargo - rustc - rustfmt - rust-analyzer - - pkg-config - gst_all_1.gstreamer - - # needed for opus, resample, ... - gst_all_1.gst-plugins-base - - # needed for flac - gst_all_1.gst-plugins-good - ]; + buildInputs = [ pkgs.rustfmt pkgs.rust-analyzer ] + ++ buildtimeDeps + ++ runtimeDeps; }; - }; + } + ); } diff --git a/src/main.rs b/src/main.rs index 8fa6c5b..499d417 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,9 @@ mod config; +mod ui; use crate::config::Config; use anyhow::{Context, Error, Result}; -use futures::{channel::mpsc, prelude::*}; +use futures::{future, pin_mut, prelude::*}; use glib::{subclass::prelude::*, GBoxed, GString}; use gstreamer::{gst_element_error, prelude::*, Element}; use gstreamer_base::prelude::*; @@ -10,10 +11,14 @@ use std::{ borrow::Cow, error::Error as StdError, ffi, fmt, + fmt::Write as FmtWrite, + io::Write as IoWrite, path::{Path, PathBuf}, result::Result as StdResult, sync::Arc, + time::Duration, }; +use tokio::{task, time::interval}; #[derive(Clone, Debug, GBoxed)] #[gboxed(type_name = "GBoxErrorWrapper")] @@ -62,13 +67,12 @@ fn gmake>(factory_name: &str) -> Result { } #[derive(Debug, Clone)] -struct ConvertionArgs { - from: PathBuf, - to: PathBuf, +pub struct ConvertionArgs { + rel_from_path: PathBuf, transcode: config::Transcode, } -fn get_path_pairs(config: Config) -> impl Iterator { +fn get_convertion_args(config: &Config) -> impl Iterator + '_ { walkdir::WalkDir::new(&config.from) .into_iter() .filter_map(|e| e.ok()) @@ -88,7 +92,9 @@ fn get_path_pairs(config: Config) -> impl Iterator { return None; }; - let mut to = config.to.join(e.path().strip_prefix(&config.from).unwrap()); + let rel_path = e.path().strip_prefix(&config.from).unwrap(); + + let mut to = config.to.join(&rel_path); to.set_extension(transcode.extension()); let is_newer = { @@ -107,54 +113,133 @@ fn get_path_pairs(config: Config) -> impl Iterator { } Some(ConvertionArgs { - from: e.path().to_path_buf(), - to, + rel_from_path: rel_path.to_path_buf(), transcode, }) }) } -fn main() -> Result<()> { - gstreamer::init()?; - let config = config::config().context("could not get the config")?; +#[tokio::main(flavor = "current_thread")] +async fn main() -> Result<()> { + task::LocalSet::new() + .run_until(async move { + let (ui_queue, ui_fut) = ui::init(); - let (pair_tx, pair_rx) = mpsc::channel(16); + let main_handle = async move { + let ok = task::spawn_local(main_loop(ui_queue)) + .await + .context("main task failed")??; + Result::<_>::Ok(ok) + }; - // move blocking directory reading to an external thread - let pair_producer = std::thread::spawn(|| { - let produce_pairs = futures::stream::iter(get_path_pairs(config)) - .map(Ok) - .forward(pair_tx) - .map(|res| res.context("sending path pairs failed")); - futures::executor::block_on(produce_pairs) + let ui_handle = async move { + let ok = task::spawn_local(ui_fut) + .await + .context("ui task failed")? + .context("ui failed")?; + Result::<_>::Ok(ok) + }; + + future::try_join(main_handle, ui_handle).await?; + Ok(()) + }) + .await +} + +async fn main_loop(ui_queue: ui::MsgQueue) -> Result<()> { + let (config, conv_args) = task::spawn_blocking(|| -> Result<_> { + gstreamer::init()?; + let config = config::config().context("could not get the config")?; + + let conv_args = get_convertion_args(&config).collect::>(); + + Ok((config, conv_args)) + }) + .await + .context("init task failed")??; + + let log_path = Path::new("./audio-conv.log") + .canonicalize() + .context("unable to canonicalize path to log file")?; + + ui_queue.push(ui::Msg::Init { + task_len: conv_args.len(), + log_path: log_path.clone(), }); - let transcoder = pair_rx.for_each_concurrent(num_cpus::get(), |args| async move { - if let Err(err) = transcode(&args).await { - println!( - "err {} => {}:\n{:?}", - args.from.display(), - args.to.display(), - err - ); - } - }); - futures::executor::block_on(transcoder); + stream::iter(conv_args.into_iter().enumerate()) + .map(Ok) + .try_for_each_concurrent(num_cpus::get(), |(i, args)| { + let config = config.clone(); + let msg_queue = ui_queue.clone(); + let log_path = &log_path; - pair_producer - .join() - .expect("directory reading thread panicked")?; + async move { + msg_queue.push(ui::Msg::TaskStart { + id: i, + args: args.clone(), + }); + + match transcode(&config, &args, i, &msg_queue).await { + Ok(()) => msg_queue.push(ui::Msg::TaskEnd { id: i }), + Err(err) => { + let err = err.context(format!( + "failed transcoding \"{}\"", + args.rel_from_path.display() + )); + + let mut log_file = match std::fs::OpenOptions::new() + .create(true) + .append(true) + .open(log_path) + { + Ok(log_file) => log_file, + Err(fs_err) => { + let err = err.context(fs_err).context("Unable to open log file"); + return Err(err); + } + }; + + let mut err_str = String::new(); + write!(&mut err_str, "{:?}\n", err).context("TODO")?; + + log_file.write_all(err_str.as_ref()).map_err(|fs_err| { + err.context(format!( + "Unable to write transcoding error to log file (fs error: {})", + fs_err + )) + })?; + + msg_queue.push(ui::Msg::TaskError { id: i }); + } + } + + Result::<_>::Ok(()) + } + }) + .await?; + + ui_queue.push(ui::Msg::Exit); Ok(()) } -async fn transcode(args: &ConvertionArgs) -> Result<()> { +async fn transcode( + config: &Config, + args: &ConvertionArgs, + task_id: usize, + queue: &ui::MsgQueue, +) -> Result<()> { + let from_path = config.from.join(&args.rel_from_path); + let mut to_path = config.to.join(&args.rel_from_path); + to_path.set_extension(args.transcode.extension()); + let file_src: Element = gmake("filesrc")?; - file_src.set_property("location", &path_to_gstring(&args.from))?; + file_src.set_property("location", &path_to_gstring(&from_path))?; // encode into a tmp file first, then rename to actuall file name, that way we're writing // "whole" files to the intended file path, ignoring partial files in the mtime check - let tmp_dest = args.to.with_extension("tmp"); + let to_path_tmp = to_path.with_extension("tmp"); let decodebin: Element = gmake("decodebin")?; @@ -170,7 +255,7 @@ async fn transcode(args: &ConvertionArgs) -> Result<()> { let transcode_args = args.transcode.clone(); - let tmp_dest_clone = tmp_dest.clone(); + let to_path_tmp_clone = to_path_tmp.clone(); decodebin.connect_pad_added(move |decodebin, src_pad| { let insert_sink = || -> Result<()> { @@ -238,7 +323,7 @@ async fn transcode(args: &ConvertionArgs) -> Result<()> { }; let file_dest: gstreamer_base::BaseSink = gmake("filesink")?; - file_dest.set_property("location", &path_to_gstring(&tmp_dest_clone))?; + file_dest.set_property("location", &path_to_gstring(&to_path_tmp_clone))?; file_dest.set_sync(false); dest_elems.push(file_dest.upcast()); @@ -277,78 +362,119 @@ async fn transcode(args: &ConvertionArgs) -> Result<()> { let bus = pipeline.get_bus().context("pipe get bus")?; std::fs::create_dir_all( - args.to + to_path .parent() - .with_context(|| format!("could not get parent dir for {}", args.to.display()))?, + .with_context(|| format!("could not get parent dir for {}", to_path.display()))?, )?; - rm_file_on_err(&tmp_dest, async { + rm_file_on_err(&to_path_tmp, async { pipeline .set_state(gstreamer::State::Playing) .context("Unable to set the pipeline to the `Playing` state")?; - bus.stream() - .map::, _>(|msg| { - use gstreamer::MessageView; + let stream_processor = async { + bus.stream() + .map::, _>(|msg| { + use gstreamer::MessageView; - match msg.view() { - MessageView::Eos(..) => { - // we need to actively stop pulling the stream, that's because stream will - // never end despite yielding an `Eos` message - Ok(false) + match msg.view() { + // MessageView::Progress() => { + + // } + MessageView::Eos(..) => { + // we need to actively stop pulling the stream, that's because stream will + // never end despite yielding an `Eos` message + Ok(false) + } + MessageView::Error(err) => { + pipeline.set_state(gstreamer::State::Null).context( + "Unable to set the pipeline to the `Null` state, after error", + )?; + + let err = err + .get_details() + .and_then(|details| { + if details.get_name() != "error-details" { + return None; + } + + let err = details + .get::<&GBoxErrorWrapper>("error") + .unwrap() + .map(|err| err.clone().into()) + .expect("error-details message without actual error"); + Some(err) + }) + .unwrap_or_else(|| { + GErrorMessage { + src: msg + .get_src() + .map(|s| String::from(s.get_path_string())) + .unwrap_or_else(|| String::from("None")), + error: err.get_error().to_string(), + debug: err.get_debug(), + source: err.get_error(), + } + .into() + }); + Err(err) + } + _ => Ok(true), } - MessageView::Error(err) => { - pipeline.set_state(gstreamer::State::Null).context( - "Unable to set the pipeline to the `Null` state, after error", - )?; - - let err = err - .get_details() - .and_then(|details| { - if details.get_name() != "error-details" { - return None; - } - - let err = details - .get::<&GBoxErrorWrapper>("error") - .unwrap() - .map(|err| err.clone().into()) - .expect("error-details message without actual error"); - Some(err) - }) - .unwrap_or_else(|| { - GErrorMessage { - src: msg - .get_src() - .map(|s| String::from(s.get_path_string())) - .unwrap_or_else(|| String::from("None")), - error: err.get_error().to_string(), - debug: err.get_debug(), - source: err.get_error(), - } - .into() - }); - Err(err) + }) + .take_while(|e| { + if let Ok(false) = e { + futures::future::ready(false) + } else { + futures::future::ready(true) } - _ => Ok(true), + }) + .try_for_each(|_| futures::future::ready(Ok(()))) + .await + .context("failed converting")?; + + Result::<_>::Ok(()) + }; + pin_mut!(stream_processor); + + let mut progress_interval = interval(Duration::from_millis(ui::UPDATE_INTERVAL_MILLIS / 2)); + let progress_processor = async { + use gstreamer::ClockTime; + + loop { + progress_interval.tick().await; + + let dur = decodebin + .query_duration::() + .and_then(|time| time.nanoseconds()); + + let ratio = dur.and_then(|dur| { + let pos = decodebin + .query_position::() + .and_then(|time| time.nanoseconds()); + + pos.map(|pos| pos as f64 / dur as f64) + }); + + if let Some(ratio) = ratio { + queue.push(ui::Msg::TaskProgress { id: task_id, ratio }); } - }) - .take_while(|e| { - if let Ok(false) = e { - futures::future::ready(false) - } else { - futures::future::ready(true) - } - }) - .try_for_each(|_| futures::future::ready(Ok(()))) + } + + #[allow(unreachable_code)] + Result::<_>::Ok(()) + }; + pin_mut!(progress_processor); + + future::try_select(stream_processor, progress_processor) .await - .context("failed converting")?; + .map_err(|err| err.factor_first().0)?; pipeline .set_state(gstreamer::State::Null) .context("Unable to set the pipeline to the `Null` state")?; - std::fs::rename(&tmp_dest, &args.to)?; + std::fs::rename(&to_path_tmp, &to_path)?; Ok(()) }) @@ -362,10 +488,13 @@ where match f.await { Err(err) => match std::fs::remove_file(path) { Ok(..) => Err(err), - Err(rm_err) if rm_err.kind() == std::io::ErrorKind::NotFound => Err(err), - Err(rm_err) => Err(rm_err) - .context(format!("removing {}", path.display())) - .context(err), + Err(fs_err) if fs_err.kind() == std::io::ErrorKind::NotFound => Err(err), + Err(fs_err) => { + let err = err + .context(fs_err) + .context(format!("removing {} failed", path.display())); + Err(err) + } }, res @ Ok(..) => res, } @@ -381,16 +510,15 @@ fn path_to_bytes(path: &Path) -> Cow<'_, [u8]> { #[cfg(windows)] { - let mut buf = Vec::::new(); // NOT TESTED // FIXME: test and post answer to https://stackoverflow.com/questions/38948669 use std::os::windows::ffi::OsStrExt; - buf.extend( - path.as_os_str() - .encode_wide() - .map(|char| char.to_ne_bytes()) - .flatten(), - ); + let buf: Vec = path + .as_os_str() + .encode_wide() + .map(|char| char.to_ne_bytes()) + .flatten() + .collect(); Cow::Owned(buf) } } diff --git a/src/ui.rs b/src/ui.rs new file mode 100644 index 0000000..3ad8e86 --- /dev/null +++ b/src/ui.rs @@ -0,0 +1,284 @@ +use crate::ConvertionArgs; +use anyhow::{Context, Result}; +use futures::Future; +use std::{ + borrow::Cow, cell::RefCell, collections::HashMap, io, mem, path::PathBuf, rc::Rc, + time::Duration, +}; +use tokio::{task, time::interval}; +use tui::{backend::CrosstermBackend, Terminal}; + +pub const UPDATE_INTERVAL_MILLIS: u64 = 100; + +#[derive(Debug)] +pub enum Msg { + Init { task_len: usize, log_path: PathBuf }, + Exit, + TaskStart { id: usize, args: ConvertionArgs }, + TaskEnd { id: usize }, + TaskProgress { id: usize, ratio: f64 }, + TaskError { id: usize }, +} + +#[derive(Debug, Clone)] +pub struct MsgQueue { + inner: Rc>>, +} + +impl MsgQueue { + fn new() -> MsgQueue { + MsgQueue { + inner: Rc::new(RefCell::new(Vec::new())), + } + } + + pub fn push(&self, msg: Msg) { + self.inner.borrow_mut().push(msg); + } + + fn swap_inner(&self, other: &mut Vec) { + let mut inner = self.inner.borrow_mut(); + mem::swap(&mut *inner, other) + } +} + +struct State { + terminal: Terminal>, + log_path: Option, + task_len: Option, + ended_tasks: usize, + running_tasks: HashMap, + has_rendered: bool, + has_errored: bool, +} + +impl State { + fn new() -> Result { + let terminal = Terminal::new(CrosstermBackend::new(io::stdout())) + .context("Unable to create ui terminal")?; + + Ok(State { + terminal, + log_path: None, + task_len: None, + ended_tasks: 0, + running_tasks: HashMap::new(), + has_rendered: false, + has_errored: false, + }) + } + + fn process_msg(&mut self, msg: Msg) -> Result { + match msg { + Msg::Init { task_len, log_path } => { + self.task_len = Some(task_len); + self.log_path = Some(log_path); + } + Msg::Exit => return Ok(false), + Msg::TaskStart { id, args } => { + self.running_tasks.insert( + id, + Task { + id, + ratio: None, + args, + }, + ); + } + Msg::TaskEnd { id } => { + self.running_tasks + .remove(&id) + .context("unable to remove finished task; could't find task")?; + self.ended_tasks += 1; + } + Msg::TaskProgress { id, ratio } => { + let mut task = self + .running_tasks + .get_mut(&id) + .context("Unable to update task progress; could't find task")?; + task.ratio = Some(ratio); + } + Msg::TaskError { id } => { + // TODO + self.running_tasks + .remove(&id) + .context("unable to remove errored task; could't find task")?; + self.ended_tasks += 1; + self.has_errored = true; + } + } + + Ok(true) + } + + fn render(&mut self) -> Result<()> { + use tui::{ + layout::{Constraint, Direction, Layout, Rect}, + style::{Color, Modifier, Style}, + text::Text, + widgets::{Block, Borders, Gauge, Paragraph}, + }; + + let task_len = if let Some(task_len) = self.task_len { + task_len + } else { + return Ok(()); + }; + + let tasks_ended = self.ended_tasks; + + let mut running_tasks: Vec<_> = self.running_tasks.values().cloned().collect(); + + running_tasks.sort_by_key(|task| task.id); + + if !self.has_rendered { + self.terminal.clear().context("cleaning ui failed")?; + self.has_rendered = true; + } + + let error_text = match self.has_errored { + true => { + let text: Cow<'static, str> = self + .log_path + .as_ref() + .map(|lp| { + let text = format!("Error(s) occurred and were logged to {}", lp.display()); + Cow::Owned(text) + }) + .unwrap_or_else(|| Cow::Borrowed("Error(s) occurred")); + Some(text) + } + false => None, + }; + + self.terminal + .draw(|f| { + let chunks = Layout::default() + .direction(Direction::Vertical) + .margin(1) + .constraints([Constraint::Percentage(90), Constraint::Percentage(10)].as_ref()) + .split(f.size()); + + let mut task_rect = chunks[0]; + + if error_text.is_some() { + task_rect.height -= 3; + } + + for (row, task) in running_tasks + .into_iter() + .take(task_rect.height as usize / 2) + .enumerate() + { + f.render_widget( + Gauge::default() + .label(task.args.rel_from_path.to_string_lossy().as_ref()) + .gauge_style( + Style::default() + .fg(Color::White) + .bg(Color::Black) + .add_modifier(Modifier::ITALIC), + ) + .ratio(task.ratio.unwrap_or(0.0)), + Rect::new( + task_rect.x, + task_rect.y + row as u16 * 2, + task_rect.width, + 1, + ), + ); + } + + if let Some(error_text) = error_text { + f.render_widget( + Paragraph::new(Text::raw(error_text)).style( + Style::default() + .fg(Color::Red) + .bg(Color::Black) + .add_modifier(Modifier::BOLD), + ), + Rect::new(task_rect.x, task_rect.height + 1, task_rect.width, 2), + ); + } + + f.render_widget( + Gauge::default() + .block( + Block::default() + .borders(Borders::ALL) + .title("Overall Progress"), + ) + .gauge_style( + Style::default() + .fg(Color::White) + .bg(Color::Black) + .add_modifier(Modifier::ITALIC), + ) + .ratio(tasks_ended as f64 / task_len as f64), + chunks[1], + ); + }) + .context("rendering ui failed")?; + + Ok(()) + } + + fn print_end_report(&mut self) -> Result<()> { + Ok(()) + } +} + +#[derive(Debug, Clone)] +struct Task { + id: usize, + ratio: Option, + args: ConvertionArgs, +} + +pub fn init() -> (MsgQueue, impl Future>) { + let queue = MsgQueue::new(); + + let queue_clone = queue.clone(); + let fut = async move { + let mut interval = interval(Duration::from_millis(UPDATE_INTERVAL_MILLIS)); + let mut wrapped = Some((Vec::new(), State::new()?)); + + loop { + interval.tick().await; + + let (mut current_queue, mut state) = wrapped.take().context("`wrapped` is None")?; + + queue_clone.swap_inner(&mut current_queue); + + let render_res = task::spawn_blocking(move || -> Result<_> { + let mut exit = false; + for msg in current_queue.drain(..) { + if !state.process_msg(msg)? { + exit = true; + } + } + + state.render()?; + + if exit { + state.print_end_report()?; + Ok(None) + } else { + Ok(Some((current_queue, state))) + } + }) + .await + .context("ui update task failed")? + .context("ui update failed")?; + + match render_res { + Some(s) => wrapped = Some(s), + None => break, + } + } + + Result::<_>::Ok(()) + }; + + (queue, fut) +}