Commit 3e909dc108

3e909dc108349d6b99383e8ca7b2afd23cd0188f

Unsigned

Siriusmart <71584876+Siriusmart@users.noreply.github.com> · 2022-04-26 18:49 UTC

Before redo

Layout: unified · split

Cargo.lock added +1235
@@ -0,0 +1,1235 @@
1# This file is automatically @generated by Cargo.
2# It is not intended for manual editing.
3version = 3
4
5[[package]]
6name = "autocfg"
7version = "1.1.0"
8source = "registry+https://github.com/rust-lang/crates.io-index"
9checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
10
11[[package]]
12name = "base64"
13version = "0.13.0"
14source = "registry+https://github.com/rust-lang/crates.io-index"
15checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
16
17[[package]]
18name = "bitflags"
19version = "1.3.2"
20source = "registry+https://github.com/rust-lang/crates.io-index"
21checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
22
23[[package]]
24name = "bumpalo"
25version = "3.9.1"
26source = "registry+https://github.com/rust-lang/crates.io-index"
27checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899"
28
29[[package]]
30name = "bytes"
31version = "1.1.0"
32source = "registry+https://github.com/rust-lang/crates.io-index"
33checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
34
35[[package]]
36name = "cassowary"
37version = "0.3.0"
38source = "registry+https://github.com/rust-lang/crates.io-index"
39checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
40
41[[package]]
42name = "cc"
43version = "1.0.73"
44source = "registry+https://github.com/rust-lang/crates.io-index"
45checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
46
47[[package]]
48name = "cfg-if"
49version = "1.0.0"
50source = "registry+https://github.com/rust-lang/crates.io-index"
51checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
52
53[[package]]
54name = "core-foundation"
55version = "0.9.3"
56source = "registry+https://github.com/rust-lang/crates.io-index"
57checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
58dependencies = [
59 "core-foundation-sys",
60 "libc",
61]
62
63[[package]]
64name = "core-foundation-sys"
65version = "0.8.3"
66source = "registry+https://github.com/rust-lang/crates.io-index"
67checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
68
69[[package]]
70name = "crossterm"
71version = "0.22.1"
72source = "registry+https://github.com/rust-lang/crates.io-index"
73checksum = "c85525306c4291d1b73ce93c8acf9c339f9b213aef6c1d85c3830cbf1c16325c"
74dependencies = [
75 "bitflags",
76 "crossterm_winapi",
77 "libc",
78 "mio 0.7.14",
79 "parking_lot 0.11.2",
80 "signal-hook",
81 "signal-hook-mio",
82 "winapi",
83]
84
85[[package]]
86name = "crossterm"
87version = "0.23.2"
88source = "registry+https://github.com/rust-lang/crates.io-index"
89checksum = "a2102ea4f781910f8a5b98dd061f4c2023f479ce7bb1236330099ceb5a93cf17"
90dependencies = [
91 "bitflags",
92 "crossterm_winapi",
93 "libc",
94 "mio 0.8.2",
95 "parking_lot 0.12.0",
96 "signal-hook",
97 "signal-hook-mio",
98 "winapi",
99]
100
101[[package]]
102name = "crossterm_winapi"
103version = "0.9.0"
104source = "registry+https://github.com/rust-lang/crates.io-index"
105checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c"
106dependencies = [
107 "winapi",
108]
109
110[[package]]
111name = "encoding_rs"
112version = "0.8.31"
113source = "registry+https://github.com/rust-lang/crates.io-index"
114checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b"
115dependencies = [
116 "cfg-if",
117]
118
119[[package]]
120name = "fastrand"
121version = "1.7.0"
122source = "registry+https://github.com/rust-lang/crates.io-index"
123checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf"
124dependencies = [
125 "instant",
126]
127
128[[package]]
129name = "fnv"
130version = "1.0.7"
131source = "registry+https://github.com/rust-lang/crates.io-index"
132checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
133
134[[package]]
135name = "foreign-types"
136version = "0.3.2"
137source = "registry+https://github.com/rust-lang/crates.io-index"
138checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
139dependencies = [
140 "foreign-types-shared",
141]
142
143[[package]]
144name = "foreign-types-shared"
145version = "0.1.1"
146source = "registry+https://github.com/rust-lang/crates.io-index"
147checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
148
149[[package]]
150name = "form_urlencoded"
151version = "1.0.1"
152source = "registry+https://github.com/rust-lang/crates.io-index"
153checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
154dependencies = [
155 "matches",
156 "percent-encoding",
157]
158
159[[package]]
160name = "futures-channel"
161version = "0.3.21"
162source = "registry+https://github.com/rust-lang/crates.io-index"
163checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010"
164dependencies = [
165 "futures-core",
166]
167
168[[package]]
169name = "futures-core"
170version = "0.3.21"
171source = "registry+https://github.com/rust-lang/crates.io-index"
172checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3"
173
174[[package]]
175name = "futures-io"
176version = "0.3.21"
177source = "registry+https://github.com/rust-lang/crates.io-index"
178checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b"
179
180[[package]]
181name = "futures-sink"
182version = "0.3.21"
183source = "registry+https://github.com/rust-lang/crates.io-index"
184checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868"
185
186[[package]]
187name = "futures-task"
188version = "0.3.21"
189source = "registry+https://github.com/rust-lang/crates.io-index"
190checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a"
191
192[[package]]
193name = "futures-util"
194version = "0.3.21"
195source = "registry+https://github.com/rust-lang/crates.io-index"
196checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a"
197dependencies = [
198 "futures-core",
199 "futures-io",
200 "futures-task",
201 "memchr",
202 "pin-project-lite",
203 "pin-utils",
204 "slab",
205]
206
207[[package]]
208name = "getrandom"
209version = "0.2.6"
210source = "registry+https://github.com/rust-lang/crates.io-index"
211checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
212dependencies = [
213 "cfg-if",
214 "libc",
215 "wasi 0.10.2+wasi-snapshot-preview1",
216]
217
218[[package]]
219name = "h2"
220version = "0.3.13"
221source = "registry+https://github.com/rust-lang/crates.io-index"
222checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57"
223dependencies = [
224 "bytes",
225 "fnv",
226 "futures-core",
227 "futures-sink",
228 "futures-util",
229 "http",
230 "indexmap",
231 "slab",
232 "tokio",
233 "tokio-util",
234 "tracing",
235]
236
237[[package]]
238name = "hashbrown"
239version = "0.11.2"
240source = "registry+https://github.com/rust-lang/crates.io-index"
241checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
242
243[[package]]
244name = "hermit-abi"
245version = "0.1.19"
246source = "registry+https://github.com/rust-lang/crates.io-index"
247checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
248dependencies = [
249 "libc",
250]
251
252[[package]]
253name = "http"
254version = "0.2.6"
255source = "registry+https://github.com/rust-lang/crates.io-index"
256checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03"
257dependencies = [
258 "bytes",
259 "fnv",
260 "itoa",
261]
262
263[[package]]
264name = "http-body"
265version = "0.4.4"
266source = "registry+https://github.com/rust-lang/crates.io-index"
267checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6"
268dependencies = [
269 "bytes",
270 "http",
271 "pin-project-lite",
272]
273
274[[package]]
275name = "httparse"
276version = "1.7.0"
277source = "registry+https://github.com/rust-lang/crates.io-index"
278checksum = "6330e8a36bd8c859f3fa6d9382911fbb7147ec39807f63b923933a247240b9ba"
279
280[[package]]
281name = "httpdate"
282version = "1.0.2"
283source = "registry+https://github.com/rust-lang/crates.io-index"
284checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
285
286[[package]]
287name = "hyper"
288version = "0.14.18"
289source = "registry+https://github.com/rust-lang/crates.io-index"
290checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2"
291dependencies = [
292 "bytes",
293 "futures-channel",
294 "futures-core",
295 "futures-util",
296 "h2",
297 "http",
298 "http-body",
299 "httparse",
300 "httpdate",
301 "itoa",
302 "pin-project-lite",
303 "socket2",
304 "tokio",
305 "tower-service",
306 "tracing",
307 "want",
308]
309
310[[package]]
311name = "hyper-tls"
312version = "0.5.0"
313source = "registry+https://github.com/rust-lang/crates.io-index"
314checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
315dependencies = [
316 "bytes",
317 "hyper",
318 "native-tls",
319 "tokio",
320 "tokio-native-tls",
321]
322
323[[package]]
324name = "idna"
325version = "0.2.3"
326source = "registry+https://github.com/rust-lang/crates.io-index"
327checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
328dependencies = [
329 "matches",
330 "unicode-bidi",
331 "unicode-normalization",
332]
333
334[[package]]
335name = "indexmap"
336version = "1.8.1"
337source = "registry+https://github.com/rust-lang/crates.io-index"
338checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee"
339dependencies = [
340 "autocfg",
341 "hashbrown",
342]
343
344[[package]]
345name = "instant"
346version = "0.1.12"
347source = "registry+https://github.com/rust-lang/crates.io-index"
348checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
349dependencies = [
350 "cfg-if",
351]
352
353[[package]]
354name = "invidious"
355version = "0.1.0"
356source = "registry+https://github.com/rust-lang/crates.io-index"
357checksum = "db294b3254d491fa9c4d180fd9c6a0bbbf05f1b0f2cf922851d098ca3c662c9e"
358dependencies = [
359 "reqwest",
360 "serde",
361 "serde_json",
362]
363
364[[package]]
365name = "ipnet"
366version = "2.5.0"
367source = "registry+https://github.com/rust-lang/crates.io-index"
368checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b"
369
370[[package]]
371name = "itoa"
372version = "1.0.1"
373source = "registry+https://github.com/rust-lang/crates.io-index"
374checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
375
376[[package]]
377name = "js-sys"
378version = "0.3.57"
379source = "registry+https://github.com/rust-lang/crates.io-index"
380checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397"
381dependencies = [
382 "wasm-bindgen",
383]
384
385[[package]]
386name = "lazy_static"
387version = "1.4.0"
388source = "registry+https://github.com/rust-lang/crates.io-index"
389checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
390
391[[package]]
392name = "libc"
393version = "0.2.124"
394source = "registry+https://github.com/rust-lang/crates.io-index"
395checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50"
396
397[[package]]
398name = "lock_api"
399version = "0.4.7"
400source = "registry+https://github.com/rust-lang/crates.io-index"
401checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53"
402dependencies = [
403 "autocfg",
404 "scopeguard",
405]
406
407[[package]]
408name = "log"
409version = "0.4.16"
410source = "registry+https://github.com/rust-lang/crates.io-index"
411checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8"
412dependencies = [
413 "cfg-if",
414]
415
416[[package]]
417name = "matches"
418version = "0.1.9"
419source = "registry+https://github.com/rust-lang/crates.io-index"
420checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
421
422[[package]]
423name = "memchr"
424version = "2.4.1"
425source = "registry+https://github.com/rust-lang/crates.io-index"
426checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
427
428[[package]]
429name = "mime"
430version = "0.3.16"
431source = "registry+https://github.com/rust-lang/crates.io-index"
432checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
433
434[[package]]
435name = "mio"
436version = "0.7.14"
437source = "registry+https://github.com/rust-lang/crates.io-index"
438checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc"
439dependencies = [
440 "libc",
441 "log",
442 "miow",
443 "ntapi",
444 "winapi",
445]
446
447[[package]]
448name = "mio"
449version = "0.8.2"
450source = "registry+https://github.com/rust-lang/crates.io-index"
451checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9"
452dependencies = [
453 "libc",
454 "log",
455 "miow",
456 "ntapi",
457 "wasi 0.11.0+wasi-snapshot-preview1",
458 "winapi",
459]
460
461[[package]]
462name = "miow"
463version = "0.3.7"
464source = "registry+https://github.com/rust-lang/crates.io-index"
465checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
466dependencies = [
467 "winapi",
468]
469
470[[package]]
471name = "native-tls"
472version = "0.2.10"
473source = "registry+https://github.com/rust-lang/crates.io-index"
474checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9"
475dependencies = [
476 "lazy_static",
477 "libc",
478 "log",
479 "openssl",
480 "openssl-probe",
481 "openssl-sys",
482 "schannel",
483 "security-framework",
484 "security-framework-sys",
485 "tempfile",
486]
487
488[[package]]
489name = "ntapi"
490version = "0.3.7"
491source = "registry+https://github.com/rust-lang/crates.io-index"
492checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f"
493dependencies = [
494 "winapi",
495]
496
497[[package]]
498name = "num_cpus"
499version = "1.13.1"
500source = "registry+https://github.com/rust-lang/crates.io-index"
501checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
502dependencies = [
503 "hermit-abi",
504 "libc",
505]
506
507[[package]]
508name = "once_cell"
509version = "1.10.0"
510source = "registry+https://github.com/rust-lang/crates.io-index"
511checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"
512
513[[package]]
514name = "openssl"
515version = "0.10.38"
516source = "registry+https://github.com/rust-lang/crates.io-index"
517checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95"
518dependencies = [
519 "bitflags",
520 "cfg-if",
521 "foreign-types",
522 "libc",
523 "once_cell",
524 "openssl-sys",
525]
526
527[[package]]
528name = "openssl-probe"
529version = "0.1.5"
530source = "registry+https://github.com/rust-lang/crates.io-index"
531checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
532
533[[package]]
534name = "openssl-sys"
535version = "0.9.72"
536source = "registry+https://github.com/rust-lang/crates.io-index"
537checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb"
538dependencies = [
539 "autocfg",
540 "cc",
541 "libc",
542 "pkg-config",
543 "vcpkg",
544]
545
546[[package]]
547name = "parking_lot"
548version = "0.11.2"
549source = "registry+https://github.com/rust-lang/crates.io-index"
550checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
551dependencies = [
552 "instant",
553 "lock_api",
554 "parking_lot_core 0.8.5",
555]
556
557[[package]]
558name = "parking_lot"
559version = "0.12.0"
560source = "registry+https://github.com/rust-lang/crates.io-index"
561checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58"
562dependencies = [
563 "lock_api",
564 "parking_lot_core 0.9.2",
565]
566
567[[package]]
568name = "parking_lot_core"
569version = "0.8.5"
570source = "registry+https://github.com/rust-lang/crates.io-index"
571checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216"
572dependencies = [
573 "cfg-if",
574 "instant",
575 "libc",
576 "redox_syscall",
577 "smallvec",
578 "winapi",
579]
580
581[[package]]
582name = "parking_lot_core"
583version = "0.9.2"
584source = "registry+https://github.com/rust-lang/crates.io-index"
585checksum = "995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37"
586dependencies = [
587 "cfg-if",
588 "libc",
589 "redox_syscall",
590 "smallvec",
591 "windows-sys",
592]
593
594[[package]]
595name = "percent-encoding"
596version = "2.1.0"
597source = "registry+https://github.com/rust-lang/crates.io-index"
598checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
599
600[[package]]
601name = "pin-project-lite"
602version = "0.2.8"
603source = "registry+https://github.com/rust-lang/crates.io-index"
604checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c"
605
606[[package]]
607name = "pin-utils"
608version = "0.1.0"
609source = "registry+https://github.com/rust-lang/crates.io-index"
610checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
611
612[[package]]
613name = "pkg-config"
614version = "0.3.25"
615source = "registry+https://github.com/rust-lang/crates.io-index"
616checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
617
618[[package]]
619name = "ppv-lite86"
620version = "0.2.16"
621source = "registry+https://github.com/rust-lang/crates.io-index"
622checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
623
624[[package]]
625name = "proc-macro2"
626version = "1.0.37"
627source = "registry+https://github.com/rust-lang/crates.io-index"
628checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1"
629dependencies = [
630 "unicode-xid",
631]
632
633[[package]]
634name = "quote"
635version = "1.0.18"
636source = "registry+https://github.com/rust-lang/crates.io-index"
637checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
638dependencies = [
639 "proc-macro2",
640]
641
642[[package]]
643name = "rand"
644version = "0.8.5"
645source = "registry+https://github.com/rust-lang/crates.io-index"
646checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
647dependencies = [
648 "libc",
649 "rand_chacha",
650 "rand_core",
651]
652
653[[package]]
654name = "rand_chacha"
655version = "0.3.1"
656source = "registry+https://github.com/rust-lang/crates.io-index"
657checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
658dependencies = [
659 "ppv-lite86",
660 "rand_core",
661]
662
663[[package]]
664name = "rand_core"
665version = "0.6.3"
666source = "registry+https://github.com/rust-lang/crates.io-index"
667checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
668dependencies = [
669 "getrandom",
670]
671
672[[package]]
673name = "redox_syscall"
674version = "0.2.13"
675source = "registry+https://github.com/rust-lang/crates.io-index"
676checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"
677dependencies = [
678 "bitflags",
679]
680
681[[package]]
682name = "remove_dir_all"
683version = "0.5.3"
684source = "registry+https://github.com/rust-lang/crates.io-index"
685checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
686dependencies = [
687 "winapi",
688]
689
690[[package]]
691name = "reqwest"
692version = "0.11.10"
693source = "registry+https://github.com/rust-lang/crates.io-index"
694checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb"
695dependencies = [
696 "base64",
697 "bytes",
698 "encoding_rs",
699 "futures-core",
700 "futures-util",
701 "h2",
702 "http",
703 "http-body",
704 "hyper",
705 "hyper-tls",
706 "ipnet",
707 "js-sys",
708 "lazy_static",
709 "log",
710 "mime",
711 "native-tls",
712 "percent-encoding",
713 "pin-project-lite",
714 "serde",
715 "serde_json",
716 "serde_urlencoded",
717 "tokio",
718 "tokio-native-tls",
719 "url",
720 "wasm-bindgen",
721 "wasm-bindgen-futures",
722 "web-sys",
723 "winreg",
724]
725
726[[package]]
727name = "ryu"
728version = "1.0.9"
729source = "registry+https://github.com/rust-lang/crates.io-index"
730checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
731
732[[package]]
733name = "schannel"
734version = "0.1.19"
735source = "registry+https://github.com/rust-lang/crates.io-index"
736checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75"
737dependencies = [
738 "lazy_static",
739 "winapi",
740]
741
742[[package]]
743name = "scopeguard"
744version = "1.1.0"
745source = "registry+https://github.com/rust-lang/crates.io-index"
746checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
747
748[[package]]
749name = "security-framework"
750version = "2.6.1"
751source = "registry+https://github.com/rust-lang/crates.io-index"
752checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc"
753dependencies = [
754 "bitflags",
755 "core-foundation",
756 "core-foundation-sys",
757 "libc",
758 "security-framework-sys",
759]
760
761[[package]]
762name = "security-framework-sys"
763version = "2.6.1"
764source = "registry+https://github.com/rust-lang/crates.io-index"
765checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556"
766dependencies = [
767 "core-foundation-sys",
768 "libc",
769]
770
771[[package]]
772name = "serde"
773version = "1.0.136"
774source = "registry+https://github.com/rust-lang/crates.io-index"
775checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"
776dependencies = [
777 "serde_derive",
778]
779
780[[package]]
781name = "serde_derive"
782version = "1.0.136"
783source = "registry+https://github.com/rust-lang/crates.io-index"
784checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9"
785dependencies = [
786 "proc-macro2",
787 "quote",
788 "syn",
789]
790
791[[package]]
792name = "serde_json"
793version = "1.0.79"
794source = "registry+https://github.com/rust-lang/crates.io-index"
795checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95"
796dependencies = [
797 "itoa",
798 "ryu",
799 "serde",
800]
801
802[[package]]
803name = "serde_urlencoded"
804version = "0.7.1"
805source = "registry+https://github.com/rust-lang/crates.io-index"
806checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
807dependencies = [
808 "form_urlencoded",
809 "itoa",
810 "ryu",
811 "serde",
812]
813
814[[package]]
815name = "signal-hook"
816version = "0.3.13"
817source = "registry+https://github.com/rust-lang/crates.io-index"
818checksum = "647c97df271007dcea485bb74ffdb57f2e683f1306c854f468a0c244badabf2d"
819dependencies = [
820 "libc",
821 "signal-hook-registry",
822]
823
824[[package]]
825name = "signal-hook-mio"
826version = "0.2.3"
827source = "registry+https://github.com/rust-lang/crates.io-index"
828checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af"
829dependencies = [
830 "libc",
831 "mio 0.7.14",
832 "mio 0.8.2",
833 "signal-hook",
834]
835
836[[package]]
837name = "signal-hook-registry"
838version = "1.4.0"
839source = "registry+https://github.com/rust-lang/crates.io-index"
840checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"
841dependencies = [
842 "libc",
843]
844
845[[package]]
846name = "slab"
847version = "0.4.6"
848source = "registry+https://github.com/rust-lang/crates.io-index"
849checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32"
850
851[[package]]
852name = "smallvec"
853version = "1.8.0"
854source = "registry+https://github.com/rust-lang/crates.io-index"
855checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83"
856
857[[package]]
858name = "socket2"
859version = "0.4.4"
860source = "registry+https://github.com/rust-lang/crates.io-index"
861checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0"
862dependencies = [
863 "libc",
864 "winapi",
865]
866
867[[package]]
868name = "syn"
869version = "1.0.91"
870source = "registry+https://github.com/rust-lang/crates.io-index"
871checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d"
872dependencies = [
873 "proc-macro2",
874 "quote",
875 "unicode-xid",
876]
877
878[[package]]
879name = "tempfile"
880version = "3.3.0"
881source = "registry+https://github.com/rust-lang/crates.io-index"
882checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
883dependencies = [
884 "cfg-if",
885 "fastrand",
886 "libc",
887 "redox_syscall",
888 "remove_dir_all",
889 "winapi",
890]
891
892[[package]]
893name = "tinyvec"
894version = "1.5.1"
895source = "registry+https://github.com/rust-lang/crates.io-index"
896checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2"
897dependencies = [
898 "tinyvec_macros",
899]
900
901[[package]]
902name = "tinyvec_macros"
903version = "0.1.0"
904source = "registry+https://github.com/rust-lang/crates.io-index"
905checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
906
907[[package]]
908name = "tokio"
909version = "1.17.0"
910source = "registry+https://github.com/rust-lang/crates.io-index"
911checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee"
912dependencies = [
913 "bytes",
914 "libc",
915 "memchr",
916 "mio 0.8.2",
917 "num_cpus",
918 "pin-project-lite",
919 "socket2",
920 "winapi",
921]
922
923[[package]]
924name = "tokio-native-tls"
925version = "0.3.0"
926source = "registry+https://github.com/rust-lang/crates.io-index"
927checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
928dependencies = [
929 "native-tls",
930 "tokio",
931]
932
933[[package]]
934name = "tokio-util"
935version = "0.7.1"
936source = "registry+https://github.com/rust-lang/crates.io-index"
937checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764"
938dependencies = [
939 "bytes",
940 "futures-core",
941 "futures-sink",
942 "pin-project-lite",
943 "tokio",
944 "tracing",
945]
946
947[[package]]
948name = "tower-service"
949version = "0.3.1"
950source = "registry+https://github.com/rust-lang/crates.io-index"
951checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"
952
953[[package]]
954name = "tracing"
955version = "0.1.34"
956source = "registry+https://github.com/rust-lang/crates.io-index"
957checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09"
958dependencies = [
959 "cfg-if",
960 "pin-project-lite",
961 "tracing-attributes",
962 "tracing-core",
963]
964
965[[package]]
966name = "tracing-attributes"
967version = "0.1.20"
968source = "registry+https://github.com/rust-lang/crates.io-index"
969checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b"
970dependencies = [
971 "proc-macro2",
972 "quote",
973 "syn",
974]
975
976[[package]]
977name = "tracing-core"
978version = "0.1.26"
979source = "registry+https://github.com/rust-lang/crates.io-index"
980checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f"
981dependencies = [
982 "lazy_static",
983]
984
985[[package]]
986name = "try-lock"
987version = "0.2.3"
988source = "registry+https://github.com/rust-lang/crates.io-index"
989checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
990
991[[package]]
992name = "tui"
993version = "0.17.0"
994source = "registry+https://github.com/rust-lang/crates.io-index"
995checksum = "23ed0a32c88b039b73f1b6c5acbd0554bfa5b6be94467375fd947c4de3a02271"
996dependencies = [
997 "bitflags",
998 "cassowary",
999 "crossterm 0.22.1",
1000 "unicode-segmentation",
1001 "unicode-width",
1002]
1003
1004[[package]]
1005name = "unicode-bidi"
1006version = "0.3.7"
1007source = "registry+https://github.com/rust-lang/crates.io-index"
1008checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f"
1009
1010[[package]]
1011name = "unicode-normalization"
1012version = "0.1.19"
1013source = "registry+https://github.com/rust-lang/crates.io-index"
1014checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9"
1015dependencies = [
1016 "tinyvec",
1017]
1018
1019[[package]]
1020name = "unicode-segmentation"
1021version = "1.9.0"
1022source = "registry+https://github.com/rust-lang/crates.io-index"
1023checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99"
1024
1025[[package]]
1026name = "unicode-width"
1027version = "0.1.9"
1028source = "registry+https://github.com/rust-lang/crates.io-index"
1029checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
1030
1031[[package]]
1032name = "unicode-xid"
1033version = "0.2.2"
1034source = "registry+https://github.com/rust-lang/crates.io-index"
1035checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
1036
1037[[package]]
1038name = "url"
1039version = "2.2.2"
1040source = "registry+https://github.com/rust-lang/crates.io-index"
1041checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"
1042dependencies = [
1043 "form_urlencoded",
1044 "idna",
1045 "matches",
1046 "percent-encoding",
1047]
1048
1049[[package]]
1050name = "vcpkg"
1051version = "0.2.15"
1052source = "registry+https://github.com/rust-lang/crates.io-index"
1053checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
1054
1055[[package]]
1056name = "want"
1057version = "0.3.0"
1058source = "registry+https://github.com/rust-lang/crates.io-index"
1059checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
1060dependencies = [
1061 "log",
1062 "try-lock",
1063]
1064
1065[[package]]
1066name = "wasi"
1067version = "0.10.2+wasi-snapshot-preview1"
1068source = "registry+https://github.com/rust-lang/crates.io-index"
1069checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
1070
1071[[package]]
1072name = "wasi"
1073version = "0.11.0+wasi-snapshot-preview1"
1074source = "registry+https://github.com/rust-lang/crates.io-index"
1075checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
1076
1077[[package]]
1078name = "wasm-bindgen"
1079version = "0.2.80"
1080source = "registry+https://github.com/rust-lang/crates.io-index"
1081checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad"
1082dependencies = [
1083 "cfg-if",
1084 "wasm-bindgen-macro",
1085]
1086
1087[[package]]
1088name = "wasm-bindgen-backend"
1089version = "0.2.80"
1090source = "registry+https://github.com/rust-lang/crates.io-index"
1091checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4"
1092dependencies = [
1093 "bumpalo",
1094 "lazy_static",
1095 "log",
1096 "proc-macro2",
1097 "quote",
1098 "syn",
1099 "wasm-bindgen-shared",
1100]
1101
1102[[package]]
1103name = "wasm-bindgen-futures"
1104version = "0.4.30"
1105source = "registry+https://github.com/rust-lang/crates.io-index"
1106checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2"
1107dependencies = [
1108 "cfg-if",
1109 "js-sys",
1110 "wasm-bindgen",
1111 "web-sys",
1112]
1113
1114[[package]]
1115name = "wasm-bindgen-macro"
1116version = "0.2.80"
1117source = "registry+https://github.com/rust-lang/crates.io-index"
1118checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5"
1119dependencies = [
1120 "quote",
1121 "wasm-bindgen-macro-support",
1122]
1123
1124[[package]]
1125name = "wasm-bindgen-macro-support"
1126version = "0.2.80"
1127source = "registry+https://github.com/rust-lang/crates.io-index"
1128checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b"
1129dependencies = [
1130 "proc-macro2",
1131 "quote",
1132 "syn",
1133 "wasm-bindgen-backend",
1134 "wasm-bindgen-shared",
1135]
1136
1137[[package]]
1138name = "wasm-bindgen-shared"
1139version = "0.2.80"
1140source = "registry+https://github.com/rust-lang/crates.io-index"
1141checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744"
1142
1143[[package]]
1144name = "web-sys"
1145version = "0.3.57"
1146source = "registry+https://github.com/rust-lang/crates.io-index"
1147checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283"
1148dependencies = [
1149 "js-sys",
1150 "wasm-bindgen",
1151]
1152
1153[[package]]
1154name = "winapi"
1155version = "0.3.9"
1156source = "registry+https://github.com/rust-lang/crates.io-index"
1157checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
1158dependencies = [
1159 "winapi-i686-pc-windows-gnu",
1160 "winapi-x86_64-pc-windows-gnu",
1161]
1162
1163[[package]]
1164name = "winapi-i686-pc-windows-gnu"
1165version = "0.4.0"
1166source = "registry+https://github.com/rust-lang/crates.io-index"
1167checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
1168
1169[[package]]
1170name = "winapi-x86_64-pc-windows-gnu"
1171version = "0.4.0"
1172source = "registry+https://github.com/rust-lang/crates.io-index"
1173checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1174
1175[[package]]
1176name = "windows-sys"
1177version = "0.34.0"
1178source = "registry+https://github.com/rust-lang/crates.io-index"
1179checksum = "5acdd78cb4ba54c0045ac14f62d8f94a03d10047904ae2a40afa1e99d8f70825"
1180dependencies = [
1181 "windows_aarch64_msvc",
1182 "windows_i686_gnu",
1183 "windows_i686_msvc",
1184 "windows_x86_64_gnu",
1185 "windows_x86_64_msvc",
1186]
1187
1188[[package]]
1189name = "windows_aarch64_msvc"
1190version = "0.34.0"
1191source = "registry+https://github.com/rust-lang/crates.io-index"
1192checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d"
1193
1194[[package]]
1195name = "windows_i686_gnu"
1196version = "0.34.0"
1197source = "registry+https://github.com/rust-lang/crates.io-index"
1198checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed"
1199
1200[[package]]
1201name = "windows_i686_msvc"
1202version = "0.34.0"
1203source = "registry+https://github.com/rust-lang/crates.io-index"
1204checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956"
1205
1206[[package]]
1207name = "windows_x86_64_gnu"
1208version = "0.34.0"
1209source = "registry+https://github.com/rust-lang/crates.io-index"
1210checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4"
1211
1212[[package]]
1213name = "windows_x86_64_msvc"
1214version = "0.34.0"
1215source = "registry+https://github.com/rust-lang/crates.io-index"
1216checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9"
1217
1218[[package]]
1219name = "winreg"
1220version = "0.10.1"
1221source = "registry+https://github.com/rust-lang/crates.io-index"
1222checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
1223dependencies = [
1224 "winapi",
1225]
1226
1227[[package]]
1228name = "youtube-tui"
1229version = "0.1.0"
1230dependencies = [
1231 "crossterm 0.23.2",
1232 "invidious",
1233 "rand",
1234 "tui",
1235]
Cargo.toml added +15
@@ -0,0 +1,15 @@
1[package]
2name = "youtube-tui"
3version = "0.1.0"
4edition = "2021"
5
6# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
8[dependencies]
9tui = "0.17"
10crossterm = "0.23"
11invidious = "0.1.0"
12rand = "0.8.5"
13
14[profile.dev.package."*"]
15opt-level = 3
main_menu.svg added +154
@@ -0,0 +1,154 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 width="297mm"
6 height="210mm"
7 viewBox="0 0 297 210"
8 version="1.1"
9 id="svg5"
10 inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
11 sodipodi:docname="main_menu.svg"
12 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
14 xmlns="http://www.w3.org/2000/svg"
15 xmlns:svg="http://www.w3.org/2000/svg">
16 <sodipodi:namedview
17 id="namedview7"
18 pagecolor="#505050"
19 bordercolor="#ffffff"
20 borderopacity="1"
21 inkscape:pageshadow="0"
22 inkscape:pageopacity="0"
23 inkscape:pagecheckerboard="1"
24 inkscape:document-units="mm"
25 showgrid="false"
26 inkscape:zoom="0.73406285"
27 inkscape:cx="681.82173"
28 inkscape:cy="387.56899"
29 inkscape:window-width="1900"
30 inkscape:window-height="987"
31 inkscape:window-x="10"
32 inkscape:window-y="10"
33 inkscape:window-maximized="1"
34 inkscape:current-layer="layer1" />
35 <defs
36 id="defs2" />
37 <g
38 inkscape:label="Layer 1"
39 inkscape:groupmode="layer"
40 id="layer1">
41 <rect
42 style="fill:#ffffff;fill-opacity:0;stroke:#ff23ff;stroke-width:1.56;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
43 id="rect31"
44 width="300.26987"
45 height="14.975105"
46 x="-1.7101005"
47 y="-0.080341153" />
48 <rect
49 style="fill:#ffffff;fill-opacity:0;stroke:#ff23ff;stroke-width:1.19435;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
50 id="rect31-3"
51 width="174.25894"
52 height="15.125169"
53 x="63.20306"
54 y="24.045645" />
55 <rect
56 style="fill:#ffffff;fill-opacity:0;stroke:#ff23ff;stroke-width:1.56;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
57 id="rect1551"
58 width="103.96526"
59 height="151.43961"
60 x="10.3016"
61 y="45.286053" />
62 <rect
63 style="fill:#ffffff;fill-opacity:0;stroke:#ff23ff;stroke-width:1.56;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
64 id="rect1555"
65 width="168.72832"
66 height="151.09547"
67 x="125.62102"
68 y="46.377522" />
69 <text
70 xml:space="preserve"
71 style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.264583"
72 x="120.79162"
73 y="11.558399"
74 id="text4301"><tspan
75 sodipodi:role="line"
76 id="tspan4299"
77 style="fill:#ffffff;stroke-width:0.264583"
78 x="120.79162"
79 y="11.558399">search bar</tspan></text>
80 <rect
81 style="fill:#ffffff;fill-opacity:0;stroke:#ff23ff;stroke-width:1.56;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
82 id="rect31-7"
83 width="300.26987"
84 height="14.975105"
85 x="-0.77405721"
86 y="204.64107" />
87 <text
88 xml:space="preserve"
89 style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.264583"
90 x="121.72767"
91 y="216.27982"
92 id="text4301-0"><tspan
93 sodipodi:role="line"
94 id="tspan4299-9"
95 style="fill:#ffffff;stroke-width:0.264583"
96 x="121.72767"
97 y="216.27982">status</tspan></text>
98 <text
99 xml:space="preserve"
100 style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.264583"
101 x="64.655159"
102 y="34.833267"
103 id="text4301-6"><tspan
104 sodipodi:role="line"
105 id="tspan4299-7"
106 style="fill:#ffffff;stroke-width:0.264583"
107 x="64.655159"
108 y="34.833267">trending</tspan></text>
109 <text
110 xml:space="preserve"
111 style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.264583"
112 x="120.71136"
113 y="35.150738"
114 id="text4301-6-5"><tspan
115 sodipodi:role="line"
116 id="tspan4299-7-3"
117 style="fill:#ffffff;stroke-width:0.264583"
118 x="120.71136"
119 y="35.150738">popular</tspan></text>
120 <text
121 xml:space="preserve"
122 style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.264583"
123 x="185.0119"
124 y="34.616146"
125 id="text4301-6-5-5"><tspan
126 sodipodi:role="line"
127 id="tspan4299-7-3-6"
128 style="fill:#ffffff;stroke-width:0.264583"
129 x="185.0119"
130 y="34.616146">history</tspan></text>
131 <text
132 xml:space="preserve"
133 style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.264583"
134 x="38.379673"
135 y="129.96365"
136 id="text4301-6-5-5-2"><tspan
137 sodipodi:role="line"
138 id="tspan4299-7-3-6-9"
139 style="fill:#ffffff;stroke-width:0.264583"
140 x="38.379673"
141 y="129.96365">video list</tspan></text>
142 <text
143 xml:space="preserve"
144 style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.264583"
145 x="189.27042"
146 y="130.80986"
147 id="text4301-6-5-5-2-1"><tspan
148 sodipodi:role="line"
149 id="tspan4299-7-3-6-9-2"
150 style="fill:#ffffff;stroke-width:0.264583"
151 x="189.27042"
152 y="130.80986">details</tspan></text>
153 </g>
154</svg>
src/lib.rs added +236
@@ -0,0 +1,236 @@
1use std::{error::Error, fmt};
2
3pub struct App {
4 pub search_bar: Vec<char>,
5 pub state: State,
6 pub status: Option<String>,
7 pub nav_x: Option<usize>,
8 pub nav_y: Option<usize>,
9
10 main_menu_structure: Vec<Vec<MainMenuItem>>,
11}
12
13impl App {
14 pub fn new() -> Self {
15 Self {
16 search_bar: Vec::new(),
17 state: State::MainMenu {
18 selector: Selector::Trending,
19 selected: None,
20 navigation: None,
21 },
22 status: None,
23 nav_x: None,
24 nav_y: None,
25
26 main_menu_structure: vec![
27 vec![MainMenuItem::SearchBar],
28 vec![
29 MainMenuItem::Trending,
30 MainMenuItem::Popular,
31 MainMenuItem::History,
32 ],
33 vec![MainMenuItem::Videos, MainMenuItem::VideoDetails],
34 vec![MainMenuItem::StatusBar],
35 ],
36 }
37 }
38
39 pub fn up(&mut self) {
40 match &mut self.state {
41 State::MainMenu {
42 selector: _,
43 selected: _,
44 navigation,
45 } => {
46 self.nav_y = match self.nav_y {
47 None => Some(0),
48 Some(0) => self.nav_y,
49 Some(y) => Some(y - 1),
50 };
51
52 if self.nav_x.is_none() {
53 self.nav_x = Some(0);
54 }
55
56 let nav_x = self.nav_x.unwrap();
57 let nav_y = self.nav_y.unwrap();
58
59 *navigation = Some(
60 self.main_menu_structure[nav_y][if nav_x
61 >= self.main_menu_structure[nav_y].len()
62 {
63 self.main_menu_structure[nav_y].len() - 1
64 } else {
65 nav_x
66 }],
67 );
68 }
69 }
70 }
71
72 pub fn down(&mut self) {
73 match &mut self.state {
74 State::MainMenu {
75 selector: _,
76 selected: _,
77 navigation,
78 } => {
79 self.nav_y = match self.nav_y {
80 None => Some(self.main_menu_structure.len() - 1),
81 Some(y) => {
82 if y < self.main_menu_structure.len() - 1 {
83 Some(y + 1)
84 } else {
85 Some(y)
86 }
87 }
88 };
89
90 if self.nav_x.is_none() {
91 self.nav_x = Some(0);
92 }
93
94 let nav_x = self.nav_x.unwrap();
95 let nav_y = self.nav_y.unwrap();
96
97 *navigation = Some(
98 self.main_menu_structure[nav_y][if nav_x
99 >= self.main_menu_structure[nav_y].len()
100 {
101 self.main_menu_structure[nav_y].len() - 1
102 } else {
103 nav_x
104 }],
105 );
106 }
107 }
108 }
109
110 pub fn left(&mut self) {
111 match &mut self.state {
112 State::MainMenu {
113 selector: _,
114 selected: _,
115 navigation,
116 } => {
117 if self.nav_y.is_none() {
118 self.nav_y = Some(0);
119 }
120 let nav_y = self.nav_y.unwrap();
121
122 self.nav_x = match self.nav_x {
123 None => Some(0),
124 Some(0) => Some(0),
125 Some(x) => {
126 if x < self.main_menu_structure[nav_y].len() {
127 Some(x - 1)
128 } else if self.main_menu_structure[nav_y].len() == 1 {
129 Some(0)
130 } else {
131 Some(self.main_menu_structure[nav_y].len() - 2)
132 }
133 }
134 };
135
136
137 let nav_x = self.nav_x.unwrap();
138
139 *navigation = Some(
140 self.main_menu_structure[nav_y][if nav_x
141 >= self.main_menu_structure[nav_y].len()
142 {
143 self.main_menu_structure[nav_y].len() - 1
144 } else {
145 nav_x
146 }],
147 );
148 }
149 }
150 }
151
152 pub fn right(&mut self) {
153 match &mut self.state {
154 State::MainMenu {
155 selector: _,
156 selected: _,
157 navigation,
158 } => {
159 if self.nav_y.is_none() {
160 self.nav_y = Some(0);
161 }
162
163 let nav_y = self.nav_y.unwrap();
164
165 self.nav_x = match self.nav_x {
166 None => Some(0),
167 Some(x) => {
168 if x < self.main_menu_structure[nav_y].len() - 1 {
169 Some(x + 1)
170 } else {
171 Some(x)
172 }
173 }
174 };
175
176 let nav_x = self.nav_x.unwrap();
177
178 *navigation = Some(
179 self.main_menu_structure[nav_y][if nav_x
180 >= self.main_menu_structure[nav_y].len()
181 {
182 self.main_menu_structure[nav_y].len() - 1
183 } else {
184 nav_x
185 }],
186 );
187 }
188 }
189 }
190
191 pub fn enter(&mut self) {
192 match &mut self.state {
193 State::MainMenu {
194 selector,
195 selected,
196 navigation,
197 } => {
198 *selected = *navigation;
199 match selected.unwrap() {
200 MainMenuItem::Trending => *selector = Selector::Trending,
201 MainMenuItem::Popular => *selector = Selector::Popular,
202 MainMenuItem::History => *selector = Selector::History,
203 _ => {}
204 };
205 }
206 }
207 }
208}
209
210#[derive(Debug, Clone, Copy, PartialEq)]
211pub enum State {
212 MainMenu {
213 selector: Selector,
214 navigation: Option<MainMenuItem>,
215 selected: Option<MainMenuItem>,
216 },
217}
218
219#[derive(Debug, Clone, Copy, PartialEq)]
220pub enum MainMenuItem {
221 SearchBar,
222 Status,
223 Trending,
224 Popular,
225 History,
226 Videos,
227 VideoDetails,
228 StatusBar,
229}
230
231#[derive(Debug, Clone, Copy, PartialEq)]
232pub enum Selector {
233 Trending,
234 Popular,
235 History,
236}
src/main.rs added +68
@@ -0,0 +1,68 @@
1mod update;
2mod ui;
3pub use ui::*;
4pub use update::*;
5
6use youtube_tui::*;
7
8use crossterm::{
9 event::{self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode},
10 execute,
11 terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
12};
13use std::{error::Error, io};
14use tui::{
15 backend::{Backend, CrosstermBackend},
16 layout::{Alignment, Constraint, Direction, Layout},
17 style::{Color, Modifier, Style},
18 text::Span,
19 widgets::{Block, BorderType, Borders},
20 Frame, Terminal,
21};
22
23fn main() -> Result<(), Box<dyn Error>> {
24 // setup terminal
25 enable_raw_mode()?;
26 let mut stdout = io::stdout();
27 execute!(stdout, EnterAlternateScreen, EnableMouseCapture)?;
28 let backend = CrosstermBackend::new(stdout);
29 let mut terminal = Terminal::new(backend)?;
30
31 // create app and run it
32 let res = run_app(&mut terminal);
33
34 // restore terminal
35 disable_raw_mode()?;
36 execute!(
37 terminal.backend_mut(),
38 LeaveAlternateScreen,
39 DisableMouseCapture
40 )?;
41 terminal.show_cursor()?;
42
43 if let Err(err) = res {
44 println!("{:?}", err)
45 }
46
47 Ok(())
48}
49
50fn run_app<B: Backend>(terminal: &mut Terminal<B>) -> Result<(), Box<dyn Error>> {
51 let mut app = App::new();
52 loop {
53
54 let mut res = Ok(());
55 terminal.draw(|f|{res = ui(f, &mut app)})?;
56
57 res?;
58
59 if let Event::Key(key) = event::read()? {
60 if let KeyCode::Char('q') = key.code {
61 return Ok(());
62 } else {
63 res = update(&mut app, key.code);
64 }
65 }
66 }
67}
68
src/ui.rs added +200
@@ -0,0 +1,200 @@
1use std::error::Error;
2use youtube_tui::*;
3
4use crossterm::{
5 event::{self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode},
6 execute,
7 terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
8};
9use tui::{
10 backend::{Backend, CrosstermBackend},
11 layout::{Alignment, Constraint, Direction, Layout},
12 style::{Color, Modifier, Style},
13 text::Span,
14 widgets::{Block, BorderType, Borders, Paragraph, Wrap},
15 Frame, Terminal,
16};
17
18pub fn ui<B: Backend>(f: &mut Frame<B>, app: &mut App) -> Result<(), Box<dyn Error>> {
19 let size = f.size();
20
21 if size.width < 45 || size.height < 12 {
22 let paragraph = Paragraph::new(Span::styled(
23 "The terminal is too small to run this application (min. 45x12)",
24 Style::default().fg(Color::Red),
25 ))
26 .alignment(Alignment::Center)
27 .wrap(Wrap { trim: true });
28 f.render_widget(paragraph, size);
29 return Ok(());
30 }
31
32 let vertical_chunks = Layout::default()
33 .direction(Direction::Vertical)
34 .constraints(
35 [
36 Constraint::Length(3),
37 Constraint::Length(size.height - 6),
38 Constraint::Length(3),
39 ]
40 .as_ref(),
41 )
42 .split(size);
43
44 match app.state {
45 State::MainMenu {
46 selector,
47 selected,
48 navigation,
49 } => {
50 // Search bar
51
52 let color = if navigation == Some(MainMenuItem::SearchBar) {
53 Color::LightRed
54 } else if selected == Some(MainMenuItem::SearchBar) {
55 Color::LightBlue
56 } else {
57 Color::Reset
58 };
59
60 let block = Block::default()
61 .borders(Borders::ALL)
62 .border_type(BorderType::Rounded)
63 .style(Style::default().fg(color));
64 let search_text = String::from_iter(app.search_bar.iter());
65 let paragraph = Paragraph::new(search_text).block(block);
66 f.render_widget(paragraph, vertical_chunks[0]);
67
68 // Status bar
69 let color = if navigation == Some(MainMenuItem::StatusBar) {
70 Color::LightRed
71 } else if selected == Some(MainMenuItem::StatusBar) {
72 Color::LightBlue
73 } else {
74 Color::Reset
75 };
76
77 let block = Block::default()
78 .borders(Borders::ALL)
79 .border_type(BorderType::Rounded)
80 .style(Style::default().fg(color));
81 let status_text = app.status.clone().unwrap_or(String::from("All good :)"));
82 let paragraph = Paragraph::new(status_text).block(block);
83 f.render_widget(paragraph, vertical_chunks[2]);
84
85 let chunk = vertical_chunks[1];
86
87 let vertical_chunks = Layout::default()
88 .direction(Direction::Vertical)
89 .constraints([Constraint::Length(3), Constraint::Length(chunk.height - 3)].as_ref())
90 .split(chunk);
91
92 // Selection bar
93
94 let side_margin = (vertical_chunks[0].width - 45) / 2;
95 let selector_chunks = Layout::default()
96 .direction(Direction::Horizontal)
97 .constraints([Constraint::Length(side_margin), Constraint::Length(45)].as_ref())
98 .split(vertical_chunks[0])[1];
99 let selector_chunks = Layout::default()
100 .direction(Direction::Horizontal)
101 .constraints(
102 [
103 Constraint::Length(15),
104 Constraint::Length(15),
105 Constraint::Length(15),
106 Constraint::Length(0),
107 ]
108 .as_ref(),
109 )
110 .split(selector_chunks);
111
112 let color = if navigation == Some(MainMenuItem::Trending) {
113 Color::LightRed
114 } else if selected == Some(MainMenuItem::Trending) {
115 Color::LightBlue
116 } else {
117 Color::Reset
118 };
119 let block = Block::default()
120 .borders(Borders::ALL)
121 .border_type(BorderType::Rounded)
122 .style(Style::default().fg(color));
123 let paragraph = Paragraph::new(String::from("Trending"))
124 .block(block)
125 .alignment(Alignment::Center);
126 f.render_widget(paragraph, selector_chunks[0]);
127
128 let color = if navigation == Some(MainMenuItem::Popular) {
129 Color::LightRed
130 } else if selected == Some(MainMenuItem::Popular) {
131 Color::LightBlue
132 } else {
133 Color::Reset
134 };
135
136 let block = Block::default()
137 .borders(Borders::ALL)
138 .border_type(BorderType::Rounded)
139 .style(Style::default().fg(color));
140 let paragraph = Paragraph::new(String::from("Popular"))
141 .block(block)
142 .alignment(Alignment::Center);
143 f.render_widget(paragraph, selector_chunks[1]);
144
145 let color = if navigation == Some(MainMenuItem::History) {
146 Color::LightRed
147 } else if selected == Some(MainMenuItem::History) {
148 Color::LightBlue
149 } else {
150 Color::Reset
151 };
152 let block = Block::default()
153 .borders(Borders::ALL)
154 .border_type(BorderType::Rounded)
155 .style(Style::default().fg(color));
156 let paragraph = Paragraph::new(String::from("History"))
157 .block(block)
158 .alignment(Alignment::Center);
159
160 f.render_widget(paragraph, selector_chunks[2]);
161
162 // Body
163 let body_chunks = Layout::default()
164 .direction(Direction::Horizontal)
165 .constraints([Constraint::Percentage(40), Constraint::Percentage(60)].as_ref())
166 .split(vertical_chunks[1]);
167
168 let color = if navigation == Some(MainMenuItem::Videos) {
169 Color::LightRed
170 } else if selected == Some(MainMenuItem::Videos) {
171 Color::LightBlue
172 } else {
173 Color::Reset
174 };
175
176 let block = Block::default()
177 .borders(Borders::ALL)
178 .border_type(BorderType::Rounded)
179 .style(Style::default().fg(color));
180 let paragraph = Paragraph::new(String::from("")).block(block);
181 f.render_widget(paragraph, body_chunks[0]);
182
183 let color = if navigation == Some(MainMenuItem::VideoDetails) {
184 Color::LightRed
185 } else if selected == Some(MainMenuItem::VideoDetails) {
186 Color::LightBlue
187 } else {
188 Color::Reset
189 };
190
191 let block = Block::default()
192 .borders(Borders::ALL)
193 .border_type(BorderType::Rounded)
194 .style(Style::default().fg(color));
195 let paragraph = Paragraph::new(String::from("")).block(block);
196 f.render_widget(paragraph, body_chunks[1]);
197 }
198 };
199 Ok(())
200}
src/update.rs added +41
@@ -0,0 +1,41 @@
1use std::error::Error;
2use youtube_tui::*;
3
4use crossterm::{
5 event::{self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode},
6 execute,
7 terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
8};
9use tui::{
10 backend::{Backend, CrosstermBackend},
11 layout::{Alignment, Constraint, Direction, Layout},
12 style::{Color, Modifier, Style},
13 text::Span,
14 widgets::{Block, BorderType, Borders, Paragraph, Wrap},
15 Frame, Terminal,
16};
17
18pub fn update(app: &mut App, key: KeyCode) -> Result<(), Box<dyn Error>> {
19 app.status = Some(format!("{:?}", app.state));
20
21 match key {
22 KeyCode::Up => {
23 app.up();
24 }
25 KeyCode::Down => {
26 app.down();
27 }
28 KeyCode::Left => {
29 app.left();
30 }
31 KeyCode::Right => {
32 app.right();
33 }
34 KeyCode::Enter => {
35 app.enter();
36 }
37 _ => {
38 }
39 }
40 Ok(())
41}