├── .github └── workflows │ └── rust.yml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── assets └── logo.png └── src ├── config.rs └── main.rs /.github/workflows/rust.yml: -------------------------------------------------------------------------------- 1 | name: Rust 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v1 12 | - name: Install nightly 13 | run: rustup default nightly-2019-08-15 14 | - name: Build 15 | run: cargo build --verbose 16 | - name: Run tests 17 | run: cargo test --verbose 18 | - name: Install components 19 | run: rustup component add rustfmt clippy 20 | - name: Run rustfmt 21 | run: cargo fmt --all -- --check 22 | - name: Run clippy 23 | run: cargo clippy --all -- -D warnings 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | .vscode 3 | /podcasts 4 | **/*.rs.bk 5 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "adler32" 5 | version = "1.0.4" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | 8 | [[package]] 9 | name = "aho-corasick" 10 | version = "0.7.6" 11 | source = "registry+https://github.com/rust-lang/crates.io-index" 12 | dependencies = [ 13 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 14 | ] 15 | 16 | [[package]] 17 | name = "ansi_term" 18 | version = "0.11.0" 19 | source = "registry+https://github.com/rust-lang/crates.io-index" 20 | dependencies = [ 21 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 22 | ] 23 | 24 | [[package]] 25 | name = "atty" 26 | version = "0.2.13" 27 | source = "registry+https://github.com/rust-lang/crates.io-index" 28 | dependencies = [ 29 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 30 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 31 | ] 32 | 33 | [[package]] 34 | name = "autocfg" 35 | version = "0.1.6" 36 | source = "registry+https://github.com/rust-lang/crates.io-index" 37 | 38 | [[package]] 39 | name = "backtrace" 40 | version = "0.3.38" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | dependencies = [ 43 | "backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", 44 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 45 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 46 | "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 47 | ] 48 | 49 | [[package]] 50 | name = "backtrace-sys" 51 | version = "0.1.31" 52 | source = "registry+https://github.com/rust-lang/crates.io-index" 53 | dependencies = [ 54 | "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", 55 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 56 | ] 57 | 58 | [[package]] 59 | name = "base64" 60 | version = "0.9.3" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | dependencies = [ 63 | "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 64 | "safemem 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 65 | ] 66 | 67 | [[package]] 68 | name = "base64" 69 | version = "0.10.1" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | dependencies = [ 72 | "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 73 | ] 74 | 75 | [[package]] 76 | name = "bitflags" 77 | version = "1.2.0" 78 | source = "registry+https://github.com/rust-lang/crates.io-index" 79 | 80 | [[package]] 81 | name = "byteorder" 82 | version = "1.3.2" 83 | source = "registry+https://github.com/rust-lang/crates.io-index" 84 | 85 | [[package]] 86 | name = "cc" 87 | version = "1.0.45" 88 | source = "registry+https://github.com/rust-lang/crates.io-index" 89 | 90 | [[package]] 91 | name = "cfg-if" 92 | version = "0.1.10" 93 | source = "registry+https://github.com/rust-lang/crates.io-index" 94 | 95 | [[package]] 96 | name = "chrono" 97 | version = "0.4.9" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | dependencies = [ 100 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 101 | "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", 102 | "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 103 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 104 | ] 105 | 106 | [[package]] 107 | name = "clap" 108 | version = "2.33.0" 109 | source = "registry+https://github.com/rust-lang/crates.io-index" 110 | dependencies = [ 111 | "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 112 | "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 113 | "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 114 | "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 115 | "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 116 | "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 117 | "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 118 | ] 119 | 120 | [[package]] 121 | name = "cookie" 122 | version = "0.11.1" 123 | source = "registry+https://github.com/rust-lang/crates.io-index" 124 | dependencies = [ 125 | "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", 126 | "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", 127 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 128 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 129 | ] 130 | 131 | [[package]] 132 | name = "crc32fast" 133 | version = "1.2.0" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | dependencies = [ 136 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 137 | ] 138 | 139 | [[package]] 140 | name = "darling" 141 | version = "0.9.0" 142 | source = "registry+https://github.com/rust-lang/crates.io-index" 143 | dependencies = [ 144 | "darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 145 | "darling_macro 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 146 | ] 147 | 148 | [[package]] 149 | name = "darling_core" 150 | version = "0.9.0" 151 | source = "registry+https://github.com/rust-lang/crates.io-index" 152 | dependencies = [ 153 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 154 | "ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 155 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 156 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 157 | "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 158 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 159 | ] 160 | 161 | [[package]] 162 | name = "darling_macro" 163 | version = "0.9.0" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | dependencies = [ 166 | "darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 167 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 168 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 169 | ] 170 | 171 | [[package]] 172 | name = "derive_builder" 173 | version = "0.7.2" 174 | source = "registry+https://github.com/rust-lang/crates.io-index" 175 | dependencies = [ 176 | "darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 177 | "derive_builder_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 178 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 179 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 180 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 181 | ] 182 | 183 | [[package]] 184 | name = "derive_builder_core" 185 | version = "0.5.0" 186 | source = "registry+https://github.com/rust-lang/crates.io-index" 187 | dependencies = [ 188 | "darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 189 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 190 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 191 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 192 | ] 193 | 194 | [[package]] 195 | name = "derive_more" 196 | version = "0.14.1" 197 | source = "registry+https://github.com/rust-lang/crates.io-index" 198 | dependencies = [ 199 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 200 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 201 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 202 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 203 | ] 204 | 205 | [[package]] 206 | name = "devise" 207 | version = "0.2.0" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | dependencies = [ 210 | "devise_codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 211 | "devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 212 | ] 213 | 214 | [[package]] 215 | name = "devise_codegen" 216 | version = "0.2.0" 217 | source = "registry+https://github.com/rust-lang/crates.io-index" 218 | dependencies = [ 219 | "devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 220 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 221 | ] 222 | 223 | [[package]] 224 | name = "devise_core" 225 | version = "0.2.0" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | dependencies = [ 228 | "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 229 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 230 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 231 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 232 | ] 233 | 234 | [[package]] 235 | name = "encoding" 236 | version = "0.2.33" 237 | source = "registry+https://github.com/rust-lang/crates.io-index" 238 | dependencies = [ 239 | "encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 240 | "encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 241 | "encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 242 | "encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 243 | "encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 244 | ] 245 | 246 | [[package]] 247 | name = "encoding-index-japanese" 248 | version = "1.20141219.5" 249 | source = "registry+https://github.com/rust-lang/crates.io-index" 250 | dependencies = [ 251 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 252 | ] 253 | 254 | [[package]] 255 | name = "encoding-index-korean" 256 | version = "1.20141219.5" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | dependencies = [ 259 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 260 | ] 261 | 262 | [[package]] 263 | name = "encoding-index-simpchinese" 264 | version = "1.20141219.5" 265 | source = "registry+https://github.com/rust-lang/crates.io-index" 266 | dependencies = [ 267 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 268 | ] 269 | 270 | [[package]] 271 | name = "encoding-index-singlebyte" 272 | version = "1.20141219.5" 273 | source = "registry+https://github.com/rust-lang/crates.io-index" 274 | dependencies = [ 275 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 276 | ] 277 | 278 | [[package]] 279 | name = "encoding-index-tradchinese" 280 | version = "1.20141219.5" 281 | source = "registry+https://github.com/rust-lang/crates.io-index" 282 | dependencies = [ 283 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 284 | ] 285 | 286 | [[package]] 287 | name = "encoding_index_tests" 288 | version = "0.1.4" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | 291 | [[package]] 292 | name = "encoding_rs" 293 | version = "0.8.20" 294 | source = "registry+https://github.com/rust-lang/crates.io-index" 295 | dependencies = [ 296 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 297 | ] 298 | 299 | [[package]] 300 | name = "env_logger" 301 | version = "0.6.2" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | dependencies = [ 304 | "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 305 | "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 306 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 307 | "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 308 | "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 309 | ] 310 | 311 | [[package]] 312 | name = "failure" 313 | version = "0.1.5" 314 | source = "registry+https://github.com/rust-lang/crates.io-index" 315 | dependencies = [ 316 | "backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)", 317 | "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 318 | ] 319 | 320 | [[package]] 321 | name = "failure_derive" 322 | version = "0.1.5" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | dependencies = [ 325 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 326 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 327 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 328 | "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", 329 | ] 330 | 331 | [[package]] 332 | name = "filetime" 333 | version = "0.2.7" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | dependencies = [ 336 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 337 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 338 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 339 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 340 | ] 341 | 342 | [[package]] 343 | name = "flate2" 344 | version = "1.0.12" 345 | source = "registry+https://github.com/rust-lang/crates.io-index" 346 | dependencies = [ 347 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 348 | "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 349 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 350 | "miniz_oxide 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 351 | ] 352 | 353 | [[package]] 354 | name = "fnv" 355 | version = "1.0.6" 356 | source = "registry+https://github.com/rust-lang/crates.io-index" 357 | 358 | [[package]] 359 | name = "fsevent" 360 | version = "0.4.0" 361 | source = "registry+https://github.com/rust-lang/crates.io-index" 362 | dependencies = [ 363 | "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 364 | "fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 365 | ] 366 | 367 | [[package]] 368 | name = "fsevent-sys" 369 | version = "2.0.1" 370 | source = "registry+https://github.com/rust-lang/crates.io-index" 371 | dependencies = [ 372 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 373 | ] 374 | 375 | [[package]] 376 | name = "fuchsia-zircon" 377 | version = "0.3.3" 378 | source = "registry+https://github.com/rust-lang/crates.io-index" 379 | dependencies = [ 380 | "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 381 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 382 | ] 383 | 384 | [[package]] 385 | name = "fuchsia-zircon-sys" 386 | version = "0.3.3" 387 | source = "registry+https://github.com/rust-lang/crates.io-index" 388 | 389 | [[package]] 390 | name = "heck" 391 | version = "0.3.1" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | dependencies = [ 394 | "unicode-segmentation 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 395 | ] 396 | 397 | [[package]] 398 | name = "httparse" 399 | version = "1.3.4" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | 402 | [[package]] 403 | name = "humantime" 404 | version = "1.3.0" 405 | source = "registry+https://github.com/rust-lang/crates.io-index" 406 | dependencies = [ 407 | "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 408 | ] 409 | 410 | [[package]] 411 | name = "hyper" 412 | version = "0.10.16" 413 | source = "registry+https://github.com/rust-lang/crates.io-index" 414 | dependencies = [ 415 | "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", 416 | "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 417 | "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 418 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 419 | "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 420 | "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 421 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 422 | "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 423 | "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 424 | "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 425 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 426 | ] 427 | 428 | [[package]] 429 | name = "id3" 430 | version = "0.3.0" 431 | source = "registry+https://github.com/rust-lang/crates.io-index" 432 | dependencies = [ 433 | "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 434 | "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 435 | "derive_builder 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 436 | "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 437 | "flate2 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", 438 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 439 | "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 440 | ] 441 | 442 | [[package]] 443 | name = "ident_case" 444 | version = "1.0.1" 445 | source = "registry+https://github.com/rust-lang/crates.io-index" 446 | 447 | [[package]] 448 | name = "idna" 449 | version = "0.1.5" 450 | source = "registry+https://github.com/rust-lang/crates.io-index" 451 | dependencies = [ 452 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 453 | "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 454 | "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 455 | ] 456 | 457 | [[package]] 458 | name = "indexmap" 459 | version = "1.2.0" 460 | source = "registry+https://github.com/rust-lang/crates.io-index" 461 | 462 | [[package]] 463 | name = "inotify" 464 | version = "0.6.1" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | dependencies = [ 467 | "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 468 | "inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 469 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 470 | ] 471 | 472 | [[package]] 473 | name = "inotify-sys" 474 | version = "0.1.3" 475 | source = "registry+https://github.com/rust-lang/crates.io-index" 476 | dependencies = [ 477 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 478 | ] 479 | 480 | [[package]] 481 | name = "iovec" 482 | version = "0.1.4" 483 | source = "registry+https://github.com/rust-lang/crates.io-index" 484 | dependencies = [ 485 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 486 | ] 487 | 488 | [[package]] 489 | name = "itoa" 490 | version = "0.4.4" 491 | source = "registry+https://github.com/rust-lang/crates.io-index" 492 | 493 | [[package]] 494 | name = "kernel32-sys" 495 | version = "0.2.2" 496 | source = "registry+https://github.com/rust-lang/crates.io-index" 497 | dependencies = [ 498 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 499 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 500 | ] 501 | 502 | [[package]] 503 | name = "language-tags" 504 | version = "0.2.2" 505 | source = "registry+https://github.com/rust-lang/crates.io-index" 506 | 507 | [[package]] 508 | name = "lazy_static" 509 | version = "1.4.0" 510 | source = "registry+https://github.com/rust-lang/crates.io-index" 511 | 512 | [[package]] 513 | name = "lazycell" 514 | version = "1.2.1" 515 | source = "registry+https://github.com/rust-lang/crates.io-index" 516 | 517 | [[package]] 518 | name = "libc" 519 | version = "0.2.62" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | 522 | [[package]] 523 | name = "log" 524 | version = "0.3.9" 525 | source = "registry+https://github.com/rust-lang/crates.io-index" 526 | dependencies = [ 527 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 528 | ] 529 | 530 | [[package]] 531 | name = "log" 532 | version = "0.4.8" 533 | source = "registry+https://github.com/rust-lang/crates.io-index" 534 | dependencies = [ 535 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 536 | ] 537 | 538 | [[package]] 539 | name = "matches" 540 | version = "0.1.8" 541 | source = "registry+https://github.com/rust-lang/crates.io-index" 542 | 543 | [[package]] 544 | name = "memchr" 545 | version = "2.2.1" 546 | source = "registry+https://github.com/rust-lang/crates.io-index" 547 | 548 | [[package]] 549 | name = "mime" 550 | version = "0.2.6" 551 | source = "registry+https://github.com/rust-lang/crates.io-index" 552 | dependencies = [ 553 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 554 | ] 555 | 556 | [[package]] 557 | name = "miniz_oxide" 558 | version = "0.3.3" 559 | source = "registry+https://github.com/rust-lang/crates.io-index" 560 | dependencies = [ 561 | "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 562 | ] 563 | 564 | [[package]] 565 | name = "mio" 566 | version = "0.6.19" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | dependencies = [ 569 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 570 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 571 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 572 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 573 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 574 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 575 | "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 576 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 577 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 578 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 579 | ] 580 | 581 | [[package]] 582 | name = "mio-extras" 583 | version = "2.0.5" 584 | source = "registry+https://github.com/rust-lang/crates.io-index" 585 | dependencies = [ 586 | "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 587 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 588 | "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", 589 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 590 | ] 591 | 592 | [[package]] 593 | name = "miow" 594 | version = "0.2.1" 595 | source = "registry+https://github.com/rust-lang/crates.io-index" 596 | dependencies = [ 597 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 598 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 599 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 600 | "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 601 | ] 602 | 603 | [[package]] 604 | name = "net2" 605 | version = "0.2.33" 606 | source = "registry+https://github.com/rust-lang/crates.io-index" 607 | dependencies = [ 608 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 609 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 610 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 611 | ] 612 | 613 | [[package]] 614 | name = "notify" 615 | version = "4.0.13" 616 | source = "registry+https://github.com/rust-lang/crates.io-index" 617 | dependencies = [ 618 | "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 619 | "filetime 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 620 | "fsevent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 621 | "fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 622 | "inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", 623 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 624 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 625 | "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", 626 | "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 627 | "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 628 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 629 | ] 630 | 631 | [[package]] 632 | name = "num-integer" 633 | version = "0.1.41" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | dependencies = [ 636 | "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 637 | "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 638 | ] 639 | 640 | [[package]] 641 | name = "num-traits" 642 | version = "0.2.8" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | dependencies = [ 645 | "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 646 | ] 647 | 648 | [[package]] 649 | name = "num_cpus" 650 | version = "1.10.1" 651 | source = "registry+https://github.com/rust-lang/crates.io-index" 652 | dependencies = [ 653 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 654 | ] 655 | 656 | [[package]] 657 | name = "pear" 658 | version = "0.1.2" 659 | source = "registry+https://github.com/rust-lang/crates.io-index" 660 | dependencies = [ 661 | "pear_codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 662 | ] 663 | 664 | [[package]] 665 | name = "pear_codegen" 666 | version = "0.1.2" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | dependencies = [ 669 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 670 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 671 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 672 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 673 | "yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 674 | ] 675 | 676 | [[package]] 677 | name = "percent-encoding" 678 | version = "1.0.1" 679 | source = "registry+https://github.com/rust-lang/crates.io-index" 680 | 681 | [[package]] 682 | name = "podserve" 683 | version = "0.3.0" 684 | dependencies = [ 685 | "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", 686 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 687 | "id3 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 688 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 689 | "pretty_env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 690 | "rocket 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 691 | "rocket_contrib 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 692 | "rss 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 693 | "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", 694 | "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", 695 | "structopt 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", 696 | "toml 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", 697 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 698 | ] 699 | 700 | [[package]] 701 | name = "pretty_env_logger" 702 | version = "0.3.1" 703 | source = "registry+https://github.com/rust-lang/crates.io-index" 704 | dependencies = [ 705 | "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", 706 | "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 707 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 708 | ] 709 | 710 | [[package]] 711 | name = "proc-macro2" 712 | version = "0.4.30" 713 | source = "registry+https://github.com/rust-lang/crates.io-index" 714 | dependencies = [ 715 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 716 | ] 717 | 718 | [[package]] 719 | name = "proc-macro2" 720 | version = "1.0.5" 721 | source = "registry+https://github.com/rust-lang/crates.io-index" 722 | dependencies = [ 723 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 724 | ] 725 | 726 | [[package]] 727 | name = "quick-error" 728 | version = "1.2.2" 729 | source = "registry+https://github.com/rust-lang/crates.io-index" 730 | 731 | [[package]] 732 | name = "quick-xml" 733 | version = "0.14.0" 734 | source = "registry+https://github.com/rust-lang/crates.io-index" 735 | dependencies = [ 736 | "derive_more 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", 737 | "encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", 738 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 739 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 740 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 741 | ] 742 | 743 | [[package]] 744 | name = "quote" 745 | version = "0.6.13" 746 | source = "registry+https://github.com/rust-lang/crates.io-index" 747 | dependencies = [ 748 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 749 | ] 750 | 751 | [[package]] 752 | name = "quote" 753 | version = "1.0.2" 754 | source = "registry+https://github.com/rust-lang/crates.io-index" 755 | dependencies = [ 756 | "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 757 | ] 758 | 759 | [[package]] 760 | name = "redox_syscall" 761 | version = "0.1.56" 762 | source = "registry+https://github.com/rust-lang/crates.io-index" 763 | 764 | [[package]] 765 | name = "regex" 766 | version = "1.3.1" 767 | source = "registry+https://github.com/rust-lang/crates.io-index" 768 | dependencies = [ 769 | "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", 770 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 771 | "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", 772 | "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 773 | ] 774 | 775 | [[package]] 776 | name = "regex-syntax" 777 | version = "0.6.12" 778 | source = "registry+https://github.com/rust-lang/crates.io-index" 779 | 780 | [[package]] 781 | name = "ring" 782 | version = "0.13.5" 783 | source = "registry+https://github.com/rust-lang/crates.io-index" 784 | dependencies = [ 785 | "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", 786 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 787 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 788 | "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 789 | ] 790 | 791 | [[package]] 792 | name = "rocket" 793 | version = "0.4.2" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | dependencies = [ 796 | "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 797 | "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 798 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 799 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 800 | "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 801 | "pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 802 | "rocket_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 803 | "rocket_http 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 804 | "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 805 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 806 | "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", 807 | "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 808 | "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 809 | ] 810 | 811 | [[package]] 812 | name = "rocket_codegen" 813 | version = "0.4.2" 814 | source = "registry+https://github.com/rust-lang/crates.io-index" 815 | dependencies = [ 816 | "devise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 817 | "indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 818 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 819 | "rocket_http 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 820 | "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 821 | "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 822 | ] 823 | 824 | [[package]] 825 | name = "rocket_contrib" 826 | version = "0.4.2" 827 | source = "registry+https://github.com/rust-lang/crates.io-index" 828 | dependencies = [ 829 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 830 | "notify 4.0.13 (registry+https://github.com/rust-lang/crates.io-index)", 831 | "rocket 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 832 | "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", 833 | "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", 834 | ] 835 | 836 | [[package]] 837 | name = "rocket_http" 838 | version = "0.4.2" 839 | source = "registry+https://github.com/rust-lang/crates.io-index" 840 | dependencies = [ 841 | "cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", 842 | "hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", 843 | "indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 844 | "pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 845 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 846 | "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 847 | "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 848 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 849 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 850 | ] 851 | 852 | [[package]] 853 | name = "rss" 854 | version = "1.8.0" 855 | source = "registry+https://github.com/rust-lang/crates.io-index" 856 | dependencies = [ 857 | "derive_builder 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 858 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 859 | "quick-xml 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", 860 | ] 861 | 862 | [[package]] 863 | name = "rustc-demangle" 864 | version = "0.1.16" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | 867 | [[package]] 868 | name = "rustc_version" 869 | version = "0.2.3" 870 | source = "registry+https://github.com/rust-lang/crates.io-index" 871 | dependencies = [ 872 | "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 873 | ] 874 | 875 | [[package]] 876 | name = "ryu" 877 | version = "1.0.0" 878 | source = "registry+https://github.com/rust-lang/crates.io-index" 879 | 880 | [[package]] 881 | name = "safemem" 882 | version = "0.3.2" 883 | source = "registry+https://github.com/rust-lang/crates.io-index" 884 | 885 | [[package]] 886 | name = "same-file" 887 | version = "1.0.5" 888 | source = "registry+https://github.com/rust-lang/crates.io-index" 889 | dependencies = [ 890 | "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 891 | ] 892 | 893 | [[package]] 894 | name = "semver" 895 | version = "0.9.0" 896 | source = "registry+https://github.com/rust-lang/crates.io-index" 897 | dependencies = [ 898 | "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 899 | ] 900 | 901 | [[package]] 902 | name = "semver-parser" 903 | version = "0.7.0" 904 | source = "registry+https://github.com/rust-lang/crates.io-index" 905 | 906 | [[package]] 907 | name = "serde" 908 | version = "1.0.101" 909 | source = "registry+https://github.com/rust-lang/crates.io-index" 910 | 911 | [[package]] 912 | name = "serde_derive" 913 | version = "1.0.101" 914 | source = "registry+https://github.com/rust-lang/crates.io-index" 915 | dependencies = [ 916 | "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 917 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 918 | "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 919 | ] 920 | 921 | [[package]] 922 | name = "serde_json" 923 | version = "1.0.41" 924 | source = "registry+https://github.com/rust-lang/crates.io-index" 925 | dependencies = [ 926 | "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 927 | "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 928 | "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", 929 | ] 930 | 931 | [[package]] 932 | name = "slab" 933 | version = "0.4.2" 934 | source = "registry+https://github.com/rust-lang/crates.io-index" 935 | 936 | [[package]] 937 | name = "smallvec" 938 | version = "0.6.10" 939 | source = "registry+https://github.com/rust-lang/crates.io-index" 940 | 941 | [[package]] 942 | name = "state" 943 | version = "0.4.1" 944 | source = "registry+https://github.com/rust-lang/crates.io-index" 945 | 946 | [[package]] 947 | name = "strsim" 948 | version = "0.7.0" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | 951 | [[package]] 952 | name = "strsim" 953 | version = "0.8.0" 954 | source = "registry+https://github.com/rust-lang/crates.io-index" 955 | 956 | [[package]] 957 | name = "structopt" 958 | version = "0.2.18" 959 | source = "registry+https://github.com/rust-lang/crates.io-index" 960 | dependencies = [ 961 | "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", 962 | "structopt-derive 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", 963 | ] 964 | 965 | [[package]] 966 | name = "structopt-derive" 967 | version = "0.2.18" 968 | source = "registry+https://github.com/rust-lang/crates.io-index" 969 | dependencies = [ 970 | "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 971 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 972 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 973 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 974 | ] 975 | 976 | [[package]] 977 | name = "syn" 978 | version = "0.15.44" 979 | source = "registry+https://github.com/rust-lang/crates.io-index" 980 | dependencies = [ 981 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 982 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 983 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 984 | ] 985 | 986 | [[package]] 987 | name = "syn" 988 | version = "1.0.5" 989 | source = "registry+https://github.com/rust-lang/crates.io-index" 990 | dependencies = [ 991 | "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 992 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 993 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 994 | ] 995 | 996 | [[package]] 997 | name = "synstructure" 998 | version = "0.10.2" 999 | source = "registry+https://github.com/rust-lang/crates.io-index" 1000 | dependencies = [ 1001 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 1002 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 1003 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 1004 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1005 | ] 1006 | 1007 | [[package]] 1008 | name = "termcolor" 1009 | version = "1.0.5" 1010 | source = "registry+https://github.com/rust-lang/crates.io-index" 1011 | dependencies = [ 1012 | "wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1013 | ] 1014 | 1015 | [[package]] 1016 | name = "textwrap" 1017 | version = "0.11.0" 1018 | source = "registry+https://github.com/rust-lang/crates.io-index" 1019 | dependencies = [ 1020 | "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1021 | ] 1022 | 1023 | [[package]] 1024 | name = "thread_local" 1025 | version = "0.3.6" 1026 | source = "registry+https://github.com/rust-lang/crates.io-index" 1027 | dependencies = [ 1028 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1029 | ] 1030 | 1031 | [[package]] 1032 | name = "time" 1033 | version = "0.1.42" 1034 | source = "registry+https://github.com/rust-lang/crates.io-index" 1035 | dependencies = [ 1036 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 1037 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 1038 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1039 | ] 1040 | 1041 | [[package]] 1042 | name = "toml" 1043 | version = "0.4.10" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | dependencies = [ 1046 | "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", 1047 | ] 1048 | 1049 | [[package]] 1050 | name = "toml" 1051 | version = "0.5.3" 1052 | source = "registry+https://github.com/rust-lang/crates.io-index" 1053 | dependencies = [ 1054 | "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", 1055 | ] 1056 | 1057 | [[package]] 1058 | name = "traitobject" 1059 | version = "0.1.0" 1060 | source = "registry+https://github.com/rust-lang/crates.io-index" 1061 | 1062 | [[package]] 1063 | name = "typeable" 1064 | version = "0.1.2" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | 1067 | [[package]] 1068 | name = "unicase" 1069 | version = "1.4.2" 1070 | source = "registry+https://github.com/rust-lang/crates.io-index" 1071 | dependencies = [ 1072 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1073 | ] 1074 | 1075 | [[package]] 1076 | name = "unicode-bidi" 1077 | version = "0.3.4" 1078 | source = "registry+https://github.com/rust-lang/crates.io-index" 1079 | dependencies = [ 1080 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1081 | ] 1082 | 1083 | [[package]] 1084 | name = "unicode-normalization" 1085 | version = "0.1.8" 1086 | source = "registry+https://github.com/rust-lang/crates.io-index" 1087 | dependencies = [ 1088 | "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 1089 | ] 1090 | 1091 | [[package]] 1092 | name = "unicode-segmentation" 1093 | version = "1.3.0" 1094 | source = "registry+https://github.com/rust-lang/crates.io-index" 1095 | 1096 | [[package]] 1097 | name = "unicode-width" 1098 | version = "0.1.6" 1099 | source = "registry+https://github.com/rust-lang/crates.io-index" 1100 | 1101 | [[package]] 1102 | name = "unicode-xid" 1103 | version = "0.1.0" 1104 | source = "registry+https://github.com/rust-lang/crates.io-index" 1105 | 1106 | [[package]] 1107 | name = "unicode-xid" 1108 | version = "0.2.0" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | 1111 | [[package]] 1112 | name = "untrusted" 1113 | version = "0.6.2" 1114 | source = "registry+https://github.com/rust-lang/crates.io-index" 1115 | 1116 | [[package]] 1117 | name = "url" 1118 | version = "1.7.2" 1119 | source = "registry+https://github.com/rust-lang/crates.io-index" 1120 | dependencies = [ 1121 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1122 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1123 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1124 | ] 1125 | 1126 | [[package]] 1127 | name = "vec_map" 1128 | version = "0.8.1" 1129 | source = "registry+https://github.com/rust-lang/crates.io-index" 1130 | 1131 | [[package]] 1132 | name = "version_check" 1133 | version = "0.1.5" 1134 | source = "registry+https://github.com/rust-lang/crates.io-index" 1135 | 1136 | [[package]] 1137 | name = "version_check" 1138 | version = "0.9.1" 1139 | source = "registry+https://github.com/rust-lang/crates.io-index" 1140 | 1141 | [[package]] 1142 | name = "walkdir" 1143 | version = "2.2.9" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | dependencies = [ 1146 | "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 1147 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1148 | "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1149 | ] 1150 | 1151 | [[package]] 1152 | name = "winapi" 1153 | version = "0.2.8" 1154 | source = "registry+https://github.com/rust-lang/crates.io-index" 1155 | 1156 | [[package]] 1157 | name = "winapi" 1158 | version = "0.3.8" 1159 | source = "registry+https://github.com/rust-lang/crates.io-index" 1160 | dependencies = [ 1161 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1162 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1163 | ] 1164 | 1165 | [[package]] 1166 | name = "winapi-build" 1167 | version = "0.1.1" 1168 | source = "registry+https://github.com/rust-lang/crates.io-index" 1169 | 1170 | [[package]] 1171 | name = "winapi-i686-pc-windows-gnu" 1172 | version = "0.4.0" 1173 | source = "registry+https://github.com/rust-lang/crates.io-index" 1174 | 1175 | [[package]] 1176 | name = "winapi-util" 1177 | version = "0.1.2" 1178 | source = "registry+https://github.com/rust-lang/crates.io-index" 1179 | dependencies = [ 1180 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1181 | ] 1182 | 1183 | [[package]] 1184 | name = "winapi-x86_64-pc-windows-gnu" 1185 | version = "0.4.0" 1186 | source = "registry+https://github.com/rust-lang/crates.io-index" 1187 | 1188 | [[package]] 1189 | name = "wincolor" 1190 | version = "1.0.2" 1191 | source = "registry+https://github.com/rust-lang/crates.io-index" 1192 | dependencies = [ 1193 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1194 | "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1195 | ] 1196 | 1197 | [[package]] 1198 | name = "ws2_32-sys" 1199 | version = "0.2.1" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | dependencies = [ 1202 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 1203 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1204 | ] 1205 | 1206 | [[package]] 1207 | name = "yansi" 1208 | version = "0.4.0" 1209 | source = "registry+https://github.com/rust-lang/crates.io-index" 1210 | 1211 | [[package]] 1212 | name = "yansi" 1213 | version = "0.5.0" 1214 | source = "registry+https://github.com/rust-lang/crates.io-index" 1215 | 1216 | [metadata] 1217 | "checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" 1218 | "checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" 1219 | "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" 1220 | "checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" 1221 | "checksum autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875" 1222 | "checksum backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)" = "690a62be8920ccf773ee00ef0968649b0e724cda8bd5b12286302b4ae955fdf5" 1223 | "checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b" 1224 | "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" 1225 | "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" 1226 | "checksum bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8a606a02debe2813760609f57a64a2ffd27d9fdf5b2f133eaca0b248dd92cdd2" 1227 | "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" 1228 | "checksum cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "4fc9a35e1f4290eb9e5fc54ba6cf40671ed2a2514c3eeb2b2a908dda2ea5a1be" 1229 | "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 1230 | "checksum chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e8493056968583b0193c1bb04d6f7684586f3726992d6c573261941a895dbd68" 1231 | "checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" 1232 | "checksum cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "99be24cfcf40d56ed37fd11c2123be833959bbc5bddecb46e1c2e442e15fa3e0" 1233 | "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" 1234 | "checksum darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fcfbcb0c5961907597a7d1148e3af036268f2b773886b8bb3eeb1e1281d3d3d6" 1235 | "checksum darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6afc018370c3bff3eb51f89256a6bdb18b4fdcda72d577982a14954a7a0b402c" 1236 | "checksum darling_macro 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6d8dac1c6f1d29a41c4712b4400f878cb4fcc4c7628f298dd75038e024998d1" 1237 | "checksum derive_builder 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ac53fa6a3cda160df823a9346442525dcaf1e171999a1cf23e67067e4fd64d4" 1238 | "checksum derive_builder_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0288a23da9333c246bb18c143426074a6ae96747995c5819d2947b64cd942b37" 1239 | "checksum derive_more 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6d944ac6003ed268757ef1ee686753b57efc5fcf0ebe7b64c9fc81e7e32ff839" 1240 | "checksum devise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e04ba2d03c5fa0d954c061fc8c9c288badadffc272ebb87679a89846de3ed3" 1241 | "checksum devise_codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "066ceb7928ca93a9bedc6d0e612a8a0424048b0ab1f75971b203d01420c055d7" 1242 | "checksum devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf41c59b22b5e3ec0ea55c7847e5f358d340f3a8d6d53a5cf4f1564967f96487" 1243 | "checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" 1244 | "checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" 1245 | "checksum encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" 1246 | "checksum encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" 1247 | "checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" 1248 | "checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" 1249 | "checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" 1250 | "checksum encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" 1251 | "checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" 1252 | "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" 1253 | "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" 1254 | "checksum filetime 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd7380b54ced79dda72ecc35cc4fbbd1da6bba54afaa37e96fd1c2a308cd469" 1255 | "checksum flate2 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)" = "ad3c5233c9a940c8719031b423d7e6c16af66e031cb0420b0896f5245bf181d3" 1256 | "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" 1257 | "checksum fsevent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6" 1258 | "checksum fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0" 1259 | "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 1260 | "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 1261 | "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" 1262 | "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" 1263 | "checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" 1264 | "checksum hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" 1265 | "checksum id3 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96cbe2d2d42930674ef20d3f02026641d0fd62d97b2a173cc2406cedbebc069e" 1266 | "checksum ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 1267 | "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" 1268 | "checksum indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a61202fbe46c4a951e9404a720a0180bcf3212c750d735cb5c4ba4dc551299f3" 1269 | "checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718" 1270 | "checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0" 1271 | "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" 1272 | "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" 1273 | "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 1274 | "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" 1275 | "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1276 | "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" 1277 | "checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba" 1278 | "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" 1279 | "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" 1280 | "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 1281 | "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" 1282 | "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" 1283 | "checksum miniz_oxide 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "304f66c19be2afa56530fa7c39796192eef38618da8d19df725ad7c6d6b2aaae" 1284 | "checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" 1285 | "checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" 1286 | "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" 1287 | "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" 1288 | "checksum notify 4.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1191efa2b8fe041decb55c238a125b7a1aeb6fad7a525133a02be5ec949ff3cb" 1289 | "checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" 1290 | "checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" 1291 | "checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" 1292 | "checksum pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c26d2b92e47063ffce70d3e3b1bd097af121a9e0db07ca38a6cc1cf0cc85ff25" 1293 | "checksum pear_codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "336db4a192cc7f54efeb0c4e11a9245394824cc3bcbd37ba3ff51240c35d7a6e" 1294 | "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" 1295 | "checksum pretty_env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "717ee476b1690853d222af4634056d830b5197ffd747726a9a1eee6da9f49074" 1296 | "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" 1297 | "checksum proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "90cf5f418035b98e655e9cdb225047638296b862b42411c4e45bb88d700f7fc0" 1298 | "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" 1299 | "checksum quick-xml 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0a8b2062cd4735d683121dbd525f5961226936229b0ac6bbbc40b34155744a41" 1300 | "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" 1301 | "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" 1302 | "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" 1303 | "checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd" 1304 | "checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" 1305 | "checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" 1306 | "checksum rocket 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "42c1e9deb3ef4fa430d307bfccd4231434b707ca1328fae339c43ad1201cc6f7" 1307 | "checksum rocket_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "79aa1366f9b2eccddc05971e17c5de7bb75a5431eb12c2b5c66545fd348647f4" 1308 | "checksum rocket_contrib 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e0fa5c1392135adc0f96a02ba150ac4c765e27c58dbfd32aa40678e948f6e56f" 1309 | "checksum rocket_http 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b1391457ee4e80b40d4b57fa5765c0f2836b20d73bcbee4e3f35d93cf3b80817" 1310 | "checksum rss 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0706a43e890fbaf1714d495d12f69a7b34b70c6e903586d70311c2ce15ffe67" 1311 | "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" 1312 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 1313 | "checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" 1314 | "checksum safemem 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b08423011dae9a5ca23f07cf57dac3857f5c885d352b76f6d95f4aea9434d0" 1315 | "checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" 1316 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1317 | "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1318 | "checksum serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "9796c9b7ba2ffe7a9ce53c2287dfc48080f4b2b362fcc245a259b3a7201119dd" 1319 | "checksum serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "4b133a43a1ecd55d4086bd5b4dc6c1751c68b1bfbeba7a5040442022c7e7c02e" 1320 | "checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2" 1321 | "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 1322 | "checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" 1323 | "checksum state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7345c971d1ef21ffdbd103a75990a15eb03604fc8b8852ca8cb418ee1a099028" 1324 | "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" 1325 | "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 1326 | "checksum structopt 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "16c2cdbf9cc375f15d1b4141bc48aeef444806655cd0e904207edc8d68d86ed7" 1327 | "checksum structopt-derive 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "53010261a84b37689f9ed7d395165029f9cc7abb9f56bbfe86bee2597ed25107" 1328 | "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" 1329 | "checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf" 1330 | "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" 1331 | "checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e" 1332 | "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 1333 | "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 1334 | "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" 1335 | "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" 1336 | "checksum toml 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c7aabe75941d914b72bf3e5d3932ed92ce0664d49d8432305a8b547c37227724" 1337 | "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" 1338 | "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" 1339 | "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" 1340 | "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 1341 | "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" 1342 | "checksum unicode-segmentation 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1967f4cdfc355b37fd76d2a954fb2ed3871034eb4f26d60537d88795cfc332a9" 1343 | "checksum unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7007dbd421b92cc6e28410fe7362e2e0a2503394908f417b68ec8d1c364c4e20" 1344 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 1345 | "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" 1346 | "checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" 1347 | "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" 1348 | "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" 1349 | "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" 1350 | "checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" 1351 | "checksum walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9658c94fa8b940eab2250bd5a457f9c48b748420d71293b165c8cdbe2f55f71e" 1352 | "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 1353 | "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" 1354 | "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 1355 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1356 | "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" 1357 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1358 | "checksum wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96f5016b18804d24db43cebf3c77269e7569b8954a8464501c216cc5e070eaa9" 1359 | "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 1360 | "checksum yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d60c3b48c9cdec42fb06b3b84b5b087405e1fa1c644a1af3930e4dfafe93de48" 1361 | "checksum yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71" 1362 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "podserve" 3 | description = "Spin up an RSS podcast feed webserver from a directories of MP3s" 4 | keywords = ["rss", "podcast", "podcasts"] 5 | categories = ["command-line-utilities"] 6 | readme = "README.md" 7 | repository = "https://github.com/passy/podserve" 8 | license = "MIT" 9 | version = "0.3.0" 10 | authors = ["Pascal Hartig "] 11 | edition = "2018" 12 | 13 | [dependencies] 14 | rss = "1.8.0" 15 | id3 = "0.3.0" 16 | rocket = "0.4.1" 17 | rocket_contrib = "0.4.1" 18 | url = "1.7.2" 19 | structopt = "0.2.17" 20 | log = "0.4.6" 21 | pretty_env_logger = "0.3.0" 22 | chrono = "0.4.6" 23 | serde_derive = "1.0.98" 24 | failure = "0.1.5" 25 | toml = "0.5.1" 26 | serde = "1.0.98" 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 Pascal Hartig 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | logo 2 | 3 | > Turns a folder of MP3 files into a hosted RSS feed. 4 | 5 | ## Usage 6 | 7 | ``` 8 | podserve [-d podcasts/] https://pod.example.com/prefix/ 9 | ``` 10 | 11 | By default, `podserve` will read the MP3s in a `podcasts/` subdirectory 12 | and serve them, generating an absolute URL based on the prefix URL 13 | provided as first positional argument. 14 | 15 | `podserve` will extract ID3 tags and modification time to generate 16 | the corresponding attributes on the RSS feed. 17 | 18 | ## Advanced Configuration 19 | 20 | You can set some additional configuration parameters through a config file. 21 | To write a template with default values, run `podserve` with `--write-config` 22 | and specify the edited configuration when starting it later with `--config`. 23 | 24 | ``` 25 | podserve https://example.com/ --write-config config.toml 26 | $VISUAL ./config.toml 27 | podserve https://example.com/ --config config.toml 28 | ``` 29 | 30 | *Yes, the URL is required here for no reason other than to make my life easier. 31 | PRs welcome.* 32 | 33 | ## Serving Static Files 34 | 35 | `podserve` uses Rocket and the Rocket-Contrib static file serving mechanism. 36 | This, importantly, does not support range requests and is hence very ill-suited 37 | for streaming podcasts. You may want to put a reverse proxy in front of this 38 | (which does of course takes the fun a bit out of this). 39 | 40 | For nginx you may want to set up something like this: 41 | 42 | ```nginx 43 | location /podcasts/ { 44 | sendfile on; 45 | tcp_nopush on; 46 | tcp_nodelay on; 47 | keepalive_timeout 65; 48 | 49 | alias /srv/www/podserve/podcasts/; 50 | } 51 | 52 | location / { 53 | proxy_pass http://127.0.0.1:{{ podserve_port }}; 54 | } 55 | ``` 56 | 57 | ## Caveats 58 | 59 | This is by no means meant to be a used in production or production-like 60 | environments. There are deliberately few options to configure your feed. 61 | I'm happy to take Pull Requests to add more, but this is not meant to be 62 | feature-complete. 63 | 64 | The scenario I'm envisioning for this is that you have a bunch of drafts 65 | you quickly want to share with your team or friends and instead of sharing 66 | a Dropbox folder, you instead share an actual feed that people can subscribe 67 | to with their podcast players. This comes with the additional benefit that 68 | they can download it to listen to it later and apply the usual audio filters 69 | on on it. 70 | 71 | ## LICENSE 72 | 73 | [MIT](/LICENSE) 74 | -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/passy/podserve/0cd37621a550e2373b8d7879fb0ad273075e5eef/assets/logo.png -------------------------------------------------------------------------------- /src/config.rs: -------------------------------------------------------------------------------- 1 | use failure::Error; 2 | use serde_derive::{Deserialize, Serialize}; 3 | use std::fs; 4 | use std::io::prelude::*; 5 | use std::path::PathBuf; 6 | use toml; 7 | 8 | #[derive(Debug, Deserialize, Serialize)] 9 | pub struct Config { 10 | pub title: String, 11 | pub description: String, 12 | pub author: Option, 13 | pub image: Option, 14 | } 15 | 16 | impl Default for Config { 17 | fn default() -> Self { 18 | Self { 19 | title: "PodServe Feed".to_string(), 20 | description: "A podcast feed generated by PodServe (https://github.com/passy/podserve)" 21 | .to_string(), 22 | author: None, 23 | image: None, 24 | } 25 | } 26 | } 27 | 28 | pub fn read(path: &PathBuf) -> Result { 29 | let mut input = String::new(); 30 | fs::File::open(path).and_then(|mut f| f.read_to_string(&mut input))?; 31 | toml::from_str(&input).map_err(|e| e.into()) 32 | } 33 | 34 | pub fn write(config: &Config, path: &PathBuf) -> Result<(), Error> { 35 | let content = toml::to_string_pretty(config)?; 36 | fs::File::create(path) 37 | .and_then(|mut f| f.write_all(content.as_bytes())) 38 | .map_err(|e| e.into()) 39 | } 40 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![warn( 2 | clippy::all, 3 | clippy::restriction, 4 | clippy::pedantic, 5 | clippy::nursery, 6 | clippy::cargo 7 | )] 8 | #![allow( 9 | clippy::missing_docs_in_private_items, 10 | clippy::implicit_return, 11 | clippy::filter_map, 12 | clippy::default_trait_access, 13 | // Frankly not sure where this comes from. 14 | clippy::multiple_crate_versions 15 | )] 16 | #![feature(proc_macro_hygiene, decl_macro)] 17 | 18 | use chrono::{offset::Utc, DateTime}; 19 | use id3; 20 | use log; 21 | use pretty_env_logger; 22 | use rocket::response::{status::NotFound, NamedFile}; 23 | use rocket::{get, response, routes, State}; 24 | use rocket_contrib::serve::StaticFiles; 25 | use rss; 26 | use std::env; 27 | use std::ffi::OsStr; 28 | use std::fs; 29 | use std::path::{Path, PathBuf}; 30 | use std::time::SystemTime; 31 | use structopt::StructOpt; 32 | use url; 33 | 34 | mod config; 35 | 36 | const IMAGE_MOUNT_PATH: &str = "/image"; 37 | 38 | #[derive(StructOpt, Debug)] 39 | #[structopt(name = "podserve")] 40 | struct Opt { 41 | /// Base URL the webserver is mounted on, used to prefix absolute URLs with. 42 | #[structopt(group = "mode")] 43 | base_url: url::Url, 44 | #[structopt(short = "d", long = "directory", default_value = "podcasts")] 45 | /// Directory to serve podcast MP3 files from. 46 | directory: PathBuf, 47 | #[structopt(long = "write-config")] 48 | /// Write a default configuration file to the given path an exit. 49 | write_config: Option, 50 | #[structopt(long = "config")] 51 | /// Read a config file from `config`. To create a default config use `--write-config`. 52 | config: Option, 53 | } 54 | 55 | #[derive(Debug)] 56 | enum RunMode<'a> { 57 | Serve, 58 | WriteConfig(&'a PathBuf), 59 | } 60 | 61 | #[derive(Debug)] 62 | enum Error { 63 | IO(std::io::Error), 64 | URLParse(url::ParseError), 65 | Generic(String), 66 | } 67 | 68 | struct PodcastState(Vec); 69 | 70 | impl From for Error { 71 | fn from(e: std::io::Error) -> Self { 72 | Self::IO(e) 73 | } 74 | } 75 | 76 | impl From for Error { 77 | fn from(e: String) -> Self { 78 | Self::Generic(e) 79 | } 80 | } 81 | 82 | impl From for Error { 83 | fn from(e: url::ParseError) -> Self { 84 | Self::URLParse(e) 85 | } 86 | } 87 | 88 | #[derive(Debug)] 89 | struct PodData { 90 | artist: Option, 91 | title: Option, 92 | comment: Option, 93 | filename: String, 94 | timestamp: SystemTime, 95 | len: u64, 96 | } 97 | 98 | fn mkitunes_channel_ext( 99 | config: &config::Config, 100 | ) -> Result { 101 | rss::extension::itunes::ITunesChannelExtensionBuilder::default() 102 | .author(config.author.clone()) 103 | .image(config.image.as_ref().map(|_| IMAGE_MOUNT_PATH.to_string())) 104 | .build() 105 | } 106 | 107 | fn mkfeed(opt: &Opt, config: &config::Config, pods: &[PodData]) -> Result { 108 | rss::ChannelBuilder::default() 109 | .title(&config.title) 110 | .description(&config.description) 111 | .itunes_ext(mkitunes_channel_ext(config).ok()) 112 | .items( 113 | pods.iter() 114 | .map(|i| mkitem(opt, i)) 115 | .filter_map(Result::ok) 116 | .collect::>(), 117 | ) 118 | .build() 119 | } 120 | 121 | fn format_systemtime(t: &SystemTime) -> String { 122 | let datetime: DateTime = t.clone().into(); 123 | datetime.to_rfc2822() 124 | } 125 | 126 | fn mkitem(opt: &Opt, pd: &PodData) -> Result { 127 | let filename = pd.filename.clone(); 128 | let full_url_res = opt.base_url.clone().join("/podcasts/")?.join(&filename)?; 129 | let full_url = full_url_res.as_str(); 130 | rss::ItemBuilder::default() 131 | .title(pd.title.clone()) 132 | .description(pd.comment.clone().unwrap_or_else(|| "".to_string())) 133 | .guid(rss::GuidBuilder::default().value(filename).build()?) 134 | .enclosure( 135 | rss::EnclosureBuilder::default() 136 | .url(full_url) 137 | // TODO: Ensure that this is true while reading directory. 138 | .mime_type("audio/mpeg") 139 | .length(format!("{}", pd.len)) 140 | .build()?, 141 | ) 142 | .pub_date(format_systemtime(&pd.timestamp)) 143 | .build() 144 | .map_err(|e| e.into()) 145 | } 146 | 147 | #[allow(clippy::needless_pass_by_value)] 148 | #[get("/")] 149 | fn index( 150 | podcasts: State, 151 | config: State, 152 | opt: State, 153 | ) -> Result, String> { 154 | Ok(response::content::Xml( 155 | mkfeed(&opt, &config, &podcasts.0)?.to_string(), 156 | )) 157 | } 158 | 159 | fn read_podcast_dir>(path: P) -> Result, std::io::Error> { 160 | let filename = |path: &Path| { 161 | path.file_name() 162 | .and_then(OsStr::to_str) 163 | .expect("Valid filename") 164 | .to_string() 165 | }; 166 | let timestamp = |path: &Path| { 167 | path.metadata() 168 | .and_then(|m| m.modified()) 169 | .unwrap_or_else(|e| { 170 | log::warn!("Failed to obtain created timestamp for {:?}: {}", &path, e); 171 | SystemTime::now() 172 | }) 173 | }; 174 | let len = |path: &Path| { 175 | #[allow(clippy::result_map_unwrap_or_else)] 176 | path.metadata().map(|m| m.len()).unwrap_or_else(|e| { 177 | log::warn!("Unable to determine file length for {:?}: {}", &path, e); 178 | 0 179 | }) 180 | }; 181 | Ok(fs::read_dir(path)? 182 | .filter_map(Result::ok) 183 | .map(|p| p.path()) 184 | .map(|p| { 185 | id3::Tag::read_from_path(&p) 186 | .map(|t| (p.clone(), t)) 187 | .map_err(|e| (p, e)) 188 | }) 189 | .map(|t| match t { 190 | Ok((path, tag)) => PodData { 191 | artist: tag.artist().map(ToOwned::to_owned), 192 | title: tag.title().map(ToOwned::to_owned), 193 | comment: Some( 194 | tag.comments() 195 | .map(|c| c.text.to_string()) 196 | .collect::>() 197 | .concat(), 198 | ), 199 | filename: filename(&path), 200 | timestamp: timestamp(&path), 201 | len: len(&path), 202 | }, 203 | Err((path, _)) => PodData { 204 | artist: None, 205 | title: Some(filename(&path)), 206 | comment: None, 207 | filename: filename(&path), 208 | timestamp: timestamp(&path), 209 | len: len(&path), 210 | }, 211 | }) 212 | .collect::>()) 213 | } 214 | 215 | #[allow(clippy::needless_pass_by_value)] 216 | #[get("/image")] 217 | fn image(config: State) -> Result> { 218 | let cwd = 219 | env::current_dir().map_err(|_| NotFound("Couldn't open current directory.".to_string()))?; 220 | if let Some(image) = &config.image { 221 | NamedFile::open(cwd.join(image)).map_err(|_| NotFound(format!("Bad path: {:?}", image))) 222 | } else { 223 | Err(NotFound( 224 | "Set 'image' in config to enable this endpoint.".to_string(), 225 | )) 226 | } 227 | } 228 | 229 | fn rocket(config: config::Config, opt: Opt) -> Result { 230 | let podcasts = PodcastState(read_podcast_dir(&opt.directory)?); 231 | let cwd = env::current_dir()?; 232 | 233 | Ok(rocket::ignite() 234 | .manage(podcasts) 235 | .manage(config) 236 | .mount("/", routes![index, image]) 237 | .mount("/podcasts", StaticFiles::from(cwd.join(&opt.directory))) 238 | .manage(opt)) 239 | } 240 | 241 | fn mode_from_opt(opt: &Opt) -> RunMode { 242 | if let Some(path) = &opt.write_config { 243 | RunMode::WriteConfig(path) 244 | } else { 245 | RunMode::Serve 246 | } 247 | } 248 | 249 | fn main() -> Result<(), failure::Error> { 250 | pretty_env_logger::try_init().expect("Initialize logger"); 251 | let opt = Opt::from_args(); 252 | match mode_from_opt(&opt) { 253 | RunMode::Serve => { 254 | let config = opt 255 | .config 256 | .as_ref() 257 | .map_or_else(Default::default, |f| config::read(f).expect("Valid config")); 258 | let _ = rocket(config, opt)?.launch(); 259 | } 260 | RunMode::WriteConfig(path) => { 261 | config::write(&Default::default(), path)?; 262 | eprintln!("Config written to '{}'", path.to_str().expect("Valid path")); 263 | } 264 | } 265 | Ok(()) 266 | } 267 | --------------------------------------------------------------------------------