├── .github └── workflows │ └── build.yml ├── .gitignore ├── .gitlab-ci.yml ├── CHANGELOG ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── assets └── logo.svg ├── extras ├── PKGBUILD └── lyriek.desktop ├── screenshots └── lyriek-window.png └── src ├── assets.rs ├── errors.rs ├── gui ├── gtk.rs └── mod.rs ├── main.rs ├── player.rs └── song.rs /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Rust 2 | 3 | on: [push] 4 | 5 | jobs: 6 | test: 7 | runs-on: ubuntu-18.04 8 | steps: 9 | - uses: actions/checkout@v2 10 | 11 | - name: update repositories 12 | run: sudo apt update 13 | 14 | - name: install dependencies 15 | run: sudo apt install libgtk-3-dev --no-install-recommends -y 16 | 17 | - name: Test 18 | uses: actions-rs/cargo@v1 19 | with: 20 | command: test 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | stages: 2 | - build 3 | 4 | variables: 5 | CARGO_HOME: "${CI_PROJECT_DIR}/.cargo" 6 | RUST_BACKTRACE: 1 7 | 8 | cache: 9 | paths: 10 | - .cargo/ 11 | - target/ 12 | 13 | rust-latest: 14 | stage: build 15 | image: rust:latest 16 | script: 17 | - apt update 18 | - apt install libgtk-3-dev --no-install-recommends -y 19 | - cargo test 20 | - cargo build --release 21 | - mv target/release/lyriek ./ 22 | artifacts: 23 | name: lyriek 24 | paths: 25 | - lyriek 26 | -------------------------------------------------------------------------------- /CHANGELOG: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 0.2.1 4 | 5 | ### Changes 6 | 7 | * Instantly show the current playing song instead of waiting for the lyrics 8 | 9 | ### Fixes 10 | 11 | * Changed the lyrics API (the old one has been down for over a week) 12 | 13 | ### Internal 14 | 15 | * Started work for supporting multiple graphics frontends 16 | 17 | 18 | ## 0.2.0 19 | 20 | ### Features 21 | 22 | * invalid players are now automatically skipped 23 | 24 | ### Internal 25 | 26 | * Updated GTK 27 | * Implemented a custom error type 28 | 29 | 30 | 31 | ## 0.1.0 32 | 33 | ### Features 34 | 35 | * GTK-3 UI 36 | * Automatically attempt to fetch lyrics for the currently playing song 37 | * Automatically reconnect when the connection to the player is lost 38 | * Non-blocking UI 39 | * No unsafe blocks 40 | * Fancy icon 41 | * Fairly lightweight 42 | * ~ 10 Mib memory usage 43 | * ~ 4 MB binary size 44 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "aho-corasick" 5 | version = "0.7.6" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | checksum = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" 8 | dependencies = [ 9 | "memchr", 10 | ] 11 | 12 | [[package]] 13 | name = "anyhow" 14 | version = "1.0.32" 15 | source = "registry+https://github.com/rust-lang/crates.io-index" 16 | checksum = "6b602bfe940d21c130f3895acd65221e8a61270debe89d628b9cb4e3ccb8569b" 17 | 18 | [[package]] 19 | name = "atk" 20 | version = "0.9.0" 21 | source = "registry+https://github.com/rust-lang/crates.io-index" 22 | checksum = "812b4911e210bd51b24596244523c856ca749e6223c50a7fbbba3f89ee37c426" 23 | dependencies = [ 24 | "atk-sys", 25 | "bitflags", 26 | "glib", 27 | "glib-sys", 28 | "gobject-sys", 29 | "libc", 30 | ] 31 | 32 | [[package]] 33 | name = "atk-sys" 34 | version = "0.10.0" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | checksum = "f530e4af131d94cc4fa15c5c9d0348f0ef28bac64ba660b6b2a1cf2605dedfce" 37 | dependencies = [ 38 | "glib-sys", 39 | "gobject-sys", 40 | "libc", 41 | "system-deps", 42 | ] 43 | 44 | [[package]] 45 | name = "atty" 46 | version = "0.2.13" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" 49 | dependencies = [ 50 | "libc", 51 | "winapi", 52 | ] 53 | 54 | [[package]] 55 | name = "autocfg" 56 | version = "1.0.1" 57 | source = "registry+https://github.com/rust-lang/crates.io-index" 58 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" 59 | 60 | [[package]] 61 | name = "backtrace" 62 | version = "0.3.35" 63 | source = "registry+https://github.com/rust-lang/crates.io-index" 64 | checksum = "1371048253fa3bac6704bfd6bbfc922ee9bdcee8881330d40f308b81cc5adc55" 65 | dependencies = [ 66 | "backtrace-sys", 67 | "cfg-if 0.1.10", 68 | "libc", 69 | "rustc-demangle", 70 | ] 71 | 72 | [[package]] 73 | name = "backtrace-sys" 74 | version = "0.1.31" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b" 77 | dependencies = [ 78 | "cc", 79 | "libc", 80 | ] 81 | 82 | [[package]] 83 | name = "base64" 84 | version = "0.13.0" 85 | source = "registry+https://github.com/rust-lang/crates.io-index" 86 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 87 | 88 | [[package]] 89 | name = "bitflags" 90 | version = "1.2.1" 91 | source = "registry+https://github.com/rust-lang/crates.io-index" 92 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 93 | 94 | [[package]] 95 | name = "buf-min" 96 | version = "0.1.1" 97 | source = "registry+https://github.com/rust-lang/crates.io-index" 98 | checksum = "b6ae7069aad07c7cdefe6a22a671f00650728bd2331a4cc62e1e5d0becdf9ca4" 99 | dependencies = [ 100 | "bytes 0.5.6", 101 | ] 102 | 103 | [[package]] 104 | name = "bumpalo" 105 | version = "3.4.0" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" 108 | 109 | [[package]] 110 | name = "bytes" 111 | version = "0.5.6" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" 114 | 115 | [[package]] 116 | name = "bytes" 117 | version = "1.0.1" 118 | source = "registry+https://github.com/rust-lang/crates.io-index" 119 | checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" 120 | 121 | [[package]] 122 | name = "c2-chacha" 123 | version = "0.2.2" 124 | source = "registry+https://github.com/rust-lang/crates.io-index" 125 | checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" 126 | dependencies = [ 127 | "lazy_static", 128 | "ppv-lite86", 129 | ] 130 | 131 | [[package]] 132 | name = "cairo-rs" 133 | version = "0.9.1" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | checksum = "c5c0f2e047e8ca53d0ff249c54ae047931d7a6ebe05d00af73e0ffeb6e34bdb8" 136 | dependencies = [ 137 | "bitflags", 138 | "cairo-sys-rs", 139 | "glib", 140 | "glib-sys", 141 | "gobject-sys", 142 | "libc", 143 | "thiserror", 144 | ] 145 | 146 | [[package]] 147 | name = "cairo-sys-rs" 148 | version = "0.10.0" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "2ed2639b9ad5f1d6efa76de95558e11339e7318426d84ac4890b86c03e828ca7" 151 | dependencies = [ 152 | "glib-sys", 153 | "libc", 154 | "system-deps", 155 | ] 156 | 157 | [[package]] 158 | name = "cc" 159 | version = "1.0.40" 160 | source = "registry+https://github.com/rust-lang/crates.io-index" 161 | checksum = "b548a4ee81fccb95919d4e22cfea83c7693ebfd78f0495493178db20b3139da7" 162 | 163 | [[package]] 164 | name = "cfg-if" 165 | version = "0.1.10" 166 | source = "registry+https://github.com/rust-lang/crates.io-index" 167 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 168 | 169 | [[package]] 170 | name = "cfg-if" 171 | version = "1.0.0" 172 | source = "registry+https://github.com/rust-lang/crates.io-index" 173 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 174 | 175 | [[package]] 176 | name = "core-foundation" 177 | version = "0.9.1" 178 | source = "registry+https://github.com/rust-lang/crates.io-index" 179 | checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" 180 | dependencies = [ 181 | "core-foundation-sys", 182 | "libc", 183 | ] 184 | 185 | [[package]] 186 | name = "core-foundation-sys" 187 | version = "0.8.2" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" 190 | 191 | [[package]] 192 | name = "darling" 193 | version = "0.4.0" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "2a78af487e4eb8f4421a1770687b328af6bb4494ca93435210678c6eea875c11" 196 | dependencies = [ 197 | "darling_core", 198 | "darling_macro", 199 | ] 200 | 201 | [[package]] 202 | name = "darling_core" 203 | version = "0.4.0" 204 | source = "registry+https://github.com/rust-lang/crates.io-index" 205 | checksum = "b315f49c7b6db3708bca6e6913c194581a44ec619b7a39e131d4dd63733a3698" 206 | dependencies = [ 207 | "ident_case", 208 | "proc-macro2 0.3.8", 209 | "quote 0.5.2", 210 | "syn 0.13.11", 211 | ] 212 | 213 | [[package]] 214 | name = "darling_macro" 215 | version = "0.4.0" 216 | source = "registry+https://github.com/rust-lang/crates.io-index" 217 | checksum = "eb69a38fdeaeaf3db712e1df170de67ee9dfc24fb88ca3e9d21e703ec25a4d8e" 218 | dependencies = [ 219 | "darling_core", 220 | "quote 0.5.2", 221 | "syn 0.13.11", 222 | ] 223 | 224 | [[package]] 225 | name = "dbus" 226 | version = "0.6.5" 227 | source = "registry+https://github.com/rust-lang/crates.io-index" 228 | checksum = "48b5f0f36f1eebe901b0e6bee369a77ed3396334bf3f09abd46454a576f71819" 229 | dependencies = [ 230 | "libc", 231 | "libdbus-sys", 232 | ] 233 | 234 | [[package]] 235 | name = "derive_is_enum_variant" 236 | version = "0.1.1" 237 | source = "registry+https://github.com/rust-lang/crates.io-index" 238 | checksum = "d0ac8859845146979953797f03cc5b282fb4396891807cdb3d04929a88418197" 239 | dependencies = [ 240 | "heck", 241 | "quote 0.3.15", 242 | "syn 0.11.11", 243 | ] 244 | 245 | [[package]] 246 | name = "derive_more" 247 | version = "0.99.11" 248 | source = "registry+https://github.com/rust-lang/crates.io-index" 249 | checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" 250 | dependencies = [ 251 | "proc-macro2 1.0.26", 252 | "quote 1.0.2", 253 | "syn 1.0.68", 254 | ] 255 | 256 | [[package]] 257 | name = "either" 258 | version = "1.5.2" 259 | source = "registry+https://github.com/rust-lang/crates.io-index" 260 | checksum = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" 261 | 262 | [[package]] 263 | name = "encoding_rs" 264 | version = "0.8.17" 265 | source = "registry+https://github.com/rust-lang/crates.io-index" 266 | checksum = "4155785c79f2f6701f185eb2e6b4caf0555ec03477cb4c70db67b465311620ed" 267 | dependencies = [ 268 | "cfg-if 0.1.10", 269 | ] 270 | 271 | [[package]] 272 | name = "enum-kinds" 273 | version = "0.4.1" 274 | source = "registry+https://github.com/rust-lang/crates.io-index" 275 | checksum = "d0f21c374dea848c19071b1504ca5ad03c9ad0d03d2e509e68f6623b8fcac4b5" 276 | dependencies = [ 277 | "quote 0.4.2", 278 | "syn 0.12.15", 279 | ] 280 | 281 | [[package]] 282 | name = "env_logger" 283 | version = "0.7.1" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" 286 | dependencies = [ 287 | "atty", 288 | "humantime", 289 | "log", 290 | "regex", 291 | "termcolor", 292 | ] 293 | 294 | [[package]] 295 | name = "error-chain" 296 | version = "0.10.0" 297 | source = "registry+https://github.com/rust-lang/crates.io-index" 298 | checksum = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" 299 | 300 | [[package]] 301 | name = "failure" 302 | version = "0.1.5" 303 | source = "registry+https://github.com/rust-lang/crates.io-index" 304 | checksum = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" 305 | dependencies = [ 306 | "backtrace", 307 | "failure_derive", 308 | ] 309 | 310 | [[package]] 311 | name = "failure_derive" 312 | version = "0.1.5" 313 | source = "registry+https://github.com/rust-lang/crates.io-index" 314 | checksum = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" 315 | dependencies = [ 316 | "proc-macro2 0.4.30", 317 | "quote 0.6.13", 318 | "syn 0.15.44", 319 | "synstructure", 320 | ] 321 | 322 | [[package]] 323 | name = "fnv" 324 | version = "1.0.6" 325 | source = "registry+https://github.com/rust-lang/crates.io-index" 326 | checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" 327 | 328 | [[package]] 329 | name = "foreign-types" 330 | version = "0.3.2" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 333 | dependencies = [ 334 | "foreign-types-shared", 335 | ] 336 | 337 | [[package]] 338 | name = "foreign-types-shared" 339 | version = "0.1.1" 340 | source = "registry+https://github.com/rust-lang/crates.io-index" 341 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 342 | 343 | [[package]] 344 | name = "form_urlencoded" 345 | version = "1.0.1" 346 | source = "registry+https://github.com/rust-lang/crates.io-index" 347 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" 348 | dependencies = [ 349 | "matches", 350 | "percent-encoding", 351 | ] 352 | 353 | [[package]] 354 | name = "from_variants" 355 | version = "0.3.0" 356 | source = "registry+https://github.com/rust-lang/crates.io-index" 357 | checksum = "557a27056175c8ecad545ace83508e10092dc8ae34b313c9ad8c8a72b4390b3f" 358 | dependencies = [ 359 | "from_variants_impl", 360 | ] 361 | 362 | [[package]] 363 | name = "from_variants_impl" 364 | version = "0.3.0" 365 | source = "registry+https://github.com/rust-lang/crates.io-index" 366 | checksum = "fc4f4e9b9f5c806f457759523a6c85826aa261115571d3e635f34d890104fbcd" 367 | dependencies = [ 368 | "darling", 369 | "error-chain", 370 | "quote 0.5.2", 371 | "syn 0.13.11", 372 | ] 373 | 374 | [[package]] 375 | name = "futures" 376 | version = "0.3.5" 377 | source = "registry+https://github.com/rust-lang/crates.io-index" 378 | checksum = "1e05b85ec287aac0dc34db7d4a569323df697f9c55b99b15d6b4ef8cde49f613" 379 | dependencies = [ 380 | "futures-channel", 381 | "futures-core", 382 | "futures-executor", 383 | "futures-io", 384 | "futures-sink", 385 | "futures-task", 386 | "futures-util", 387 | ] 388 | 389 | [[package]] 390 | name = "futures-channel" 391 | version = "0.3.5" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" 394 | dependencies = [ 395 | "futures-core", 396 | "futures-sink", 397 | ] 398 | 399 | [[package]] 400 | name = "futures-core" 401 | version = "0.3.5" 402 | source = "registry+https://github.com/rust-lang/crates.io-index" 403 | checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" 404 | 405 | [[package]] 406 | name = "futures-executor" 407 | version = "0.3.5" 408 | source = "registry+https://github.com/rust-lang/crates.io-index" 409 | checksum = "10d6bb888be1153d3abeb9006b11b02cf5e9b209fda28693c31ae1e4e012e314" 410 | dependencies = [ 411 | "futures-core", 412 | "futures-task", 413 | "futures-util", 414 | ] 415 | 416 | [[package]] 417 | name = "futures-io" 418 | version = "0.3.5" 419 | source = "registry+https://github.com/rust-lang/crates.io-index" 420 | checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" 421 | 422 | [[package]] 423 | name = "futures-macro" 424 | version = "0.3.5" 425 | source = "registry+https://github.com/rust-lang/crates.io-index" 426 | checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" 427 | dependencies = [ 428 | "proc-macro-hack", 429 | "proc-macro2 1.0.26", 430 | "quote 1.0.2", 431 | "syn 1.0.68", 432 | ] 433 | 434 | [[package]] 435 | name = "futures-sink" 436 | version = "0.3.5" 437 | source = "registry+https://github.com/rust-lang/crates.io-index" 438 | checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" 439 | 440 | [[package]] 441 | name = "futures-task" 442 | version = "0.3.5" 443 | source = "registry+https://github.com/rust-lang/crates.io-index" 444 | checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" 445 | dependencies = [ 446 | "once_cell", 447 | ] 448 | 449 | [[package]] 450 | name = "futures-util" 451 | version = "0.3.5" 452 | source = "registry+https://github.com/rust-lang/crates.io-index" 453 | checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" 454 | dependencies = [ 455 | "futures-channel", 456 | "futures-core", 457 | "futures-io", 458 | "futures-macro", 459 | "futures-sink", 460 | "futures-task", 461 | "memchr", 462 | "pin-project 0.4.23", 463 | "pin-utils", 464 | "proc-macro-hack", 465 | "proc-macro-nested", 466 | "slab", 467 | ] 468 | 469 | [[package]] 470 | name = "gdk" 471 | version = "0.13.2" 472 | source = "registry+https://github.com/rust-lang/crates.io-index" 473 | checksum = "db00839b2a68a7a10af3fa28dfb3febaba3a20c3a9ac2425a33b7df1f84a6b7d" 474 | dependencies = [ 475 | "bitflags", 476 | "cairo-rs", 477 | "cairo-sys-rs", 478 | "gdk-pixbuf", 479 | "gdk-sys", 480 | "gio", 481 | "gio-sys", 482 | "glib", 483 | "glib-sys", 484 | "gobject-sys", 485 | "libc", 486 | "pango", 487 | ] 488 | 489 | [[package]] 490 | name = "gdk-pixbuf" 491 | version = "0.9.0" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "8f6dae3cb99dd49b758b88f0132f8d401108e63ae8edd45f432d42cdff99998a" 494 | dependencies = [ 495 | "gdk-pixbuf-sys", 496 | "gio", 497 | "gio-sys", 498 | "glib", 499 | "glib-sys", 500 | "gobject-sys", 501 | "libc", 502 | ] 503 | 504 | [[package]] 505 | name = "gdk-pixbuf-sys" 506 | version = "0.10.0" 507 | source = "registry+https://github.com/rust-lang/crates.io-index" 508 | checksum = "3bfe468a7f43e97b8d193a762b6c5cf67a7d36cacbc0b9291dbcae24bfea1e8f" 509 | dependencies = [ 510 | "gio-sys", 511 | "glib-sys", 512 | "gobject-sys", 513 | "libc", 514 | "system-deps", 515 | ] 516 | 517 | [[package]] 518 | name = "gdk-sys" 519 | version = "0.10.0" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "0a9653cfc500fd268015b1ac055ddbc3df7a5c9ea3f4ccef147b3957bd140d69" 522 | dependencies = [ 523 | "cairo-sys-rs", 524 | "gdk-pixbuf-sys", 525 | "gio-sys", 526 | "glib-sys", 527 | "gobject-sys", 528 | "libc", 529 | "pango-sys", 530 | "pkg-config", 531 | "system-deps", 532 | ] 533 | 534 | [[package]] 535 | name = "getrandom" 536 | version = "0.1.10" 537 | source = "registry+https://github.com/rust-lang/crates.io-index" 538 | checksum = "6171a6cc63fbabbe27c2b5ee268e8b7fe5dc1eb0dd2dfad537c1dfed6f69117e" 539 | dependencies = [ 540 | "cfg-if 0.1.10", 541 | "libc", 542 | "wasi", 543 | ] 544 | 545 | [[package]] 546 | name = "gio" 547 | version = "0.9.1" 548 | source = "registry+https://github.com/rust-lang/crates.io-index" 549 | checksum = "1fb60242bfff700772dae5d9e3a1f7aa2e4ebccf18b89662a16acb2822568561" 550 | dependencies = [ 551 | "bitflags", 552 | "futures", 553 | "futures-channel", 554 | "futures-core", 555 | "futures-io", 556 | "futures-util", 557 | "gio-sys", 558 | "glib", 559 | "glib-sys", 560 | "gobject-sys", 561 | "libc", 562 | "once_cell", 563 | "thiserror", 564 | ] 565 | 566 | [[package]] 567 | name = "gio-sys" 568 | version = "0.10.1" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | checksum = "5e24fb752f8f5d2cf6bbc2c606fd2bc989c81c5e2fe321ab974d54f8b6344eac" 571 | dependencies = [ 572 | "glib-sys", 573 | "gobject-sys", 574 | "libc", 575 | "system-deps", 576 | "winapi", 577 | ] 578 | 579 | [[package]] 580 | name = "glib" 581 | version = "0.10.2" 582 | source = "registry+https://github.com/rust-lang/crates.io-index" 583 | checksum = "5f11a45bde4cf9567653a14ff96cdbb01e6d2a89651746dbc118319dfdac433e" 584 | dependencies = [ 585 | "bitflags", 586 | "futures-channel", 587 | "futures-core", 588 | "futures-executor", 589 | "futures-task", 590 | "futures-util", 591 | "glib-macros", 592 | "glib-sys", 593 | "gobject-sys", 594 | "libc", 595 | "once_cell", 596 | ] 597 | 598 | [[package]] 599 | name = "glib-macros" 600 | version = "0.10.1" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "41486a26d1366a8032b160b59065a59fb528530a46a49f627e7048fb8c064039" 603 | dependencies = [ 604 | "anyhow", 605 | "heck", 606 | "itertools", 607 | "proc-macro-crate", 608 | "proc-macro-error", 609 | "proc-macro2 1.0.26", 610 | "quote 1.0.2", 611 | "syn 1.0.68", 612 | ] 613 | 614 | [[package]] 615 | name = "glib-sys" 616 | version = "0.10.1" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | checksum = "c7e9b997a66e9a23d073f2b1abb4dbfc3925e0b8952f67efd8d9b6e168e4cdc1" 619 | dependencies = [ 620 | "libc", 621 | "system-deps", 622 | ] 623 | 624 | [[package]] 625 | name = "gobject-sys" 626 | version = "0.10.0" 627 | source = "registry+https://github.com/rust-lang/crates.io-index" 628 | checksum = "952133b60c318a62bf82ee75b93acc7e84028a093e06b9e27981c2b6fe68218c" 629 | dependencies = [ 630 | "glib-sys", 631 | "libc", 632 | "system-deps", 633 | ] 634 | 635 | [[package]] 636 | name = "gtk" 637 | version = "0.9.2" 638 | source = "registry+https://github.com/rust-lang/crates.io-index" 639 | checksum = "2f022f2054072b3af07666341984562c8e626a79daa8be27b955d12d06a5ad6a" 640 | dependencies = [ 641 | "atk", 642 | "bitflags", 643 | "cairo-rs", 644 | "cairo-sys-rs", 645 | "cc", 646 | "gdk", 647 | "gdk-pixbuf", 648 | "gdk-pixbuf-sys", 649 | "gdk-sys", 650 | "gio", 651 | "gio-sys", 652 | "glib", 653 | "glib-sys", 654 | "gobject-sys", 655 | "gtk-sys", 656 | "libc", 657 | "once_cell", 658 | "pango", 659 | "pango-sys", 660 | "pkg-config", 661 | ] 662 | 663 | [[package]] 664 | name = "gtk-sys" 665 | version = "0.10.0" 666 | source = "registry+https://github.com/rust-lang/crates.io-index" 667 | checksum = "89acda6f084863307d948ba64a4b1ef674e8527dddab147ee4cdcc194c880457" 668 | dependencies = [ 669 | "atk-sys", 670 | "cairo-sys-rs", 671 | "gdk-pixbuf-sys", 672 | "gdk-sys", 673 | "gio-sys", 674 | "glib-sys", 675 | "gobject-sys", 676 | "libc", 677 | "pango-sys", 678 | "system-deps", 679 | ] 680 | 681 | [[package]] 682 | name = "h2" 683 | version = "0.3.2" 684 | source = "registry+https://github.com/rust-lang/crates.io-index" 685 | checksum = "fc018e188373e2777d0ef2467ebff62a08e66c3f5857b23c8fbec3018210dc00" 686 | dependencies = [ 687 | "bytes 1.0.1", 688 | "fnv", 689 | "futures-core", 690 | "futures-sink", 691 | "futures-util", 692 | "http", 693 | "indexmap", 694 | "slab", 695 | "tokio", 696 | "tokio-util", 697 | "tracing", 698 | ] 699 | 700 | [[package]] 701 | name = "hashbrown" 702 | version = "0.9.1" 703 | source = "registry+https://github.com/rust-lang/crates.io-index" 704 | checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" 705 | 706 | [[package]] 707 | name = "heck" 708 | version = "0.3.1" 709 | source = "registry+https://github.com/rust-lang/crates.io-index" 710 | checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" 711 | dependencies = [ 712 | "unicode-segmentation", 713 | ] 714 | 715 | [[package]] 716 | name = "hermit-abi" 717 | version = "0.1.15" 718 | source = "registry+https://github.com/rust-lang/crates.io-index" 719 | checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" 720 | dependencies = [ 721 | "libc", 722 | ] 723 | 724 | [[package]] 725 | name = "http" 726 | version = "0.2.1" 727 | source = "registry+https://github.com/rust-lang/crates.io-index" 728 | checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" 729 | dependencies = [ 730 | "bytes 0.5.6", 731 | "fnv", 732 | "itoa", 733 | ] 734 | 735 | [[package]] 736 | name = "http-body" 737 | version = "0.4.1" 738 | source = "registry+https://github.com/rust-lang/crates.io-index" 739 | checksum = "5dfb77c123b4e2f72a2069aeae0b4b4949cc7e966df277813fc16347e7549737" 740 | dependencies = [ 741 | "bytes 1.0.1", 742 | "http", 743 | "pin-project-lite", 744 | ] 745 | 746 | [[package]] 747 | name = "httparse" 748 | version = "1.3.4" 749 | source = "registry+https://github.com/rust-lang/crates.io-index" 750 | checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" 751 | 752 | [[package]] 753 | name = "httpdate" 754 | version = "0.3.2" 755 | source = "registry+https://github.com/rust-lang/crates.io-index" 756 | checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" 757 | 758 | [[package]] 759 | name = "humantime" 760 | version = "1.3.0" 761 | source = "registry+https://github.com/rust-lang/crates.io-index" 762 | checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" 763 | dependencies = [ 764 | "quick-error", 765 | ] 766 | 767 | [[package]] 768 | name = "hyper" 769 | version = "0.14.5" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | checksum = "8bf09f61b52cfcf4c00de50df88ae423d6c02354e385a86341133b5338630ad1" 772 | dependencies = [ 773 | "bytes 1.0.1", 774 | "futures-channel", 775 | "futures-core", 776 | "futures-util", 777 | "h2", 778 | "http", 779 | "http-body", 780 | "httparse", 781 | "httpdate", 782 | "itoa", 783 | "pin-project 1.0.6", 784 | "socket2", 785 | "tokio", 786 | "tower-service", 787 | "tracing", 788 | "want", 789 | ] 790 | 791 | [[package]] 792 | name = "hyper-tls" 793 | version = "0.5.0" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 796 | dependencies = [ 797 | "bytes 1.0.1", 798 | "hyper", 799 | "native-tls", 800 | "tokio", 801 | "tokio-native-tls", 802 | ] 803 | 804 | [[package]] 805 | name = "ident_case" 806 | version = "1.0.1" 807 | source = "registry+https://github.com/rust-lang/crates.io-index" 808 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 809 | 810 | [[package]] 811 | name = "idna" 812 | version = "0.2.0" 813 | source = "registry+https://github.com/rust-lang/crates.io-index" 814 | checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" 815 | dependencies = [ 816 | "matches", 817 | "unicode-bidi", 818 | "unicode-normalization", 819 | ] 820 | 821 | [[package]] 822 | name = "indexmap" 823 | version = "1.6.2" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" 826 | dependencies = [ 827 | "autocfg", 828 | "hashbrown", 829 | ] 830 | 831 | [[package]] 832 | name = "ipnet" 833 | version = "2.3.0" 834 | source = "registry+https://github.com/rust-lang/crates.io-index" 835 | checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" 836 | 837 | [[package]] 838 | name = "itertools" 839 | version = "0.9.0" 840 | source = "registry+https://github.com/rust-lang/crates.io-index" 841 | checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" 842 | dependencies = [ 843 | "either", 844 | ] 845 | 846 | [[package]] 847 | name = "itoa" 848 | version = "0.4.4" 849 | source = "registry+https://github.com/rust-lang/crates.io-index" 850 | checksum = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" 851 | 852 | [[package]] 853 | name = "js-sys" 854 | version = "0.3.45" 855 | source = "registry+https://github.com/rust-lang/crates.io-index" 856 | checksum = "ca059e81d9486668f12d455a4ea6daa600bd408134cd17e3d3fb5a32d1f016f8" 857 | dependencies = [ 858 | "wasm-bindgen", 859 | ] 860 | 861 | [[package]] 862 | name = "lazy_static" 863 | version = "1.4.0" 864 | source = "registry+https://github.com/rust-lang/crates.io-index" 865 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 866 | 867 | [[package]] 868 | name = "libc" 869 | version = "0.2.92" 870 | source = "registry+https://github.com/rust-lang/crates.io-index" 871 | checksum = "56d855069fafbb9b344c0f962150cd2c1187975cb1c22c1522c240d8c4986714" 872 | 873 | [[package]] 874 | name = "libdbus-sys" 875 | version = "0.2.0" 876 | source = "registry+https://github.com/rust-lang/crates.io-index" 877 | checksum = "69382cb3be797cfe62ba89ac5e594a0e3022914ff44867ffbcfc03daa24eebd7" 878 | dependencies = [ 879 | "pkg-config", 880 | ] 881 | 882 | [[package]] 883 | name = "log" 884 | version = "0.4.8" 885 | source = "registry+https://github.com/rust-lang/crates.io-index" 886 | checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" 887 | dependencies = [ 888 | "cfg-if 0.1.10", 889 | ] 890 | 891 | [[package]] 892 | name = "lyriek" 893 | version = "0.2.1" 894 | dependencies = [ 895 | "derive_more", 896 | "env_logger", 897 | "gdk-pixbuf", 898 | "gtk", 899 | "log", 900 | "mpris", 901 | "relm", 902 | "relm-derive", 903 | "reqwest", 904 | "serde", 905 | "serde_derive", 906 | "url", 907 | "v_htmlescape", 908 | ] 909 | 910 | [[package]] 911 | name = "matches" 912 | version = "0.1.8" 913 | source = "registry+https://github.com/rust-lang/crates.io-index" 914 | checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 915 | 916 | [[package]] 917 | name = "memchr" 918 | version = "2.2.1" 919 | source = "registry+https://github.com/rust-lang/crates.io-index" 920 | checksum = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" 921 | 922 | [[package]] 923 | name = "mime" 924 | version = "0.3.16" 925 | source = "registry+https://github.com/rust-lang/crates.io-index" 926 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 927 | 928 | [[package]] 929 | name = "mio" 930 | version = "0.7.11" 931 | source = "registry+https://github.com/rust-lang/crates.io-index" 932 | checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956" 933 | dependencies = [ 934 | "libc", 935 | "log", 936 | "miow", 937 | "ntapi", 938 | "winapi", 939 | ] 940 | 941 | [[package]] 942 | name = "miow" 943 | version = "0.3.7" 944 | source = "registry+https://github.com/rust-lang/crates.io-index" 945 | checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" 946 | dependencies = [ 947 | "winapi", 948 | ] 949 | 950 | [[package]] 951 | name = "mpris" 952 | version = "1.1.2" 953 | source = "registry+https://github.com/rust-lang/crates.io-index" 954 | checksum = "818520e449f43cd196bc4fdbd163d4f437f36481c2d4573dca4614bb89e4aef3" 955 | dependencies = [ 956 | "dbus", 957 | "derive_is_enum_variant", 958 | "enum-kinds", 959 | "failure", 960 | "failure_derive", 961 | "from_variants", 962 | ] 963 | 964 | [[package]] 965 | name = "native-tls" 966 | version = "0.2.7" 967 | source = "registry+https://github.com/rust-lang/crates.io-index" 968 | checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4" 969 | dependencies = [ 970 | "lazy_static", 971 | "libc", 972 | "log", 973 | "openssl", 974 | "openssl-probe", 975 | "openssl-sys", 976 | "schannel", 977 | "security-framework", 978 | "security-framework-sys", 979 | "tempfile", 980 | ] 981 | 982 | [[package]] 983 | name = "nom" 984 | version = "4.2.3" 985 | source = "registry+https://github.com/rust-lang/crates.io-index" 986 | checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" 987 | dependencies = [ 988 | "memchr", 989 | "version_check 0.1.5", 990 | ] 991 | 992 | [[package]] 993 | name = "ntapi" 994 | version = "0.3.6" 995 | source = "registry+https://github.com/rust-lang/crates.io-index" 996 | checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" 997 | dependencies = [ 998 | "winapi", 999 | ] 1000 | 1001 | [[package]] 1002 | name = "num_cpus" 1003 | version = "1.13.0" 1004 | source = "registry+https://github.com/rust-lang/crates.io-index" 1005 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" 1006 | dependencies = [ 1007 | "hermit-abi", 1008 | "libc", 1009 | ] 1010 | 1011 | [[package]] 1012 | name = "once_cell" 1013 | version = "1.7.2" 1014 | source = "registry+https://github.com/rust-lang/crates.io-index" 1015 | checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" 1016 | 1017 | [[package]] 1018 | name = "openssl" 1019 | version = "0.10.33" 1020 | source = "registry+https://github.com/rust-lang/crates.io-index" 1021 | checksum = "a61075b62a23fef5a29815de7536d940aa35ce96d18ce0cc5076272db678a577" 1022 | dependencies = [ 1023 | "bitflags", 1024 | "cfg-if 1.0.0", 1025 | "foreign-types", 1026 | "libc", 1027 | "once_cell", 1028 | "openssl-sys", 1029 | ] 1030 | 1031 | [[package]] 1032 | name = "openssl-probe" 1033 | version = "0.1.2" 1034 | source = "registry+https://github.com/rust-lang/crates.io-index" 1035 | checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" 1036 | 1037 | [[package]] 1038 | name = "openssl-sys" 1039 | version = "0.9.61" 1040 | source = "registry+https://github.com/rust-lang/crates.io-index" 1041 | checksum = "313752393519e876837e09e1fa183ddef0be7735868dced3196f4472d536277f" 1042 | dependencies = [ 1043 | "autocfg", 1044 | "cc", 1045 | "libc", 1046 | "pkg-config", 1047 | "vcpkg", 1048 | ] 1049 | 1050 | [[package]] 1051 | name = "pango" 1052 | version = "0.9.1" 1053 | source = "registry+https://github.com/rust-lang/crates.io-index" 1054 | checksum = "9937068580bebd8ced19975938573803273ccbcbd598c58d4906efd4ac87c438" 1055 | dependencies = [ 1056 | "bitflags", 1057 | "glib", 1058 | "glib-sys", 1059 | "gobject-sys", 1060 | "libc", 1061 | "once_cell", 1062 | "pango-sys", 1063 | ] 1064 | 1065 | [[package]] 1066 | name = "pango-sys" 1067 | version = "0.10.0" 1068 | source = "registry+https://github.com/rust-lang/crates.io-index" 1069 | checksum = "24d2650c8b62d116c020abd0cea26a4ed96526afda89b1c4ea567131fdefc890" 1070 | dependencies = [ 1071 | "glib-sys", 1072 | "gobject-sys", 1073 | "libc", 1074 | "system-deps", 1075 | ] 1076 | 1077 | [[package]] 1078 | name = "percent-encoding" 1079 | version = "2.1.0" 1080 | source = "registry+https://github.com/rust-lang/crates.io-index" 1081 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 1082 | 1083 | [[package]] 1084 | name = "pin-project" 1085 | version = "0.4.23" 1086 | source = "registry+https://github.com/rust-lang/crates.io-index" 1087 | checksum = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa" 1088 | dependencies = [ 1089 | "pin-project-internal 0.4.23", 1090 | ] 1091 | 1092 | [[package]] 1093 | name = "pin-project" 1094 | version = "1.0.6" 1095 | source = "registry+https://github.com/rust-lang/crates.io-index" 1096 | checksum = "bc174859768806e91ae575187ada95c91a29e96a98dc5d2cd9a1fed039501ba6" 1097 | dependencies = [ 1098 | "pin-project-internal 1.0.6", 1099 | ] 1100 | 1101 | [[package]] 1102 | name = "pin-project-internal" 1103 | version = "0.4.23" 1104 | source = "registry+https://github.com/rust-lang/crates.io-index" 1105 | checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" 1106 | dependencies = [ 1107 | "proc-macro2 1.0.26", 1108 | "quote 1.0.2", 1109 | "syn 1.0.68", 1110 | ] 1111 | 1112 | [[package]] 1113 | name = "pin-project-internal" 1114 | version = "1.0.6" 1115 | source = "registry+https://github.com/rust-lang/crates.io-index" 1116 | checksum = "a490329918e856ed1b083f244e3bfe2d8c4f336407e4ea9e1a9f479ff09049e5" 1117 | dependencies = [ 1118 | "proc-macro2 1.0.26", 1119 | "quote 1.0.2", 1120 | "syn 1.0.68", 1121 | ] 1122 | 1123 | [[package]] 1124 | name = "pin-project-lite" 1125 | version = "0.2.6" 1126 | source = "registry+https://github.com/rust-lang/crates.io-index" 1127 | checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" 1128 | 1129 | [[package]] 1130 | name = "pin-utils" 1131 | version = "0.1.0" 1132 | source = "registry+https://github.com/rust-lang/crates.io-index" 1133 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1134 | 1135 | [[package]] 1136 | name = "pkg-config" 1137 | version = "0.3.15" 1138 | source = "registry+https://github.com/rust-lang/crates.io-index" 1139 | checksum = "a7c1d2cfa5a714db3b5f24f0915e74fcdf91d09d496ba61329705dda7774d2af" 1140 | 1141 | [[package]] 1142 | name = "ppv-lite86" 1143 | version = "0.2.5" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | checksum = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" 1146 | 1147 | [[package]] 1148 | name = "proc-macro-crate" 1149 | version = "0.1.5" 1150 | source = "registry+https://github.com/rust-lang/crates.io-index" 1151 | checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" 1152 | dependencies = [ 1153 | "toml", 1154 | ] 1155 | 1156 | [[package]] 1157 | name = "proc-macro-error" 1158 | version = "1.0.4" 1159 | source = "registry+https://github.com/rust-lang/crates.io-index" 1160 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 1161 | dependencies = [ 1162 | "proc-macro-error-attr", 1163 | "proc-macro2 1.0.26", 1164 | "quote 1.0.2", 1165 | "syn 1.0.68", 1166 | "version_check 0.9.2", 1167 | ] 1168 | 1169 | [[package]] 1170 | name = "proc-macro-error-attr" 1171 | version = "1.0.4" 1172 | source = "registry+https://github.com/rust-lang/crates.io-index" 1173 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 1174 | dependencies = [ 1175 | "proc-macro2 1.0.26", 1176 | "quote 1.0.2", 1177 | "version_check 0.9.2", 1178 | ] 1179 | 1180 | [[package]] 1181 | name = "proc-macro-hack" 1182 | version = "0.5.18" 1183 | source = "registry+https://github.com/rust-lang/crates.io-index" 1184 | checksum = "99c605b9a0adc77b7211c6b1f722dcb613d68d66859a44f3d485a6da332b0598" 1185 | 1186 | [[package]] 1187 | name = "proc-macro-nested" 1188 | version = "0.1.6" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" 1191 | 1192 | [[package]] 1193 | name = "proc-macro2" 1194 | version = "0.2.3" 1195 | source = "registry+https://github.com/rust-lang/crates.io-index" 1196 | checksum = "cd07deb3c6d1d9ff827999c7f9b04cdfd66b1b17ae508e14fe47b620f2282ae0" 1197 | dependencies = [ 1198 | "unicode-xid 0.1.0", 1199 | ] 1200 | 1201 | [[package]] 1202 | name = "proc-macro2" 1203 | version = "0.3.8" 1204 | source = "registry+https://github.com/rust-lang/crates.io-index" 1205 | checksum = "1b06e2f335f48d24442b35a19df506a835fb3547bc3c06ef27340da9acf5cae7" 1206 | dependencies = [ 1207 | "unicode-xid 0.1.0", 1208 | ] 1209 | 1210 | [[package]] 1211 | name = "proc-macro2" 1212 | version = "0.4.30" 1213 | source = "registry+https://github.com/rust-lang/crates.io-index" 1214 | checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" 1215 | dependencies = [ 1216 | "unicode-xid 0.1.0", 1217 | ] 1218 | 1219 | [[package]] 1220 | name = "proc-macro2" 1221 | version = "1.0.26" 1222 | source = "registry+https://github.com/rust-lang/crates.io-index" 1223 | checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" 1224 | dependencies = [ 1225 | "unicode-xid 0.2.0", 1226 | ] 1227 | 1228 | [[package]] 1229 | name = "quick-error" 1230 | version = "1.2.2" 1231 | source = "registry+https://github.com/rust-lang/crates.io-index" 1232 | checksum = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" 1233 | 1234 | [[package]] 1235 | name = "quote" 1236 | version = "0.3.15" 1237 | source = "registry+https://github.com/rust-lang/crates.io-index" 1238 | checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" 1239 | 1240 | [[package]] 1241 | name = "quote" 1242 | version = "0.4.2" 1243 | source = "registry+https://github.com/rust-lang/crates.io-index" 1244 | checksum = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408" 1245 | dependencies = [ 1246 | "proc-macro2 0.2.3", 1247 | ] 1248 | 1249 | [[package]] 1250 | name = "quote" 1251 | version = "0.5.2" 1252 | source = "registry+https://github.com/rust-lang/crates.io-index" 1253 | checksum = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" 1254 | dependencies = [ 1255 | "proc-macro2 0.3.8", 1256 | ] 1257 | 1258 | [[package]] 1259 | name = "quote" 1260 | version = "0.6.13" 1261 | source = "registry+https://github.com/rust-lang/crates.io-index" 1262 | checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" 1263 | dependencies = [ 1264 | "proc-macro2 0.4.30", 1265 | ] 1266 | 1267 | [[package]] 1268 | name = "quote" 1269 | version = "1.0.2" 1270 | source = "registry+https://github.com/rust-lang/crates.io-index" 1271 | checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" 1272 | dependencies = [ 1273 | "proc-macro2 1.0.26", 1274 | ] 1275 | 1276 | [[package]] 1277 | name = "rand" 1278 | version = "0.7.0" 1279 | source = "registry+https://github.com/rust-lang/crates.io-index" 1280 | checksum = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" 1281 | dependencies = [ 1282 | "getrandom", 1283 | "libc", 1284 | "rand_chacha", 1285 | "rand_core", 1286 | "rand_hc", 1287 | ] 1288 | 1289 | [[package]] 1290 | name = "rand_chacha" 1291 | version = "0.2.1" 1292 | source = "registry+https://github.com/rust-lang/crates.io-index" 1293 | checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" 1294 | dependencies = [ 1295 | "c2-chacha", 1296 | "rand_core", 1297 | ] 1298 | 1299 | [[package]] 1300 | name = "rand_core" 1301 | version = "0.5.0" 1302 | source = "registry+https://github.com/rust-lang/crates.io-index" 1303 | checksum = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" 1304 | dependencies = [ 1305 | "getrandom", 1306 | ] 1307 | 1308 | [[package]] 1309 | name = "rand_hc" 1310 | version = "0.2.0" 1311 | source = "registry+https://github.com/rust-lang/crates.io-index" 1312 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 1313 | dependencies = [ 1314 | "rand_core", 1315 | ] 1316 | 1317 | [[package]] 1318 | name = "redox_syscall" 1319 | version = "0.1.56" 1320 | source = "registry+https://github.com/rust-lang/crates.io-index" 1321 | checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" 1322 | 1323 | [[package]] 1324 | name = "regex" 1325 | version = "1.2.1" 1326 | source = "registry+https://github.com/rust-lang/crates.io-index" 1327 | checksum = "88c3d9193984285d544df4a30c23a4e62ead42edf70a4452ceb76dac1ce05c26" 1328 | dependencies = [ 1329 | "aho-corasick", 1330 | "memchr", 1331 | "regex-syntax", 1332 | "thread_local", 1333 | ] 1334 | 1335 | [[package]] 1336 | name = "regex-syntax" 1337 | version = "0.6.11" 1338 | source = "registry+https://github.com/rust-lang/crates.io-index" 1339 | checksum = "b143cceb2ca5e56d5671988ef8b15615733e7ee16cd348e064333b251b89343f" 1340 | 1341 | [[package]] 1342 | name = "relm" 1343 | version = "0.20.0" 1344 | source = "registry+https://github.com/rust-lang/crates.io-index" 1345 | checksum = "6814cb3502d3edb83435a777c27bee4fcce4613a36884a2a1b7ee36df9f1978a" 1346 | dependencies = [ 1347 | "cairo-rs", 1348 | "glib", 1349 | "glib-sys", 1350 | "gobject-sys", 1351 | "gtk", 1352 | "libc", 1353 | "log", 1354 | "quote 0.6.13", 1355 | "syn 0.15.44", 1356 | ] 1357 | 1358 | [[package]] 1359 | name = "relm-derive" 1360 | version = "0.20.0" 1361 | source = "registry+https://github.com/rust-lang/crates.io-index" 1362 | checksum = "cd3820afe557690469806fa09d5bca7cc13db66358eea330fa7db9bc8baf5827" 1363 | dependencies = [ 1364 | "lazy_static", 1365 | "proc-macro2 0.4.30", 1366 | "quote 0.6.13", 1367 | "syn 0.15.44", 1368 | ] 1369 | 1370 | [[package]] 1371 | name = "remove_dir_all" 1372 | version = "0.5.2" 1373 | source = "registry+https://github.com/rust-lang/crates.io-index" 1374 | checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" 1375 | dependencies = [ 1376 | "winapi", 1377 | ] 1378 | 1379 | [[package]] 1380 | name = "reqwest" 1381 | version = "0.11.2" 1382 | source = "registry+https://github.com/rust-lang/crates.io-index" 1383 | checksum = "bf12057f289428dbf5c591c74bf10392e4a8003f993405a902f20117019022d4" 1384 | dependencies = [ 1385 | "base64", 1386 | "bytes 1.0.1", 1387 | "encoding_rs", 1388 | "futures-core", 1389 | "futures-util", 1390 | "http", 1391 | "http-body", 1392 | "hyper", 1393 | "hyper-tls", 1394 | "ipnet", 1395 | "js-sys", 1396 | "lazy_static", 1397 | "log", 1398 | "mime", 1399 | "native-tls", 1400 | "percent-encoding", 1401 | "pin-project-lite", 1402 | "serde", 1403 | "serde_json", 1404 | "serde_urlencoded", 1405 | "tokio", 1406 | "tokio-native-tls", 1407 | "url", 1408 | "wasm-bindgen", 1409 | "wasm-bindgen-futures", 1410 | "web-sys", 1411 | "winreg", 1412 | ] 1413 | 1414 | [[package]] 1415 | name = "rustc-demangle" 1416 | version = "0.1.16" 1417 | source = "registry+https://github.com/rust-lang/crates.io-index" 1418 | checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" 1419 | 1420 | [[package]] 1421 | name = "ryu" 1422 | version = "1.0.0" 1423 | source = "registry+https://github.com/rust-lang/crates.io-index" 1424 | checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" 1425 | 1426 | [[package]] 1427 | name = "schannel" 1428 | version = "0.1.19" 1429 | source = "registry+https://github.com/rust-lang/crates.io-index" 1430 | checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" 1431 | dependencies = [ 1432 | "lazy_static", 1433 | "winapi", 1434 | ] 1435 | 1436 | [[package]] 1437 | name = "security-framework" 1438 | version = "2.2.0" 1439 | source = "registry+https://github.com/rust-lang/crates.io-index" 1440 | checksum = "3670b1d2fdf6084d192bc71ead7aabe6c06aa2ea3fbd9cc3ac111fa5c2b1bd84" 1441 | dependencies = [ 1442 | "bitflags", 1443 | "core-foundation", 1444 | "core-foundation-sys", 1445 | "libc", 1446 | "security-framework-sys", 1447 | ] 1448 | 1449 | [[package]] 1450 | name = "security-framework-sys" 1451 | version = "2.2.0" 1452 | source = "registry+https://github.com/rust-lang/crates.io-index" 1453 | checksum = "3676258fd3cfe2c9a0ec99ce3038798d847ce3e4bb17746373eb9f0f1ac16339" 1454 | dependencies = [ 1455 | "core-foundation-sys", 1456 | "libc", 1457 | ] 1458 | 1459 | [[package]] 1460 | name = "serde" 1461 | version = "1.0.99" 1462 | source = "registry+https://github.com/rust-lang/crates.io-index" 1463 | checksum = "fec2851eb56d010dc9a21b89ca53ee75e6528bab60c11e89d38390904982da9f" 1464 | 1465 | [[package]] 1466 | name = "serde_derive" 1467 | version = "1.0.99" 1468 | source = "registry+https://github.com/rust-lang/crates.io-index" 1469 | checksum = "cb4dc18c61206b08dc98216c98faa0232f4337e1e1b8574551d5bad29ea1b425" 1470 | dependencies = [ 1471 | "proc-macro2 1.0.26", 1472 | "quote 1.0.2", 1473 | "syn 1.0.68", 1474 | ] 1475 | 1476 | [[package]] 1477 | name = "serde_json" 1478 | version = "1.0.40" 1479 | source = "registry+https://github.com/rust-lang/crates.io-index" 1480 | checksum = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" 1481 | dependencies = [ 1482 | "itoa", 1483 | "ryu", 1484 | "serde", 1485 | ] 1486 | 1487 | [[package]] 1488 | name = "serde_urlencoded" 1489 | version = "0.7.0" 1490 | source = "registry+https://github.com/rust-lang/crates.io-index" 1491 | checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" 1492 | dependencies = [ 1493 | "form_urlencoded", 1494 | "itoa", 1495 | "ryu", 1496 | "serde", 1497 | ] 1498 | 1499 | [[package]] 1500 | name = "slab" 1501 | version = "0.4.2" 1502 | source = "registry+https://github.com/rust-lang/crates.io-index" 1503 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 1504 | 1505 | [[package]] 1506 | name = "smallvec" 1507 | version = "0.6.10" 1508 | source = "registry+https://github.com/rust-lang/crates.io-index" 1509 | checksum = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" 1510 | 1511 | [[package]] 1512 | name = "socket2" 1513 | version = "0.4.0" 1514 | source = "registry+https://github.com/rust-lang/crates.io-index" 1515 | checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2" 1516 | dependencies = [ 1517 | "libc", 1518 | "winapi", 1519 | ] 1520 | 1521 | [[package]] 1522 | name = "strum" 1523 | version = "0.18.0" 1524 | source = "registry+https://github.com/rust-lang/crates.io-index" 1525 | checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" 1526 | 1527 | [[package]] 1528 | name = "strum_macros" 1529 | version = "0.18.0" 1530 | source = "registry+https://github.com/rust-lang/crates.io-index" 1531 | checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" 1532 | dependencies = [ 1533 | "heck", 1534 | "proc-macro2 1.0.26", 1535 | "quote 1.0.2", 1536 | "syn 1.0.68", 1537 | ] 1538 | 1539 | [[package]] 1540 | name = "syn" 1541 | version = "0.11.11" 1542 | source = "registry+https://github.com/rust-lang/crates.io-index" 1543 | checksum = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" 1544 | dependencies = [ 1545 | "quote 0.3.15", 1546 | "synom", 1547 | "unicode-xid 0.0.4", 1548 | ] 1549 | 1550 | [[package]] 1551 | name = "syn" 1552 | version = "0.12.15" 1553 | source = "registry+https://github.com/rust-lang/crates.io-index" 1554 | checksum = "c97c05b8ebc34ddd6b967994d5c6e9852fa92f8b82b3858c39451f97346dcce5" 1555 | dependencies = [ 1556 | "proc-macro2 0.2.3", 1557 | "quote 0.4.2", 1558 | "unicode-xid 0.1.0", 1559 | ] 1560 | 1561 | [[package]] 1562 | name = "syn" 1563 | version = "0.13.11" 1564 | source = "registry+https://github.com/rust-lang/crates.io-index" 1565 | checksum = "14f9bf6292f3a61d2c716723fdb789a41bbe104168e6f496dc6497e531ea1b9b" 1566 | dependencies = [ 1567 | "proc-macro2 0.3.8", 1568 | "quote 0.5.2", 1569 | "unicode-xid 0.1.0", 1570 | ] 1571 | 1572 | [[package]] 1573 | name = "syn" 1574 | version = "0.15.44" 1575 | source = "registry+https://github.com/rust-lang/crates.io-index" 1576 | checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" 1577 | dependencies = [ 1578 | "proc-macro2 0.4.30", 1579 | "quote 0.6.13", 1580 | "unicode-xid 0.1.0", 1581 | ] 1582 | 1583 | [[package]] 1584 | name = "syn" 1585 | version = "1.0.68" 1586 | source = "registry+https://github.com/rust-lang/crates.io-index" 1587 | checksum = "3ce15dd3ed8aa2f8eeac4716d6ef5ab58b6b9256db41d7e1a0224c2788e8fd87" 1588 | dependencies = [ 1589 | "proc-macro2 1.0.26", 1590 | "quote 1.0.2", 1591 | "unicode-xid 0.2.0", 1592 | ] 1593 | 1594 | [[package]] 1595 | name = "synom" 1596 | version = "0.11.3" 1597 | source = "registry+https://github.com/rust-lang/crates.io-index" 1598 | checksum = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" 1599 | dependencies = [ 1600 | "unicode-xid 0.0.4", 1601 | ] 1602 | 1603 | [[package]] 1604 | name = "synstructure" 1605 | version = "0.10.2" 1606 | source = "registry+https://github.com/rust-lang/crates.io-index" 1607 | checksum = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" 1608 | dependencies = [ 1609 | "proc-macro2 0.4.30", 1610 | "quote 0.6.13", 1611 | "syn 0.15.44", 1612 | "unicode-xid 0.1.0", 1613 | ] 1614 | 1615 | [[package]] 1616 | name = "system-deps" 1617 | version = "1.3.2" 1618 | source = "registry+https://github.com/rust-lang/crates.io-index" 1619 | checksum = "0f3ecc17269a19353b3558b313bba738b25d82993e30d62a18406a24aba4649b" 1620 | dependencies = [ 1621 | "heck", 1622 | "pkg-config", 1623 | "strum", 1624 | "strum_macros", 1625 | "thiserror", 1626 | "toml", 1627 | "version-compare", 1628 | ] 1629 | 1630 | [[package]] 1631 | name = "tempfile" 1632 | version = "3.1.0" 1633 | source = "registry+https://github.com/rust-lang/crates.io-index" 1634 | checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" 1635 | dependencies = [ 1636 | "cfg-if 0.1.10", 1637 | "libc", 1638 | "rand", 1639 | "redox_syscall", 1640 | "remove_dir_all", 1641 | "winapi", 1642 | ] 1643 | 1644 | [[package]] 1645 | name = "termcolor" 1646 | version = "1.0.5" 1647 | source = "registry+https://github.com/rust-lang/crates.io-index" 1648 | checksum = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e" 1649 | dependencies = [ 1650 | "wincolor", 1651 | ] 1652 | 1653 | [[package]] 1654 | name = "thiserror" 1655 | version = "1.0.20" 1656 | source = "registry+https://github.com/rust-lang/crates.io-index" 1657 | checksum = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08" 1658 | dependencies = [ 1659 | "thiserror-impl", 1660 | ] 1661 | 1662 | [[package]] 1663 | name = "thiserror-impl" 1664 | version = "1.0.20" 1665 | source = "registry+https://github.com/rust-lang/crates.io-index" 1666 | checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" 1667 | dependencies = [ 1668 | "proc-macro2 1.0.26", 1669 | "quote 1.0.2", 1670 | "syn 1.0.68", 1671 | ] 1672 | 1673 | [[package]] 1674 | name = "thread_local" 1675 | version = "0.3.6" 1676 | source = "registry+https://github.com/rust-lang/crates.io-index" 1677 | checksum = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 1678 | dependencies = [ 1679 | "lazy_static", 1680 | ] 1681 | 1682 | [[package]] 1683 | name = "tokio" 1684 | version = "1.4.0" 1685 | source = "registry+https://github.com/rust-lang/crates.io-index" 1686 | checksum = "134af885d758d645f0f0505c9a8b3f9bf8a348fd822e112ab5248138348f1722" 1687 | dependencies = [ 1688 | "autocfg", 1689 | "bytes 1.0.1", 1690 | "libc", 1691 | "memchr", 1692 | "mio", 1693 | "num_cpus", 1694 | "pin-project-lite", 1695 | ] 1696 | 1697 | [[package]] 1698 | name = "tokio-native-tls" 1699 | version = "0.3.0" 1700 | source = "registry+https://github.com/rust-lang/crates.io-index" 1701 | checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" 1702 | dependencies = [ 1703 | "native-tls", 1704 | "tokio", 1705 | ] 1706 | 1707 | [[package]] 1708 | name = "tokio-util" 1709 | version = "0.6.5" 1710 | source = "registry+https://github.com/rust-lang/crates.io-index" 1711 | checksum = "5143d049e85af7fbc36f5454d990e62c2df705b3589f123b71f441b6b59f443f" 1712 | dependencies = [ 1713 | "bytes 1.0.1", 1714 | "futures-core", 1715 | "futures-sink", 1716 | "log", 1717 | "pin-project-lite", 1718 | "tokio", 1719 | ] 1720 | 1721 | [[package]] 1722 | name = "toml" 1723 | version = "0.5.6" 1724 | source = "registry+https://github.com/rust-lang/crates.io-index" 1725 | checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" 1726 | dependencies = [ 1727 | "serde", 1728 | ] 1729 | 1730 | [[package]] 1731 | name = "tower-service" 1732 | version = "0.3.0" 1733 | source = "registry+https://github.com/rust-lang/crates.io-index" 1734 | checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" 1735 | 1736 | [[package]] 1737 | name = "tracing" 1738 | version = "0.1.25" 1739 | source = "registry+https://github.com/rust-lang/crates.io-index" 1740 | checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" 1741 | dependencies = [ 1742 | "cfg-if 1.0.0", 1743 | "pin-project-lite", 1744 | "tracing-core", 1745 | ] 1746 | 1747 | [[package]] 1748 | name = "tracing-core" 1749 | version = "0.1.17" 1750 | source = "registry+https://github.com/rust-lang/crates.io-index" 1751 | checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" 1752 | dependencies = [ 1753 | "lazy_static", 1754 | ] 1755 | 1756 | [[package]] 1757 | name = "try-lock" 1758 | version = "0.2.2" 1759 | source = "registry+https://github.com/rust-lang/crates.io-index" 1760 | checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" 1761 | 1762 | [[package]] 1763 | name = "unicode-bidi" 1764 | version = "0.3.4" 1765 | source = "registry+https://github.com/rust-lang/crates.io-index" 1766 | checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 1767 | dependencies = [ 1768 | "matches", 1769 | ] 1770 | 1771 | [[package]] 1772 | name = "unicode-normalization" 1773 | version = "0.1.8" 1774 | source = "registry+https://github.com/rust-lang/crates.io-index" 1775 | checksum = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" 1776 | dependencies = [ 1777 | "smallvec", 1778 | ] 1779 | 1780 | [[package]] 1781 | name = "unicode-segmentation" 1782 | version = "1.3.0" 1783 | source = "registry+https://github.com/rust-lang/crates.io-index" 1784 | checksum = "1967f4cdfc355b37fd76d2a954fb2ed3871034eb4f26d60537d88795cfc332a9" 1785 | 1786 | [[package]] 1787 | name = "unicode-xid" 1788 | version = "0.0.4" 1789 | source = "registry+https://github.com/rust-lang/crates.io-index" 1790 | checksum = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" 1791 | 1792 | [[package]] 1793 | name = "unicode-xid" 1794 | version = "0.1.0" 1795 | source = "registry+https://github.com/rust-lang/crates.io-index" 1796 | checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 1797 | 1798 | [[package]] 1799 | name = "unicode-xid" 1800 | version = "0.2.0" 1801 | source = "registry+https://github.com/rust-lang/crates.io-index" 1802 | checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" 1803 | 1804 | [[package]] 1805 | name = "url" 1806 | version = "2.2.1" 1807 | source = "registry+https://github.com/rust-lang/crates.io-index" 1808 | checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b" 1809 | dependencies = [ 1810 | "form_urlencoded", 1811 | "idna", 1812 | "matches", 1813 | "percent-encoding", 1814 | ] 1815 | 1816 | [[package]] 1817 | name = "v_escape" 1818 | version = "0.12.1" 1819 | source = "registry+https://github.com/rust-lang/crates.io-index" 1820 | checksum = "7b2d5ca56f0412d5ad5e642202e5c8fb61b61ad39435a53ed501fbd45380e8d3" 1821 | dependencies = [ 1822 | "buf-min", 1823 | "v_escape_derive", 1824 | ] 1825 | 1826 | [[package]] 1827 | name = "v_escape_derive" 1828 | version = "0.8.1" 1829 | source = "registry+https://github.com/rust-lang/crates.io-index" 1830 | checksum = "cae7cffca0b1f9af9b20610f6fdeee9ffcce61417b5ad186a5d482dc904e24cd" 1831 | dependencies = [ 1832 | "nom", 1833 | "proc-macro2 1.0.26", 1834 | "quote 1.0.2", 1835 | "syn 1.0.68", 1836 | ] 1837 | 1838 | [[package]] 1839 | name = "v_htmlescape" 1840 | version = "0.10.0" 1841 | source = "registry+https://github.com/rust-lang/crates.io-index" 1842 | checksum = "f5fd25529cb2f78527b5ee507bcfb357b26d057b5e480853c26d49a4ead5c629" 1843 | dependencies = [ 1844 | "cfg-if 0.1.10", 1845 | "v_escape", 1846 | ] 1847 | 1848 | [[package]] 1849 | name = "vcpkg" 1850 | version = "0.2.11" 1851 | source = "registry+https://github.com/rust-lang/crates.io-index" 1852 | checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" 1853 | 1854 | [[package]] 1855 | name = "version-compare" 1856 | version = "0.0.10" 1857 | source = "registry+https://github.com/rust-lang/crates.io-index" 1858 | checksum = "d63556a25bae6ea31b52e640d7c41d1ab27faba4ccb600013837a3d0b3994ca1" 1859 | 1860 | [[package]] 1861 | name = "version_check" 1862 | version = "0.1.5" 1863 | source = "registry+https://github.com/rust-lang/crates.io-index" 1864 | checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" 1865 | 1866 | [[package]] 1867 | name = "version_check" 1868 | version = "0.9.2" 1869 | source = "registry+https://github.com/rust-lang/crates.io-index" 1870 | checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" 1871 | 1872 | [[package]] 1873 | name = "want" 1874 | version = "0.3.0" 1875 | source = "registry+https://github.com/rust-lang/crates.io-index" 1876 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1877 | dependencies = [ 1878 | "log", 1879 | "try-lock", 1880 | ] 1881 | 1882 | [[package]] 1883 | name = "wasi" 1884 | version = "0.5.0" 1885 | source = "registry+https://github.com/rust-lang/crates.io-index" 1886 | checksum = "fd5442abcac6525a045cc8c795aedb60da7a2e5e89c7bf18a0d5357849bb23c7" 1887 | 1888 | [[package]] 1889 | name = "wasm-bindgen" 1890 | version = "0.2.68" 1891 | source = "registry+https://github.com/rust-lang/crates.io-index" 1892 | checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42" 1893 | dependencies = [ 1894 | "cfg-if 0.1.10", 1895 | "serde", 1896 | "serde_json", 1897 | "wasm-bindgen-macro", 1898 | ] 1899 | 1900 | [[package]] 1901 | name = "wasm-bindgen-backend" 1902 | version = "0.2.68" 1903 | source = "registry+https://github.com/rust-lang/crates.io-index" 1904 | checksum = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68" 1905 | dependencies = [ 1906 | "bumpalo", 1907 | "lazy_static", 1908 | "log", 1909 | "proc-macro2 1.0.26", 1910 | "quote 1.0.2", 1911 | "syn 1.0.68", 1912 | "wasm-bindgen-shared", 1913 | ] 1914 | 1915 | [[package]] 1916 | name = "wasm-bindgen-futures" 1917 | version = "0.4.18" 1918 | source = "registry+https://github.com/rust-lang/crates.io-index" 1919 | checksum = "b7866cab0aa01de1edf8b5d7936938a7e397ee50ce24119aef3e1eaa3b6171da" 1920 | dependencies = [ 1921 | "cfg-if 0.1.10", 1922 | "js-sys", 1923 | "wasm-bindgen", 1924 | "web-sys", 1925 | ] 1926 | 1927 | [[package]] 1928 | name = "wasm-bindgen-macro" 1929 | version = "0.2.68" 1930 | source = "registry+https://github.com/rust-lang/crates.io-index" 1931 | checksum = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038" 1932 | dependencies = [ 1933 | "quote 1.0.2", 1934 | "wasm-bindgen-macro-support", 1935 | ] 1936 | 1937 | [[package]] 1938 | name = "wasm-bindgen-macro-support" 1939 | version = "0.2.68" 1940 | source = "registry+https://github.com/rust-lang/crates.io-index" 1941 | checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe" 1942 | dependencies = [ 1943 | "proc-macro2 1.0.26", 1944 | "quote 1.0.2", 1945 | "syn 1.0.68", 1946 | "wasm-bindgen-backend", 1947 | "wasm-bindgen-shared", 1948 | ] 1949 | 1950 | [[package]] 1951 | name = "wasm-bindgen-shared" 1952 | version = "0.2.68" 1953 | source = "registry+https://github.com/rust-lang/crates.io-index" 1954 | checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307" 1955 | 1956 | [[package]] 1957 | name = "web-sys" 1958 | version = "0.3.45" 1959 | source = "registry+https://github.com/rust-lang/crates.io-index" 1960 | checksum = "4bf6ef87ad7ae8008e15a355ce696bed26012b7caa21605188cfd8214ab51e2d" 1961 | dependencies = [ 1962 | "js-sys", 1963 | "wasm-bindgen", 1964 | ] 1965 | 1966 | [[package]] 1967 | name = "winapi" 1968 | version = "0.3.9" 1969 | source = "registry+https://github.com/rust-lang/crates.io-index" 1970 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1971 | dependencies = [ 1972 | "winapi-i686-pc-windows-gnu", 1973 | "winapi-x86_64-pc-windows-gnu", 1974 | ] 1975 | 1976 | [[package]] 1977 | name = "winapi-i686-pc-windows-gnu" 1978 | version = "0.4.0" 1979 | source = "registry+https://github.com/rust-lang/crates.io-index" 1980 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1981 | 1982 | [[package]] 1983 | name = "winapi-util" 1984 | version = "0.1.2" 1985 | source = "registry+https://github.com/rust-lang/crates.io-index" 1986 | checksum = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" 1987 | dependencies = [ 1988 | "winapi", 1989 | ] 1990 | 1991 | [[package]] 1992 | name = "winapi-x86_64-pc-windows-gnu" 1993 | version = "0.4.0" 1994 | source = "registry+https://github.com/rust-lang/crates.io-index" 1995 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1996 | 1997 | [[package]] 1998 | name = "wincolor" 1999 | version = "1.0.2" 2000 | source = "registry+https://github.com/rust-lang/crates.io-index" 2001 | checksum = "96f5016b18804d24db43cebf3c77269e7569b8954a8464501c216cc5e070eaa9" 2002 | dependencies = [ 2003 | "winapi", 2004 | "winapi-util", 2005 | ] 2006 | 2007 | [[package]] 2008 | name = "winreg" 2009 | version = "0.7.0" 2010 | source = "registry+https://github.com/rust-lang/crates.io-index" 2011 | checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" 2012 | dependencies = [ 2013 | "winapi", 2014 | ] 2015 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "lyriek" 3 | version = "0.2.1" 4 | authors = ["Bart Willems "] 5 | edition = "2018" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [features] 10 | default = ["gui-gtk"] 11 | gui-gtk = ["gtk", "gdk-pixbuf", "relm", "relm-derive"] 12 | gui-iced = [] 13 | 14 | [dependencies] 15 | derive_more = "0.99" 16 | env_logger = "0.7.1" 17 | log = "0.4" 18 | mpris = "1.1" 19 | reqwest = { features = ["blocking", "json"], version = "0.11" } 20 | serde = "1.0" 21 | serde_derive = "1.0" 22 | url = "2.1" 23 | v_htmlescape = "0.10.0" 24 | 25 | gdk-pixbuf = { version = "0.9", optional = true} 26 | gtk = { version = "0.9", optional = true} 27 | relm = { version = "0.20", optional = true} 28 | relm-derive = { version = "0.20", optional = true} 29 | 30 | 31 | [profile.release] 32 | lto = true 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | lyriek 635 | Copyright (C) 2019 Bart Willems 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | lyriek Copyright (C) 2019 Bart Willems 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Lyriek 2 | 3 | A multi-threaded GTK 3 application for fetching the lyrics of the current playing song. 4 | 5 | ![lyriek window](screenshots/lyriek-window.png) 6 | 7 | ## Installation 8 | 9 | ### Arch Linux 10 | 11 | ``` 12 | yay -S lyriek 13 | ``` 14 | 15 | ### Ubuntu 16 | 17 | ``` 18 | apt install libgtk-3-dev --no-install-recommends 19 | cargo build --release 20 | ``` 21 | 22 | ## Troubleshooting 23 | 24 | ### No Active Player 25 | 26 | Lyriek uses [MPRIS](https://wiki.archlinux.org/index.php/MPRIS) to get song information. 27 | 28 | If you see `no active player`, that means that you either have no media player running, or your media player doesn't communicate to D-Bus using MPRIS. 29 | -------------------------------------------------------------------------------- /assets/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 23 | 25 | 29 | 34 | 40 | 45 | 50 | 56 | 57 | 61 | 66 | 72 | 77 | 82 | 88 | 89 | 90 | 110 | 115 | 116 | 118 | 119 | 121 | image/svg+xml 122 | 124 | 125 | 126 | 127 | 128 | 133 | 143 | 144 | 151 | Ly 166 | 167 | 173 | 177 | 181 | 185 | 186 | 187 | 188 | -------------------------------------------------------------------------------- /extras/PKGBUILD: -------------------------------------------------------------------------------- 1 | pkgname=lyriek-git 2 | pkgver=0.1.0.18.g15d1373 3 | pkgrel=1 4 | arch=('x86_64' 'i686') 5 | url="https://gitlab.com/bartwillems/lyriek" 6 | license=('GPL3') 7 | depends=('dbus' 'gtk3') 8 | makedepends=('rust' 'cargo' 'git' 'desktop-file-utils') 9 | source=("lyriek::git+https://gitlab.com/bartwillems/lyriek.git") 10 | sha256sums=('SKIP') 11 | 12 | pkgver() { 13 | cd "$srcdir/lyriek" 14 | echo "$(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2|cut -d\- -f1).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)" 15 | } 16 | 17 | build() { 18 | cd "$srcdir/lyriek" 19 | cargo build --release 20 | } 21 | 22 | package() { 23 | pkgdesc="A multi-threaded GTK application to fetch lyrics of currently playing songs" 24 | provides=('lyriek') 25 | 26 | cd "$srcdir/lyriek" 27 | 28 | desktop-file-install -m 644 --dir "$pkgdir/usr/share/applications/" "extras/lyriek.desktop" 29 | install -D -m755 "target/release/lyriek" "$pkgdir/usr/bin/lyriek" 30 | install -D -m644 "assets/logo.svg" "$pkgdir/usr/share/icons/hicolor/scalable/apps/lyriek.svg" 31 | } 32 | -------------------------------------------------------------------------------- /extras/lyriek.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Lyriek 3 | GenericName=Lyriek 4 | Comment=Automatically fetch lyrics from currently playing music. 5 | Categories=Music;GTK 6 | Icon=lyriek 7 | Exec=lyriek 8 | Terminal=false 9 | Type=Application 10 | -------------------------------------------------------------------------------- /screenshots/lyriek-window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BartWillems/lyriek/7ae4c903c86e8e198eb2fc9830a966c3e47787d6/screenshots/lyriek-window.png -------------------------------------------------------------------------------- /src/assets.rs: -------------------------------------------------------------------------------- 1 | use gdk_pixbuf::PixbufLoaderExt; 2 | 3 | pub fn get_logo_pixbuf() -> Option { 4 | let logo_bytes = include_bytes!("../assets/logo.svg"); 5 | 6 | let pixbuf_loader = gdk_pixbuf::PixbufLoader::new(); 7 | 8 | let pixbuf_loader = match pixbuf_loader.write(logo_bytes) { 9 | Ok(_) => Some(pixbuf_loader), 10 | Err(e) => { 11 | error!("unable to write bytes to the PixbufLoader: {}", e); 12 | return None; 13 | } 14 | }?; 15 | 16 | pixbuf_loader.close().ok(); 17 | pixbuf_loader.get_pixbuf() 18 | } 19 | 20 | #[cfg(test)] 21 | mod tests { 22 | use super::*; 23 | 24 | #[test] 25 | fn test_get_logo() { 26 | assert!(get_logo_pixbuf().is_some()); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/errors.rs: -------------------------------------------------------------------------------- 1 | use derive_more::Display; 2 | use std::convert::From; 3 | 4 | #[derive(Debug, Display)] 5 | pub enum LyriekError { 6 | PlayerError(String), 7 | #[display(fmt = "Player not found")] 8 | PlayerNotFound, 9 | Communication(String), 10 | #[display(fmt = "Arist(s) not found")] 11 | ArtistNotFound, 12 | #[display(fmt = "Song title not found")] 13 | TitleNotFound, 14 | /// The API response was succesful, but there were no lyrics found 15 | LyricsNotFound, 16 | } 17 | 18 | impl From for LyriekError { 19 | fn from(error: mpris::DBusError) -> LyriekError { 20 | LyriekError::PlayerError(format!("D-BUS error: {}", error)) 21 | } 22 | } 23 | 24 | impl From for LyriekError { 25 | fn from(error: mpris::FindingError) -> LyriekError { 26 | LyriekError::PlayerError(format!("Player lookup error: {}", error)) 27 | } 28 | } 29 | 30 | impl From> for LyriekError { 31 | fn from(error: std::sync::mpsc::SendError) -> LyriekError { 32 | LyriekError::Communication(format!("communication error: {}", error)) 33 | } 34 | } 35 | 36 | impl From for LyriekError { 37 | fn from(error: reqwest::Error) -> LyriekError { 38 | error!("API request failed: {}", error); 39 | LyriekError::LyricsNotFound 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/gui/gtk.rs: -------------------------------------------------------------------------------- 1 | use gtk::Orientation::Vertical; 2 | use gtk::{GtkWindowExt, Inhibit, LabelExt, OrientableExt, ScrollableExt, SpinnerExt, WidgetExt}; 3 | use relm::{Channel, Relm, Widget}; 4 | use relm_derive::widget; 5 | use std::thread; 6 | use v_htmlescape::escape; 7 | 8 | use crate::assets; 9 | use crate::player; 10 | use crate::song::Lyrics; 11 | use crate::Msg; 12 | 13 | pub struct Model { 14 | _channel: Channel, 15 | lyrics: String, 16 | title: String, 17 | artists: String, 18 | is_loading: bool, 19 | logo: Option, 20 | } 21 | 22 | #[widget] 23 | impl Widget for Window { 24 | fn model(relm: &Relm, _: ()) -> Model { 25 | let stream = relm.stream().clone(); 26 | // Create a channel to be able to send a message from another thread. 27 | let (channel, sender) = Channel::new(move |msg| { 28 | stream.emit(msg); 29 | }); 30 | 31 | thread::spawn(move || loop { 32 | if let Err(e) = player::get_events(&sender) { 33 | let res = sender.send(Msg::Error(format!("{}", e))); 34 | if res.is_err() { 35 | error!("unable to send an error message to the client: {}", e); 36 | } 37 | } 38 | 39 | thread::sleep(std::time::Duration::from_secs(1)); 40 | }); 41 | 42 | Model { 43 | _channel: channel, 44 | lyrics: String::new(), 45 | title: String::new(), 46 | artists: String::new(), 47 | is_loading: true, 48 | logo: assets::get_logo_pixbuf(), 49 | } 50 | } 51 | 52 | fn update(&mut self, event: Msg) { 53 | match event { 54 | Msg::Quit => gtk::main_quit(), 55 | Msg::Song(song) => { 56 | match song.lyrics { 57 | Lyrics::Loading => self.model.lyrics = String::from("Loading..."), 58 | Lyrics::NotFound => self.model.lyrics = String::from("lyrics not found :("), 59 | Lyrics::Found(lyrics) => { 60 | self.model.lyrics = 61 | format!("{}", escape(&lyrics)) 62 | } 63 | }; 64 | self.model.title = format!( 65 | "{}", 66 | escape(&song.title) 67 | ); 68 | self.model.artists = 69 | format!("{}", escape(&song.artists)); 70 | } 71 | Msg::Error(e) => { 72 | self.model.lyrics = e; 73 | self.model.title = String::from(""); 74 | self.model.artists = String::from(""); 75 | } 76 | Msg::StopLoading => self.model.is_loading = false, 77 | Msg::StartLoading => self.model.is_loading = true, 78 | } 79 | } 80 | 81 | view! { 82 | gtk::Window { 83 | title: "lyriek", 84 | icon: self.model.logo.as_ref(), 85 | delete_event(_, _) => (Msg::Quit, Inhibit(false)), 86 | property_width_request: 760, 87 | property_height_request: 600, 88 | gtk::ScrolledWindow { 89 | gtk::Viewport { 90 | hscroll_policy: gtk::ScrollablePolicy::Natural, 91 | vscroll_policy: gtk::ScrollablePolicy::Natural, 92 | gtk::Box { 93 | property_margin: 15, 94 | orientation: Vertical, 95 | gtk::Box { 96 | orientation: Vertical, 97 | gtk::Label { 98 | markup: &self.model.title, 99 | }, 100 | gtk::Label { 101 | markup: &self.model.artists, 102 | }, 103 | }, 104 | gtk::Box { 105 | orientation: Vertical, 106 | vexpand: true, 107 | gtk::Spinner { 108 | property_active: self.model.is_loading, 109 | }, 110 | gtk::Label { 111 | selectable: true, 112 | markup: &self.model.lyrics, 113 | }, 114 | }, 115 | }, 116 | }, 117 | }, 118 | } 119 | } 120 | } 121 | 122 | pub fn launch() { 123 | Window::run(()).expect("Lyriek startup failed"); 124 | } 125 | -------------------------------------------------------------------------------- /src/gui/mod.rs: -------------------------------------------------------------------------------- 1 | #[cfg(feature = "gui-gtk")] 2 | mod gtk; 3 | 4 | #[cfg(feature = "gui-gtk")] 5 | pub use self::gtk::launch; 6 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #[cfg(all(feature = "gui-gtk", feature = "gui-iced"))] 2 | compile_error!("feature \"gui-gtk\" and feature \"gui-iced\" cannot be enabled at the same time"); 3 | 4 | #[macro_use] 5 | extern crate log; 6 | 7 | #[macro_use] 8 | extern crate serde_derive; 9 | 10 | #[cfg(feature = "gui-gtk")] 11 | #[macro_use] 12 | extern crate relm_derive; 13 | 14 | mod assets; 15 | mod errors; 16 | mod gui; 17 | mod player; 18 | mod song; 19 | 20 | #[derive(Clone, Msg)] 21 | pub enum Msg { 22 | Quit, 23 | Song(song::Song), 24 | Error(String), 25 | StopLoading, 26 | StartLoading, 27 | } 28 | 29 | fn main() { 30 | env_logger::init(); 31 | 32 | gui::launch(); 33 | } 34 | -------------------------------------------------------------------------------- /src/player.rs: -------------------------------------------------------------------------------- 1 | use std::convert::TryFrom; 2 | 3 | use mpris::PlayerFinder; 4 | 5 | use crate::errors::LyriekError; 6 | use crate::song; 7 | use crate::Msg; 8 | 9 | fn get_mpris_player<'a>() -> Result, LyriekError> { 10 | let players = PlayerFinder::new()?.find_all()?; 11 | 12 | debug!("List of players: {:?}", players); 13 | 14 | for player in players { 15 | info!("Found player: {}", player.bus_name()); 16 | // some players can't send event streams 17 | if player.events().is_ok() { 18 | return Ok(player); 19 | } 20 | error!("player {} can't send events", player.bus_name()); 21 | } 22 | 23 | Err(LyriekError::PlayerNotFound) 24 | } 25 | 26 | pub fn get_events(sender: &relm::Sender) -> Result<(), LyriekError> { 27 | let player = get_mpris_player().or_else(|e| { 28 | trace!("attempting to fetch the player"); 29 | sender.send(Msg::StopLoading)?; 30 | sender.send(Msg::Error(e.to_string()))?; 31 | Err(e) 32 | })?; 33 | 34 | trace!("acquired mpris client"); 35 | 36 | // The playing song has to be acquired manually as this doesn't receive an event 37 | match song::Song::get_playing_song(&player) { 38 | Ok(mut song) => { 39 | sender.send(Msg::Song(song.clone()))?; 40 | if let Err(e) = song.get_lyrics() { 41 | error!("Got error while fetching lyrics: {}", e); 42 | } 43 | sender.send(Msg::Song(song))?; 44 | } 45 | Err(e) => sender.send(Msg::Error(format!("{}", e)))?, 46 | } 47 | 48 | sender.send(Msg::StopLoading)?; 49 | 50 | let events = player.events()?; 51 | 52 | trace!("listening to mpris event stream"); 53 | 54 | for event in events { 55 | trace!("received mpris event"); 56 | 57 | let event = event?; 58 | 59 | debug!("mpris event: {:#?}", event); 60 | 61 | match event { 62 | mpris::Event::TrackChanged(metadata) => { 63 | sender.send(Msg::StartLoading)?; 64 | match song::Song::try_from(&metadata) { 65 | Ok(mut song) => { 66 | trace!("found a song"); 67 | sender.send(Msg::Song(song.clone()))?; 68 | 69 | if let Err(e) = song.get_lyrics() { 70 | error!("Got error while fetching lyrics: {}", e); 71 | } 72 | sender.send(Msg::Song(song))?; 73 | } 74 | Err(e) => { 75 | debug!("No song found, metadata: {:#?}", metadata); 76 | sender.send(Msg::Error(format!("{}", e)))?; 77 | } 78 | } 79 | sender.send(Msg::StopLoading)?; 80 | } 81 | // When this event arrives, the events iterator also stops and this function returns 82 | mpris::Event::PlayerShutDown => { 83 | debug!("connection to player lost..."); 84 | sender.send(Msg::Error("connection to player lost".to_owned()))? 85 | } 86 | _ => {} 87 | } 88 | } 89 | 90 | trace!("no longer receiving mpris events"); 91 | 92 | Ok(()) 93 | } 94 | -------------------------------------------------------------------------------- /src/song.rs: -------------------------------------------------------------------------------- 1 | use std::convert::TryFrom; 2 | use std::fmt::Debug; 3 | 4 | use url::Url; 5 | 6 | use crate::errors::LyriekError; 7 | 8 | #[derive(Debug, Deserialize)] 9 | struct ApiResponse { 10 | result: T, 11 | } 12 | 13 | #[derive(Debug, Deserialize)] 14 | struct ApiSearchResponse { 15 | artist: String, 16 | id_artist: usize, 17 | track: String, 18 | id_track: usize, 19 | album: String, 20 | id_album: usize, 21 | api_lyrics: String, 22 | } 23 | 24 | #[derive(Debug, Deserialize)] 25 | struct ApiLyricsResponse { 26 | artist: String, 27 | id_artist: usize, 28 | track: String, 29 | id_track: usize, 30 | album: String, 31 | id_album: usize, 32 | lyrics: String, 33 | /// URL to this resource 34 | api_lyrics: String, 35 | } 36 | 37 | // #[derive(Deserialize)] 38 | // struct ApiResponse { 39 | // result: ApiResult, 40 | // // lyrics: String, 41 | // } 42 | 43 | // #[derive(Deserialize)] 44 | // struct ApiResult { 45 | // track: Track, 46 | // } 47 | 48 | // #[derive(Deserialize)] 49 | // struct Track { 50 | // text: String, 51 | // } 52 | 53 | #[derive(Clone, Debug)] 54 | pub enum Lyrics { 55 | Loading, 56 | Found(String), 57 | NotFound, 58 | } 59 | 60 | impl Default for Lyrics { 61 | fn default() -> Self { 62 | Lyrics::Loading 63 | } 64 | } 65 | 66 | #[derive(Default, Clone)] 67 | pub struct Song { 68 | pub title: String, 69 | pub artists: String, 70 | pub album: Option, 71 | pub album_art_url: Option, 72 | pub url: Option, 73 | pub lyrics: Lyrics, 74 | } 75 | 76 | impl TryFrom<&mpris::Metadata> for Song { 77 | type Error = LyriekError; 78 | 79 | fn try_from(metadata: &mpris::Metadata) -> Result { 80 | let song = Song { 81 | artists: metadata 82 | .artists() 83 | .ok_or(LyriekError::ArtistNotFound)? 84 | .join(", "), 85 | title: metadata 86 | .title() 87 | .ok_or(LyriekError::TitleNotFound)? 88 | .to_owned(), 89 | lyrics: Lyrics::default(), 90 | album: metadata.album_name().map(|s| s.to_string()), 91 | album_art_url: metadata.art_url().and_then(|s| Url::parse(s).ok()), 92 | url: metadata.url().and_then(|s| Url::parse(s).ok()), 93 | }; 94 | 95 | Ok(song) 96 | } 97 | } 98 | 99 | impl Song { 100 | pub fn new() -> Self { 101 | Song::default() 102 | } 103 | 104 | /// Returns the current playing song according to the mpris player 105 | pub fn get_playing_song<'a>(player: &mpris::Player<'a>) -> Result { 106 | let metadata = player.get_metadata().or_else(|e| { 107 | debug!("unable to fetch the player metadata: {}", e); 108 | Err(e) 109 | })?; 110 | 111 | Song::try_from(&metadata) 112 | } 113 | 114 | /// Try to load the lyrics from the API 115 | fn search_lyrics(&mut self) -> Result { 116 | let mut url = Url::parse("https://api.happi.dev/v1/music").expect("invalid base API url"); 117 | 118 | url.query_pairs_mut() 119 | .append_pair("q", &format!("{} {}", self.artists, self.title)) 120 | .append_pair("limit", "1") 121 | .append_pair("lyrics", "1") 122 | .append_pair("type", "track") 123 | // TODO: this is a free tier API key, I should replace this with a server of my own so I don't have to push this to github 124 | // For anyone who reads this: Don't steal this API key. (Or do, I don't really care atm) 125 | .append_pair( 126 | "apikey", 127 | "84cbb8oiGQIoD68KLQSscMr3jNYWwvQSFFhpq46tNfHcRQComN1lMd4d", 128 | ); 129 | 130 | let mut resp: ApiResponse> = reqwest::blocking::get(url)?.json()?; 131 | 132 | let lyrics_url = resp 133 | .result 134 | .pop() 135 | .ok_or_else(|| LyriekError::LyricsNotFound)?; 136 | 137 | let lyrics: ApiResponse = reqwest::blocking::get( 138 | lyrics_url.api_lyrics 139 | + "?apikey=84cbb8oiGQIoD68KLQSscMr3jNYWwvQSFFhpq46tNfHcRQComN1lMd4d", 140 | )? 141 | .json()?; 142 | 143 | Ok(lyrics.result.lyrics) 144 | } 145 | 146 | pub fn get_lyrics(&mut self) -> Result<(), LyriekError> { 147 | match self.search_lyrics() { 148 | Ok(lyrics) => { 149 | self.lyrics = Lyrics::Found(lyrics); 150 | Ok(()) 151 | } 152 | Err(e) => { 153 | self.lyrics = Lyrics::NotFound; 154 | return Err(e); 155 | } 156 | } 157 | } 158 | } 159 | --------------------------------------------------------------------------------