summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2023-05-07 12:41:48 +0100
committerAkshay <[email protected]>2023-05-07 12:41:48 +0100
commitf13e8be9f32c5ca7f70dc809e3d43144f8e31396 (patch)
treeb0cf92d61a3ae3780cea633697e6cf5104132984
parent83c91eeeab4080d4dccd87607cf887e0133aa625 (diff)
progress
-rw-r--r--.gitignore1
-rw-r--r--Cargo.lock1569
-rw-r--r--Cargo.toml12
-rw-r--r--flake.nix10
-rw-r--r--src/dirs.rs17
-rw-r--r--src/error.rs66
-rw-r--r--src/feed.rs148
-rw-r--r--src/lib.rs5
-rw-r--r--src/main.rs38
-rw-r--r--src/manager.rs107
-rw-r--r--src/status.rs42
11 files changed, 2007 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index ea8c4bf..d787b70 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
1/target 1/target
2/result
diff --git a/Cargo.lock b/Cargo.lock
index b425a03..0a65e90 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3,5 +3,1572 @@
3version = 3 3version = 3
4 4
5[[package]] 5[[package]]
6name = "rust-bin" 6name = "aho-corasick"
7version = "1.0.1"
8source = "registry+https://github.com/rust-lang/crates.io-index"
9checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04"
10dependencies = [
11 "memchr",
12]
13
14[[package]]
15name = "android_system_properties"
16version = "0.1.5"
17source = "registry+https://github.com/rust-lang/crates.io-index"
18checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
19dependencies = [
20 "libc",
21]
22
23[[package]]
24name = "anstream"
25version = "0.3.2"
26source = "registry+https://github.com/rust-lang/crates.io-index"
27checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163"
28dependencies = [
29 "anstyle",
30 "anstyle-parse",
31 "anstyle-query",
32 "anstyle-wincon",
33 "colorchoice",
34 "is-terminal",
35 "utf8parse",
36]
37
38[[package]]
39name = "anstyle"
40version = "1.0.0"
41source = "registry+https://github.com/rust-lang/crates.io-index"
42checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d"
43
44[[package]]
45name = "anstyle-parse"
46version = "0.2.0"
47source = "registry+https://github.com/rust-lang/crates.io-index"
48checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee"
49dependencies = [
50 "utf8parse",
51]
52
53[[package]]
54name = "anstyle-query"
55version = "1.0.0"
56source = "registry+https://github.com/rust-lang/crates.io-index"
57checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
58dependencies = [
59 "windows-sys 0.48.0",
60]
61
62[[package]]
63name = "anstyle-wincon"
64version = "1.0.1"
65source = "registry+https://github.com/rust-lang/crates.io-index"
66checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188"
67dependencies = [
68 "anstyle",
69 "windows-sys 0.48.0",
70]
71
72[[package]]
73name = "autocfg"
74version = "1.1.0"
75source = "registry+https://github.com/rust-lang/crates.io-index"
76checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
77
78[[package]]
79name = "base64"
80version = "0.21.0"
81source = "registry+https://github.com/rust-lang/crates.io-index"
82checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"
83
84[[package]]
85name = "bitflags"
86version = "1.3.2"
87source = "registry+https://github.com/rust-lang/crates.io-index"
88checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
89
90[[package]]
91name = "bumpalo"
92version = "3.12.1"
93source = "registry+https://github.com/rust-lang/crates.io-index"
94checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8"
95
96[[package]]
97name = "bytes"
98version = "1.4.0"
99source = "registry+https://github.com/rust-lang/crates.io-index"
100checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
101
102[[package]]
103name = "cc"
104version = "1.0.79"
105source = "registry+https://github.com/rust-lang/crates.io-index"
106checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
107
108[[package]]
109name = "cfg-if"
110version = "1.0.0"
111source = "registry+https://github.com/rust-lang/crates.io-index"
112checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
113
114[[package]]
115name = "chrono"
116version = "0.4.24"
117source = "registry+https://github.com/rust-lang/crates.io-index"
118checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b"
119dependencies = [
120 "iana-time-zone",
121 "js-sys",
122 "num-integer",
123 "num-traits",
124 "serde",
125 "time",
126 "wasm-bindgen",
127 "winapi",
128]
129
130[[package]]
131name = "clap"
132version = "4.2.7"
133source = "registry+https://github.com/rust-lang/crates.io-index"
134checksum = "34d21f9bf1b425d2968943631ec91202fe5e837264063503708b83013f8fc938"
135dependencies = [
136 "clap_builder",
137]
138
139[[package]]
140name = "clap_builder"
141version = "4.2.7"
142source = "registry+https://github.com/rust-lang/crates.io-index"
143checksum = "914c8c79fb560f238ef6429439a30023c862f7a28e688c58f7203f12b29970bd"
144dependencies = [
145 "anstream",
146 "anstyle",
147 "bitflags",
148 "clap_lex",
149 "strsim",
150]
151
152[[package]]
153name = "clap_lex"
154version = "0.4.1"
155source = "registry+https://github.com/rust-lang/crates.io-index"
156checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1"
157
158[[package]]
159name = "codespan-reporting"
160version = "0.11.1"
161source = "registry+https://github.com/rust-lang/crates.io-index"
162checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
163dependencies = [
164 "termcolor",
165 "unicode-width",
166]
167
168[[package]]
169name = "colorchoice"
170version = "1.0.0"
171source = "registry+https://github.com/rust-lang/crates.io-index"
172checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
173
174[[package]]
175name = "core-foundation"
176version = "0.9.3"
177source = "registry+https://github.com/rust-lang/crates.io-index"
178checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
179dependencies = [
180 "core-foundation-sys",
181 "libc",
182]
183
184[[package]]
185name = "core-foundation-sys"
186version = "0.8.4"
187source = "registry+https://github.com/rust-lang/crates.io-index"
188checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
189
190[[package]]
191name = "cxx"
192version = "1.0.94"
193source = "registry+https://github.com/rust-lang/crates.io-index"
194checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93"
195dependencies = [
196 "cc",
197 "cxxbridge-flags",
198 "cxxbridge-macro",
199 "link-cplusplus",
200]
201
202[[package]]
203name = "cxx-build"
204version = "1.0.94"
205source = "registry+https://github.com/rust-lang/crates.io-index"
206checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b"
207dependencies = [
208 "cc",
209 "codespan-reporting",
210 "once_cell",
211 "proc-macro2",
212 "quote",
213 "scratch",
214 "syn 2.0.15",
215]
216
217[[package]]
218name = "cxxbridge-flags"
219version = "1.0.94"
220source = "registry+https://github.com/rust-lang/crates.io-index"
221checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb"
222
223[[package]]
224name = "cxxbridge-macro"
225version = "1.0.94"
226source = "registry+https://github.com/rust-lang/crates.io-index"
227checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5"
228dependencies = [
229 "proc-macro2",
230 "quote",
231 "syn 2.0.15",
232]
233
234[[package]]
235name = "encoding_rs"
236version = "0.8.32"
237source = "registry+https://github.com/rust-lang/crates.io-index"
238checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394"
239dependencies = [
240 "cfg-if",
241]
242
243[[package]]
244name = "errno"
245version = "0.3.1"
246source = "registry+https://github.com/rust-lang/crates.io-index"
247checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
248dependencies = [
249 "errno-dragonfly",
250 "libc",
251 "windows-sys 0.48.0",
252]
253
254[[package]]
255name = "errno-dragonfly"
256version = "0.1.2"
257source = "registry+https://github.com/rust-lang/crates.io-index"
258checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
259dependencies = [
260 "cc",
261 "libc",
262]
263
264[[package]]
265name = "fastrand"
266version = "1.9.0"
267source = "registry+https://github.com/rust-lang/crates.io-index"
268checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
269dependencies = [
270 "instant",
271]
272
273[[package]]
274name = "feed-rs"
275version = "1.3.0"
276source = "registry+https://github.com/rust-lang/crates.io-index"
277checksum = "9dbec361cb401c1b86aea784fb809073733da06b1a1fd794222e7bf9845db327"
278dependencies = [
279 "chrono",
280 "lazy_static",
281 "mime",
282 "quick-xml",
283 "regex",
284 "serde",
285 "serde_json",
286 "siphasher",
287 "url",
288 "uuid",
289]
290
291[[package]]
292name = "fnv"
293version = "1.0.7"
294source = "registry+https://github.com/rust-lang/crates.io-index"
295checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
296
297[[package]]
298name = "foreign-types"
299version = "0.3.2"
300source = "registry+https://github.com/rust-lang/crates.io-index"
301checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
302dependencies = [
303 "foreign-types-shared",
304]
305
306[[package]]
307name = "foreign-types-shared"
308version = "0.1.1"
309source = "registry+https://github.com/rust-lang/crates.io-index"
310checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
311
312[[package]]
313name = "form_urlencoded"
314version = "1.1.0"
315source = "registry+https://github.com/rust-lang/crates.io-index"
316checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8"
317dependencies = [
318 "percent-encoding",
319]
320
321[[package]]
322name = "futures"
323version = "0.3.28"
324source = "registry+https://github.com/rust-lang/crates.io-index"
325checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40"
326dependencies = [
327 "futures-channel",
328 "futures-core",
329 "futures-executor",
330 "futures-io",
331 "futures-sink",
332 "futures-task",
333 "futures-util",
334]
335
336[[package]]
337name = "futures-channel"
338version = "0.3.28"
339source = "registry+https://github.com/rust-lang/crates.io-index"
340checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2"
341dependencies = [
342 "futures-core",
343 "futures-sink",
344]
345
346[[package]]
347name = "futures-core"
348version = "0.3.28"
349source = "registry+https://github.com/rust-lang/crates.io-index"
350checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c"
351
352[[package]]
353name = "futures-executor"
354version = "0.3.28"
355source = "registry+https://github.com/rust-lang/crates.io-index"
356checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0"
357dependencies = [
358 "futures-core",
359 "futures-task",
360 "futures-util",
361]
362
363[[package]]
364name = "futures-io"
365version = "0.3.28"
366source = "registry+https://github.com/rust-lang/crates.io-index"
367checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964"
368
369[[package]]
370name = "futures-macro"
371version = "0.3.28"
372source = "registry+https://github.com/rust-lang/crates.io-index"
373checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
374dependencies = [
375 "proc-macro2",
376 "quote",
377 "syn 2.0.15",
378]
379
380[[package]]
381name = "futures-sink"
382version = "0.3.28"
383source = "registry+https://github.com/rust-lang/crates.io-index"
384checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e"
385
386[[package]]
387name = "futures-task"
388version = "0.3.28"
389source = "registry+https://github.com/rust-lang/crates.io-index"
390checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65"
391
392[[package]]
393name = "futures-util"
394version = "0.3.28"
395source = "registry+https://github.com/rust-lang/crates.io-index"
396checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533"
397dependencies = [
398 "futures-channel",
399 "futures-core",
400 "futures-io",
401 "futures-macro",
402 "futures-sink",
403 "futures-task",
404 "memchr",
405 "pin-project-lite",
406 "pin-utils",
407 "slab",
408]
409
410[[package]]
411name = "getrandom"
412version = "0.2.9"
413source = "registry+https://github.com/rust-lang/crates.io-index"
414checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4"
415dependencies = [
416 "cfg-if",
417 "libc",
418 "wasi 0.11.0+wasi-snapshot-preview1",
419]
420
421[[package]]
422name = "h2"
423version = "0.3.18"
424source = "registry+https://github.com/rust-lang/crates.io-index"
425checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21"
426dependencies = [
427 "bytes",
428 "fnv",
429 "futures-core",
430 "futures-sink",
431 "futures-util",
432 "http",
433 "indexmap",
434 "slab",
435 "tokio",
436 "tokio-util",
437 "tracing",
438]
439
440[[package]]
441name = "hashbrown"
442version = "0.12.3"
443source = "registry+https://github.com/rust-lang/crates.io-index"
444checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
445
446[[package]]
447name = "hermit-abi"
448version = "0.3.1"
449source = "registry+https://github.com/rust-lang/crates.io-index"
450checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
451
452[[package]]
453name = "http"
454version = "0.2.9"
455source = "registry+https://github.com/rust-lang/crates.io-index"
456checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
457dependencies = [
458 "bytes",
459 "fnv",
460 "itoa",
461]
462
463[[package]]
464name = "http-body"
465version = "0.4.5"
466source = "registry+https://github.com/rust-lang/crates.io-index"
467checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
468dependencies = [
469 "bytes",
470 "http",
471 "pin-project-lite",
472]
473
474[[package]]
475name = "httparse"
476version = "1.8.0"
477source = "registry+https://github.com/rust-lang/crates.io-index"
478checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
479
480[[package]]
481name = "httpdate"
482version = "1.0.2"
483source = "registry+https://github.com/rust-lang/crates.io-index"
484checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
485
486[[package]]
487name = "hyper"
488version = "0.14.26"
489source = "registry+https://github.com/rust-lang/crates.io-index"
490checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4"
491dependencies = [
492 "bytes",
493 "futures-channel",
494 "futures-core",
495 "futures-util",
496 "h2",
497 "http",
498 "http-body",
499 "httparse",
500 "httpdate",
501 "itoa",
502 "pin-project-lite",
503 "socket2",
504 "tokio",
505 "tower-service",
506 "tracing",
507 "want",
508]
509
510[[package]]
511name = "hyper-tls"
512version = "0.5.0"
513source = "registry+https://github.com/rust-lang/crates.io-index"
514checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
515dependencies = [
516 "bytes",
517 "hyper",
518 "native-tls",
519 "tokio",
520 "tokio-native-tls",
521]
522
523[[package]]
524name = "iana-time-zone"
525version = "0.1.56"
526source = "registry+https://github.com/rust-lang/crates.io-index"
527checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c"
528dependencies = [
529 "android_system_properties",
530 "core-foundation-sys",
531 "iana-time-zone-haiku",
532 "js-sys",
533 "wasm-bindgen",
534 "windows",
535]
536
537[[package]]
538name = "iana-time-zone-haiku"
539version = "0.1.1"
540source = "registry+https://github.com/rust-lang/crates.io-index"
541checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca"
542dependencies = [
543 "cxx",
544 "cxx-build",
545]
546
547[[package]]
548name = "idna"
549version = "0.3.0"
550source = "registry+https://github.com/rust-lang/crates.io-index"
551checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
552dependencies = [
553 "unicode-bidi",
554 "unicode-normalization",
555]
556
557[[package]]
558name = "indexmap"
559version = "1.9.3"
560source = "registry+https://github.com/rust-lang/crates.io-index"
561checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
562dependencies = [
563 "autocfg",
564 "hashbrown",
565]
566
567[[package]]
568name = "instant"
569version = "0.1.12"
570source = "registry+https://github.com/rust-lang/crates.io-index"
571checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
572dependencies = [
573 "cfg-if",
574]
575
576[[package]]
577name = "io-lifetimes"
578version = "1.0.10"
579source = "registry+https://github.com/rust-lang/crates.io-index"
580checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220"
581dependencies = [
582 "hermit-abi",
583 "libc",
584 "windows-sys 0.48.0",
585]
586
587[[package]]
588name = "ipnet"
589version = "2.7.2"
590source = "registry+https://github.com/rust-lang/crates.io-index"
591checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f"
592
593[[package]]
594name = "is-terminal"
595version = "0.4.7"
596source = "registry+https://github.com/rust-lang/crates.io-index"
597checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f"
598dependencies = [
599 "hermit-abi",
600 "io-lifetimes",
601 "rustix",
602 "windows-sys 0.48.0",
603]
604
605[[package]]
606name = "itoa"
607version = "1.0.6"
608source = "registry+https://github.com/rust-lang/crates.io-index"
609checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
610
611[[package]]
612name = "js-sys"
613version = "0.3.61"
614source = "registry+https://github.com/rust-lang/crates.io-index"
615checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730"
616dependencies = [
617 "wasm-bindgen",
618]
619
620[[package]]
621name = "lazy_static"
622version = "1.4.0"
623source = "registry+https://github.com/rust-lang/crates.io-index"
624checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
625
626[[package]]
627name = "libc"
628version = "0.2.142"
629source = "registry+https://github.com/rust-lang/crates.io-index"
630checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317"
631
632[[package]]
633name = "link-cplusplus"
634version = "1.0.8"
635source = "registry+https://github.com/rust-lang/crates.io-index"
636checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5"
637dependencies = [
638 "cc",
639]
640
641[[package]]
642name = "linux-raw-sys"
643version = "0.3.6"
644source = "registry+https://github.com/rust-lang/crates.io-index"
645checksum = "b64f40e5e03e0d54f03845c8197d0291253cdbedfb1cb46b13c2c117554a9f4c"
646
647[[package]]
648name = "log"
649version = "0.4.17"
650source = "registry+https://github.com/rust-lang/crates.io-index"
651checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
652dependencies = [
653 "cfg-if",
654]
655
656[[package]]
657name = "memchr"
658version = "2.5.0"
659source = "registry+https://github.com/rust-lang/crates.io-index"
660checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
661
662[[package]]
663name = "mime"
664version = "0.3.17"
665source = "registry+https://github.com/rust-lang/crates.io-index"
666checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
667
668[[package]]
669name = "mio"
670version = "0.8.6"
671source = "registry+https://github.com/rust-lang/crates.io-index"
672checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9"
673dependencies = [
674 "libc",
675 "log",
676 "wasi 0.11.0+wasi-snapshot-preview1",
677 "windows-sys 0.45.0",
678]
679
680[[package]]
681name = "native-tls"
682version = "0.2.11"
683source = "registry+https://github.com/rust-lang/crates.io-index"
684checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
685dependencies = [
686 "lazy_static",
687 "libc",
688 "log",
689 "openssl",
690 "openssl-probe",
691 "openssl-sys",
692 "schannel",
693 "security-framework",
694 "security-framework-sys",
695 "tempfile",
696]
697
698[[package]]
699name = "num-integer"
700version = "0.1.45"
701source = "registry+https://github.com/rust-lang/crates.io-index"
702checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
703dependencies = [
704 "autocfg",
705 "num-traits",
706]
707
708[[package]]
709name = "num-traits"
710version = "0.2.15"
711source = "registry+https://github.com/rust-lang/crates.io-index"
712checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
713dependencies = [
714 "autocfg",
715]
716
717[[package]]
718name = "once_cell"
719version = "1.17.1"
720source = "registry+https://github.com/rust-lang/crates.io-index"
721checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
722
723[[package]]
724name = "openssl"
725version = "0.10.52"
726source = "registry+https://github.com/rust-lang/crates.io-index"
727checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56"
728dependencies = [
729 "bitflags",
730 "cfg-if",
731 "foreign-types",
732 "libc",
733 "once_cell",
734 "openssl-macros",
735 "openssl-sys",
736]
737
738[[package]]
739name = "openssl-macros"
740version = "0.1.1"
741source = "registry+https://github.com/rust-lang/crates.io-index"
742checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
743dependencies = [
744 "proc-macro2",
745 "quote",
746 "syn 2.0.15",
747]
748
749[[package]]
750name = "openssl-probe"
751version = "0.1.5"
752source = "registry+https://github.com/rust-lang/crates.io-index"
753checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
754
755[[package]]
756name = "openssl-sys"
757version = "0.9.87"
758source = "registry+https://github.com/rust-lang/crates.io-index"
759checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e"
760dependencies = [
761 "cc",
762 "libc",
763 "pkg-config",
764 "vcpkg",
765]
766
767[[package]]
768name = "percent-encoding"
769version = "2.2.0"
770source = "registry+https://github.com/rust-lang/crates.io-index"
771checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
772
773[[package]]
774name = "pin-project-lite"
775version = "0.2.9"
776source = "registry+https://github.com/rust-lang/crates.io-index"
777checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
778
779[[package]]
780name = "pin-utils"
7version = "0.1.0" 781version = "0.1.0"
782source = "registry+https://github.com/rust-lang/crates.io-index"
783checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
784
785[[package]]
786name = "pkg-config"
787version = "0.3.26"
788source = "registry+https://github.com/rust-lang/crates.io-index"
789checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
790
791[[package]]
792name = "proc-macro2"
793version = "1.0.56"
794source = "registry+https://github.com/rust-lang/crates.io-index"
795checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435"
796dependencies = [
797 "unicode-ident",
798]
799
800[[package]]
801name = "quick-xml"
802version = "0.27.1"
803source = "registry+https://github.com/rust-lang/crates.io-index"
804checksum = "ffc053f057dd768a56f62cd7e434c42c831d296968997e9ac1f76ea7c2d14c41"
805dependencies = [
806 "encoding_rs",
807 "memchr",
808]
809
810[[package]]
811name = "quote"
812version = "1.0.26"
813source = "registry+https://github.com/rust-lang/crates.io-index"
814checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
815dependencies = [
816 "proc-macro2",
817]
818
819[[package]]
820name = "redox_syscall"
821version = "0.3.5"
822source = "registry+https://github.com/rust-lang/crates.io-index"
823checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
824dependencies = [
825 "bitflags",
826]
827
828[[package]]
829name = "regex"
830version = "1.8.1"
831source = "registry+https://github.com/rust-lang/crates.io-index"
832checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370"
833dependencies = [
834 "aho-corasick",
835 "memchr",
836 "regex-syntax",
837]
838
839[[package]]
840name = "regex-syntax"
841version = "0.7.1"
842source = "registry+https://github.com/rust-lang/crates.io-index"
843checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c"
844
845[[package]]
846name = "reqwest"
847version = "0.11.17"
848source = "registry+https://github.com/rust-lang/crates.io-index"
849checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91"
850dependencies = [
851 "base64",
852 "bytes",
853 "encoding_rs",
854 "futures-core",
855 "futures-util",
856 "h2",
857 "http",
858 "http-body",
859 "hyper",
860 "hyper-tls",
861 "ipnet",
862 "js-sys",
863 "log",
864 "mime",
865 "native-tls",
866 "once_cell",
867 "percent-encoding",
868 "pin-project-lite",
869 "serde",
870 "serde_json",
871 "serde_urlencoded",
872 "tokio",
873 "tokio-native-tls",
874 "tower-service",
875 "url",
876 "wasm-bindgen",
877 "wasm-bindgen-futures",
878 "web-sys",
879 "winreg",
880]
881
882[[package]]
883name = "rustix"
884version = "0.37.17"
885source = "registry+https://github.com/rust-lang/crates.io-index"
886checksum = "bc809f704c03a812ac71f22456c857be34185cac691a4316f27ab0f633bb9009"
887dependencies = [
888 "bitflags",
889 "errno",
890 "io-lifetimes",
891 "libc",
892 "linux-raw-sys",
893 "windows-sys 0.48.0",
894]
895
896[[package]]
897name = "ryu"
898version = "1.0.13"
899source = "registry+https://github.com/rust-lang/crates.io-index"
900checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
901
902[[package]]
903name = "schannel"
904version = "0.1.21"
905source = "registry+https://github.com/rust-lang/crates.io-index"
906checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3"
907dependencies = [
908 "windows-sys 0.42.0",
909]
910
911[[package]]
912name = "scratch"
913version = "1.0.5"
914source = "registry+https://github.com/rust-lang/crates.io-index"
915checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1"
916
917[[package]]
918name = "security-framework"
919version = "2.8.2"
920source = "registry+https://github.com/rust-lang/crates.io-index"
921checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254"
922dependencies = [
923 "bitflags",
924 "core-foundation",
925 "core-foundation-sys",
926 "libc",
927 "security-framework-sys",
928]
929
930[[package]]
931name = "security-framework-sys"
932version = "2.8.0"
933source = "registry+https://github.com/rust-lang/crates.io-index"
934checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4"
935dependencies = [
936 "core-foundation-sys",
937 "libc",
938]
939
940[[package]]
941name = "serde"
942version = "1.0.160"
943source = "registry+https://github.com/rust-lang/crates.io-index"
944checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c"
945dependencies = [
946 "serde_derive",
947]
948
949[[package]]
950name = "serde_derive"
951version = "1.0.160"
952source = "registry+https://github.com/rust-lang/crates.io-index"
953checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df"
954dependencies = [
955 "proc-macro2",
956 "quote",
957 "syn 2.0.15",
958]
959
960[[package]]
961name = "serde_json"
962version = "1.0.96"
963source = "registry+https://github.com/rust-lang/crates.io-index"
964checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1"
965dependencies = [
966 "itoa",
967 "ryu",
968 "serde",
969]
970
971[[package]]
972name = "serde_urlencoded"
973version = "0.7.1"
974source = "registry+https://github.com/rust-lang/crates.io-index"
975checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
976dependencies = [
977 "form_urlencoded",
978 "itoa",
979 "ryu",
980 "serde",
981]
982
983[[package]]
984name = "serde_yaml"
985version = "0.9.21"
986source = "registry+https://github.com/rust-lang/crates.io-index"
987checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c"
988dependencies = [
989 "indexmap",
990 "itoa",
991 "ryu",
992 "serde",
993 "unsafe-libyaml",
994]
995
996[[package]]
997name = "siphasher"
998version = "0.3.10"
999source = "registry+https://github.com/rust-lang/crates.io-index"
1000checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
1001
1002[[package]]
1003name = "slab"
1004version = "0.4.8"
1005source = "registry+https://github.com/rust-lang/crates.io-index"
1006checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
1007dependencies = [
1008 "autocfg",
1009]
1010
1011[[package]]
1012name = "socket2"
1013version = "0.4.9"
1014source = "registry+https://github.com/rust-lang/crates.io-index"
1015checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
1016dependencies = [
1017 "libc",
1018 "winapi",
1019]
1020
1021[[package]]
1022name = "strsim"
1023version = "0.10.0"
1024source = "registry+https://github.com/rust-lang/crates.io-index"
1025checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
1026
1027[[package]]
1028name = "syn"
1029version = "0.1.0"
1030dependencies = [
1031 "chrono",
1032 "clap",
1033 "feed-rs",
1034 "futures",
1035 "reqwest",
1036 "serde",
1037 "serde_yaml",
1038 "thiserror",
1039 "tokio",
1040 "url",
1041]
1042
1043[[package]]
1044name = "syn"
1045version = "1.0.109"
1046source = "registry+https://github.com/rust-lang/crates.io-index"
1047checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
1048dependencies = [
1049 "proc-macro2",
1050 "quote",
1051 "unicode-ident",
1052]
1053
1054[[package]]
1055name = "syn"
1056version = "2.0.15"
1057source = "registry+https://github.com/rust-lang/crates.io-index"
1058checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822"
1059dependencies = [
1060 "proc-macro2",
1061 "quote",
1062 "unicode-ident",
1063]
1064
1065[[package]]
1066name = "tempfile"
1067version = "3.5.0"
1068source = "registry+https://github.com/rust-lang/crates.io-index"
1069checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998"
1070dependencies = [
1071 "cfg-if",
1072 "fastrand",
1073 "redox_syscall",
1074 "rustix",
1075 "windows-sys 0.45.0",
1076]
1077
1078[[package]]
1079name = "termcolor"
1080version = "1.2.0"
1081source = "registry+https://github.com/rust-lang/crates.io-index"
1082checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
1083dependencies = [
1084 "winapi-util",
1085]
1086
1087[[package]]
1088name = "thiserror"
1089version = "1.0.40"
1090source = "registry+https://github.com/rust-lang/crates.io-index"
1091checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
1092dependencies = [
1093 "thiserror-impl",
1094]
1095
1096[[package]]
1097name = "thiserror-impl"
1098version = "1.0.40"
1099source = "registry+https://github.com/rust-lang/crates.io-index"
1100checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
1101dependencies = [
1102 "proc-macro2",
1103 "quote",
1104 "syn 2.0.15",
1105]
1106
1107[[package]]
1108name = "time"
1109version = "0.1.45"
1110source = "registry+https://github.com/rust-lang/crates.io-index"
1111checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
1112dependencies = [
1113 "libc",
1114 "wasi 0.10.0+wasi-snapshot-preview1",
1115 "winapi",
1116]
1117
1118[[package]]
1119name = "tinyvec"
1120version = "1.6.0"
1121source = "registry+https://github.com/rust-lang/crates.io-index"
1122checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
1123dependencies = [
1124 "tinyvec_macros",
1125]
1126
1127[[package]]
1128name = "tinyvec_macros"
1129version = "0.1.1"
1130source = "registry+https://github.com/rust-lang/crates.io-index"
1131checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
1132
1133[[package]]
1134name = "tokio"
1135version = "1.28.0"
1136source = "registry+https://github.com/rust-lang/crates.io-index"
1137checksum = "c3c786bf8134e5a3a166db9b29ab8f48134739014a3eca7bc6bfa95d673b136f"
1138dependencies = [
1139 "autocfg",
1140 "bytes",
1141 "libc",
1142 "mio",
1143 "pin-project-lite",
1144 "socket2",
1145 "tokio-macros",
1146 "windows-sys 0.48.0",
1147]
1148
1149[[package]]
1150name = "tokio-macros"
1151version = "2.1.0"
1152source = "registry+https://github.com/rust-lang/crates.io-index"
1153checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
1154dependencies = [
1155 "proc-macro2",
1156 "quote",
1157 "syn 2.0.15",
1158]
1159
1160[[package]]
1161name = "tokio-native-tls"
1162version = "0.3.1"
1163source = "registry+https://github.com/rust-lang/crates.io-index"
1164checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
1165dependencies = [
1166 "native-tls",
1167 "tokio",
1168]
1169
1170[[package]]
1171name = "tokio-util"
1172version = "0.7.8"
1173source = "registry+https://github.com/rust-lang/crates.io-index"
1174checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d"
1175dependencies = [
1176 "bytes",
1177 "futures-core",
1178 "futures-sink",
1179 "pin-project-lite",
1180 "tokio",
1181 "tracing",
1182]
1183
1184[[package]]
1185name = "tower-service"
1186version = "0.3.2"
1187source = "registry+https://github.com/rust-lang/crates.io-index"
1188checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
1189
1190[[package]]
1191name = "tracing"
1192version = "0.1.37"
1193source = "registry+https://github.com/rust-lang/crates.io-index"
1194checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
1195dependencies = [
1196 "cfg-if",
1197 "pin-project-lite",
1198 "tracing-core",
1199]
1200
1201[[package]]
1202name = "tracing-core"
1203version = "0.1.30"
1204source = "registry+https://github.com/rust-lang/crates.io-index"
1205checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a"
1206dependencies = [
1207 "once_cell",
1208]
1209
1210[[package]]
1211name = "try-lock"
1212version = "0.2.4"
1213source = "registry+https://github.com/rust-lang/crates.io-index"
1214checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
1215
1216[[package]]
1217name = "unicode-bidi"
1218version = "0.3.13"
1219source = "registry+https://github.com/rust-lang/crates.io-index"
1220checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
1221
1222[[package]]
1223name = "unicode-ident"
1224version = "1.0.8"
1225source = "registry+https://github.com/rust-lang/crates.io-index"
1226checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
1227
1228[[package]]
1229name = "unicode-normalization"
1230version = "0.1.22"
1231source = "registry+https://github.com/rust-lang/crates.io-index"
1232checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
1233dependencies = [
1234 "tinyvec",
1235]
1236
1237[[package]]
1238name = "unicode-width"
1239version = "0.1.10"
1240source = "registry+https://github.com/rust-lang/crates.io-index"
1241checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
1242
1243[[package]]
1244name = "unsafe-libyaml"
1245version = "0.2.8"
1246source = "registry+https://github.com/rust-lang/crates.io-index"
1247checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6"
1248
1249[[package]]
1250name = "url"
1251version = "2.3.1"
1252source = "registry+https://github.com/rust-lang/crates.io-index"
1253checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643"
1254dependencies = [
1255 "form_urlencoded",
1256 "idna",
1257 "percent-encoding",
1258 "serde",
1259]
1260
1261[[package]]
1262name = "utf8parse"
1263version = "0.2.1"
1264source = "registry+https://github.com/rust-lang/crates.io-index"
1265checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
1266
1267[[package]]
1268name = "uuid"
1269version = "1.3.2"
1270source = "registry+https://github.com/rust-lang/crates.io-index"
1271checksum = "4dad5567ad0cf5b760e5665964bec1b47dfd077ba8a2544b513f3556d3d239a2"
1272dependencies = [
1273 "getrandom",
1274]
1275
1276[[package]]
1277name = "vcpkg"
1278version = "0.2.15"
1279source = "registry+https://github.com/rust-lang/crates.io-index"
1280checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
1281
1282[[package]]
1283name = "want"
1284version = "0.3.0"
1285source = "registry+https://github.com/rust-lang/crates.io-index"
1286checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
1287dependencies = [
1288 "log",
1289 "try-lock",
1290]
1291
1292[[package]]
1293name = "wasi"
1294version = "0.10.0+wasi-snapshot-preview1"
1295source = "registry+https://github.com/rust-lang/crates.io-index"
1296checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
1297
1298[[package]]
1299name = "wasi"
1300version = "0.11.0+wasi-snapshot-preview1"
1301source = "registry+https://github.com/rust-lang/crates.io-index"
1302checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
1303
1304[[package]]
1305name = "wasm-bindgen"
1306version = "0.2.84"
1307source = "registry+https://github.com/rust-lang/crates.io-index"
1308checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b"
1309dependencies = [
1310 "cfg-if",
1311 "wasm-bindgen-macro",
1312]
1313
1314[[package]]
1315name = "wasm-bindgen-backend"
1316version = "0.2.84"
1317source = "registry+https://github.com/rust-lang/crates.io-index"
1318checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
1319dependencies = [
1320 "bumpalo",
1321 "log",
1322 "once_cell",
1323 "proc-macro2",
1324 "quote",
1325 "syn 1.0.109",
1326 "wasm-bindgen-shared",
1327]
1328
1329[[package]]
1330name = "wasm-bindgen-futures"
1331version = "0.4.34"
1332source = "registry+https://github.com/rust-lang/crates.io-index"
1333checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454"
1334dependencies = [
1335 "cfg-if",
1336 "js-sys",
1337 "wasm-bindgen",
1338 "web-sys",
1339]
1340
1341[[package]]
1342name = "wasm-bindgen-macro"
1343version = "0.2.84"
1344source = "registry+https://github.com/rust-lang/crates.io-index"
1345checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5"
1346dependencies = [
1347 "quote",
1348 "wasm-bindgen-macro-support",
1349]
1350
1351[[package]]
1352name = "wasm-bindgen-macro-support"
1353version = "0.2.84"
1354source = "registry+https://github.com/rust-lang/crates.io-index"
1355checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6"
1356dependencies = [
1357 "proc-macro2",
1358 "quote",
1359 "syn 1.0.109",
1360 "wasm-bindgen-backend",
1361 "wasm-bindgen-shared",
1362]
1363
1364[[package]]
1365name = "wasm-bindgen-shared"
1366version = "0.2.84"
1367source = "registry+https://github.com/rust-lang/crates.io-index"
1368checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
1369
1370[[package]]
1371name = "web-sys"
1372version = "0.3.61"
1373source = "registry+https://github.com/rust-lang/crates.io-index"
1374checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97"
1375dependencies = [
1376 "js-sys",
1377 "wasm-bindgen",
1378]
1379
1380[[package]]
1381name = "winapi"
1382version = "0.3.9"
1383source = "registry+https://github.com/rust-lang/crates.io-index"
1384checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
1385dependencies = [
1386 "winapi-i686-pc-windows-gnu",
1387 "winapi-x86_64-pc-windows-gnu",
1388]
1389
1390[[package]]
1391name = "winapi-i686-pc-windows-gnu"
1392version = "0.4.0"
1393source = "registry+https://github.com/rust-lang/crates.io-index"
1394checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
1395
1396[[package]]
1397name = "winapi-util"
1398version = "0.1.5"
1399source = "registry+https://github.com/rust-lang/crates.io-index"
1400checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
1401dependencies = [
1402 "winapi",
1403]
1404
1405[[package]]
1406name = "winapi-x86_64-pc-windows-gnu"
1407version = "0.4.0"
1408source = "registry+https://github.com/rust-lang/crates.io-index"
1409checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1410
1411[[package]]
1412name = "windows"
1413version = "0.48.0"
1414source = "registry+https://github.com/rust-lang/crates.io-index"
1415checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
1416dependencies = [
1417 "windows-targets 0.48.0",
1418]
1419
1420[[package]]
1421name = "windows-sys"
1422version = "0.42.0"
1423source = "registry+https://github.com/rust-lang/crates.io-index"
1424checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
1425dependencies = [
1426 "windows_aarch64_gnullvm 0.42.2",
1427 "windows_aarch64_msvc 0.42.2",
1428 "windows_i686_gnu 0.42.2",
1429 "windows_i686_msvc 0.42.2",
1430 "windows_x86_64_gnu 0.42.2",
1431 "windows_x86_64_gnullvm 0.42.2",
1432 "windows_x86_64_msvc 0.42.2",
1433]
1434
1435[[package]]
1436name = "windows-sys"
1437version = "0.45.0"
1438source = "registry+https://github.com/rust-lang/crates.io-index"
1439checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
1440dependencies = [
1441 "windows-targets 0.42.2",
1442]
1443
1444[[package]]
1445name = "windows-sys"
1446version = "0.48.0"
1447source = "registry+https://github.com/rust-lang/crates.io-index"
1448checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
1449dependencies = [
1450 "windows-targets 0.48.0",
1451]
1452
1453[[package]]
1454name = "windows-targets"
1455version = "0.42.2"
1456source = "registry+https://github.com/rust-lang/crates.io-index"
1457checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
1458dependencies = [
1459 "windows_aarch64_gnullvm 0.42.2",
1460 "windows_aarch64_msvc 0.42.2",
1461 "windows_i686_gnu 0.42.2",
1462 "windows_i686_msvc 0.42.2",
1463 "windows_x86_64_gnu 0.42.2",
1464 "windows_x86_64_gnullvm 0.42.2",
1465 "windows_x86_64_msvc 0.42.2",
1466]
1467
1468[[package]]
1469name = "windows-targets"
1470version = "0.48.0"
1471source = "registry+https://github.com/rust-lang/crates.io-index"
1472checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
1473dependencies = [
1474 "windows_aarch64_gnullvm 0.48.0",
1475 "windows_aarch64_msvc 0.48.0",
1476 "windows_i686_gnu 0.48.0",
1477 "windows_i686_msvc 0.48.0",
1478 "windows_x86_64_gnu 0.48.0",
1479 "windows_x86_64_gnullvm 0.48.0",
1480 "windows_x86_64_msvc 0.48.0",
1481]
1482
1483[[package]]
1484name = "windows_aarch64_gnullvm"
1485version = "0.42.2"
1486source = "registry+https://github.com/rust-lang/crates.io-index"
1487checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
1488
1489[[package]]
1490name = "windows_aarch64_gnullvm"
1491version = "0.48.0"
1492source = "registry+https://github.com/rust-lang/crates.io-index"
1493checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
1494
1495[[package]]
1496name = "windows_aarch64_msvc"
1497version = "0.42.2"
1498source = "registry+https://github.com/rust-lang/crates.io-index"
1499checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
1500
1501[[package]]
1502name = "windows_aarch64_msvc"
1503version = "0.48.0"
1504source = "registry+https://github.com/rust-lang/crates.io-index"
1505checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
1506
1507[[package]]
1508name = "windows_i686_gnu"
1509version = "0.42.2"
1510source = "registry+https://github.com/rust-lang/crates.io-index"
1511checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
1512
1513[[package]]
1514name = "windows_i686_gnu"
1515version = "0.48.0"
1516source = "registry+https://github.com/rust-lang/crates.io-index"
1517checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
1518
1519[[package]]
1520name = "windows_i686_msvc"
1521version = "0.42.2"
1522source = "registry+https://github.com/rust-lang/crates.io-index"
1523checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
1524
1525[[package]]
1526name = "windows_i686_msvc"
1527version = "0.48.0"
1528source = "registry+https://github.com/rust-lang/crates.io-index"
1529checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
1530
1531[[package]]
1532name = "windows_x86_64_gnu"
1533version = "0.42.2"
1534source = "registry+https://github.com/rust-lang/crates.io-index"
1535checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
1536
1537[[package]]
1538name = "windows_x86_64_gnu"
1539version = "0.48.0"
1540source = "registry+https://github.com/rust-lang/crates.io-index"
1541checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
1542
1543[[package]]
1544name = "windows_x86_64_gnullvm"
1545version = "0.42.2"
1546source = "registry+https://github.com/rust-lang/crates.io-index"
1547checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
1548
1549[[package]]
1550name = "windows_x86_64_gnullvm"
1551version = "0.48.0"
1552source = "registry+https://github.com/rust-lang/crates.io-index"
1553checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
1554
1555[[package]]
1556name = "windows_x86_64_msvc"
1557version = "0.42.2"
1558source = "registry+https://github.com/rust-lang/crates.io-index"
1559checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
1560
1561[[package]]
1562name = "windows_x86_64_msvc"
1563version = "0.48.0"
1564source = "registry+https://github.com/rust-lang/crates.io-index"
1565checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
1566
1567[[package]]
1568name = "winreg"
1569version = "0.10.1"
1570source = "registry+https://github.com/rust-lang/crates.io-index"
1571checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
1572dependencies = [
1573 "winapi",
1574]
diff --git a/Cargo.toml b/Cargo.toml
index c97aa53..2894ee0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,8 +1,18 @@
1[package] 1[package]
2name = "rust-bin" 2name = "syn"
3version = "0.1.0" 3version = "0.1.0"
4edition = "2021" 4edition = "2021"
5 5
6# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 6# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7 7
8[dependencies] 8[dependencies]
9feed-rs = "1.3"
10tokio = { version = "1", features = [ "rt", "macros" ]}
11reqwest = "0.11"
12url = { version = "2.3", features = [ "serde" ]}
13serde = { version = "1", features = [ "derive" ]}
14serde_yaml = "0.9"
15chrono = { version = "0.4", features = [ "std", "serde" ] }
16thiserror = "1"
17futures = "0.3"
18clap = "4.2"
diff --git a/flake.nix b/flake.nix
index 28b7a60..a617508 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,5 +1,5 @@
1{ 1{
2 description = "build rust binaries"; 2 description = "a unixy rss/atom reader";
3 3
4 outputs = { self, nixpkgs }: 4 outputs = { self, nixpkgs }:
5 let 5 let
@@ -13,7 +13,7 @@
13 { 13 {
14 14
15 overlays.default = final: prev: { 15 overlays.default = final: prev: {
16 rust-bin = 16 syn =
17 let 17 let
18 packageMeta = (final.lib.importTOML ./Cargo.toml).package; 18 packageMeta = (final.lib.importTOML ./Cargo.toml).package;
19 in 19 in
@@ -21,15 +21,17 @@
21 pname = packageMeta.name; 21 pname = packageMeta.name;
22 inherit (packageMeta) version; 22 inherit (packageMeta) version;
23 src = self; 23 src = self;
24 nativeBuildInputs = [ final.pkg-config ];
25 buildInputs = [ final.openssl ];
24 cargoLock.lockFile = ./Cargo.lock; 26 cargoLock.lockFile = ./Cargo.lock;
25 }; 27 };
26 }; 28 };
27 29
28 packages = forAllSystems (system: { 30 packages = forAllSystems (system: {
29 inherit (nixpkgsFor."${system}") rust-bin; 31 inherit (nixpkgsFor."${system}") syn;
30 }); 32 });
31 33
32 defaultPackage = forAllSystems (system: self.packages."${system}".rust-bin); 34 defaultPackage = forAllSystems (system: self.packages."${system}".syn);
33 35
34 devShell = forAllSystems (system: 36 devShell = forAllSystems (system:
35 let 37 let
diff --git a/src/dirs.rs b/src/dirs.rs
new file mode 100644
index 0000000..de7c156
--- /dev/null
+++ b/src/dirs.rs
@@ -0,0 +1,17 @@
1use std::{env, path::PathBuf};
2
3pub fn store_path() -> Option<PathBuf> {
4 cache_dir().map(|c| c.join("syn"))
5}
6
7fn cache_dir() -> Option<PathBuf> {
8 env::var_os("XDG_CACHE_HOME")
9 .map(PathBuf::from)
10 .or_else(|| home_dir().map(|h| h.join(".cache")))
11}
12
13fn home_dir() -> Option<PathBuf> {
14 env::var_os("HOME")
15 .and_then(|h| if h.is_empty() { None } else { Some(h) })
16 .map(PathBuf::from)
17}
diff --git a/src/error.rs b/src/error.rs
new file mode 100644
index 0000000..8a2059e
--- /dev/null
+++ b/src/error.rs
@@ -0,0 +1,66 @@
1use feed_rs::parser;
2use thiserror::Error;
3use url::Url;
4
5#[derive(Debug, Error)]
6pub enum Error {
7 #[error("error pulling feed `{0}`: {1}")]
8 Pull(Url, PullError),
9
10 #[error("error parsing entry: {0}")]
11 Entry(#[from] EntryError),
12
13 #[error("error adding field: {0}")]
14 Add(#[from] AddError),
15}
16
17#[derive(Debug, Error)]
18pub enum PullError {
19 #[error("failed to make request")]
20 Request(#[from] reqwest::Error),
21
22 #[error("invalid rss feed: {0}")]
23 Parse(#[from] parser::ParseFeedError),
24
25 #[error("failed to pull feed title")]
26 TitleUpdate,
27
28 #[error("failed to pull feed link")]
29 LinkUpdate,
30}
31
32#[derive(Debug, Error)]
33pub enum EntryError {
34 #[error("missing title")]
35 MissingTitle,
36
37 #[error("missing link")]
38 MissingLink,
39
40 #[error("invalid link")]
41 InvalidLink,
42
43 #[error("missing publish-date")]
44 MissingPubDate,
45}
46
47#[derive(Debug, Error)]
48pub enum AddError {
49 #[error("invalid url: {0}")]
50 InvalidUrl(String),
51
52 #[error("feed is already present")]
53 DuplicateLink,
54}
55
56#[derive(Debug, Error)]
57pub enum IOError {
58 #[error("unable to create or find store path")]
59 MissingStorePath,
60
61 #[error("file error:")]
62 FileIO(#[from] std::io::Error),
63
64 #[error("yaml ser/de error")]
65 Serde(#[from] serde_yaml::Error),
66}
diff --git a/src/feed.rs b/src/feed.rs
new file mode 100644
index 0000000..3926fd4
--- /dev/null
+++ b/src/feed.rs
@@ -0,0 +1,148 @@
1use std::fmt;
2
3use crate::{
4 error::{EntryError, PullError},
5 status::PullStatus,
6};
7
8use chrono::prelude::*;
9use feed_rs::{
10 model::{Entry as ChannelEntry, Feed as Channel},
11 parser,
12};
13use serde::{Deserialize, Serialize};
14use url::Url;
15
16#[derive(Debug, Clone, Serialize, Deserialize)]
17pub struct Feed {
18 // channel url
19 pub link: Url,
20
21 // channel data
22 entries: Vec<Entry>,
23
24 // channel meta
25 title: String,
26 html_link: String,
27}
28
29impl Feed {
30 pub fn new(link: Url) -> Self {
31 Self {
32 link,
33 entries: Vec::new(),
34 title: String::new(),
35 html_link: String::new(),
36 }
37 }
38
39 pub fn total_count(&self) -> usize {
40 self.entries.len()
41 }
42
43 pub fn unread_count(&self) -> usize {
44 self.entries.iter().filter(|e| e.unread).count()
45 }
46
47 fn update_title(&mut self, channel: &Channel) -> bool {
48 if let Some(t) = channel.title.as_ref() {
49 self.title = t.content.clone();
50 return true;
51 }
52 false
53 }
54
55 fn update_html_link(&mut self, channel: &Channel) -> bool {
56 // update html link
57 if let Some(l) = channel.links.first() {
58 self.html_link = l.href.clone();
59 return true;
60 }
61 false
62 }
63
64 pub fn entries(&self) -> &[Entry] {
65 self.entries.as_slice()
66 }
67
68 pub async fn pull(&mut self) -> Result<PullStatus, PullError> {
69 let content = reqwest::get(self.link.clone()).await?.bytes().await?;
70 let channel = parser::parse(&content[..])?;
71
72 // update title
73 if !self.update_title(&channel) {
74 return Err(PullError::TitleUpdate);
75 }
76
77 // update html link
78 if !self.update_html_link(&channel) {
79 return Err(PullError::LinkUpdate);
80 };
81
82 // fetch new entries
83 let (entries, errors): (Vec<_>, Vec<_>) = channel
84 .entries
85 .iter()
86 .map(Entry::try_from)
87 .partition(Result::is_ok);
88
89 // pull status
90 let count = entries.len().saturating_sub(self.total_count());
91 let errors = errors.into_iter().map(Result::unwrap_err).collect();
92
93 let pull_status = PullStatus::new(count, errors);
94
95 // update entries
96 self.entries = entries.into_iter().map(Result::unwrap).collect();
97
98 Ok(pull_status)
99 }
100}
101
102impl fmt::Display for Feed {
103 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
104 write!(f, "{}", self.title)
105 }
106}
107
108#[derive(Debug, Clone, Serialize, Deserialize)]
109pub struct Entry {
110 pub title: String,
111 pub link: Url,
112 pub published: DateTime<Utc>,
113 pub unread: bool,
114}
115
116impl TryFrom<&ChannelEntry> for Entry {
117 type Error = EntryError;
118 fn try_from(e: &ChannelEntry) -> Result<Self, Self::Error> {
119 let title = e
120 .title
121 .as_ref()
122 .map(|t| t.content.clone())
123 .ok_or(EntryError::MissingTitle)?;
124 let raw_link = e
125 .links
126 .first()
127 .map(|l| l.href.clone())
128 .ok_or(EntryError::MissingLink)?;
129 let link = Url::parse(&raw_link).map_err(|_| EntryError::InvalidLink)?;
130 let published = e
131 .published
132 .or(e.updated)
133 .ok_or(EntryError::MissingPubDate)?;
134
135 Ok(Self {
136 title,
137 link,
138 published,
139 unread: true,
140 })
141 }
142}
143
144impl fmt::Display for Entry {
145 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
146 write!(f, "{} {} {}", self.link, self.title, self.published)
147 }
148}
diff --git a/src/lib.rs b/src/lib.rs
new file mode 100644
index 0000000..b66a7b4
--- /dev/null
+++ b/src/lib.rs
@@ -0,0 +1,5 @@
1mod dirs;
2pub mod error;
3pub mod feed;
4pub mod manager;
5pub mod status;
diff --git a/src/main.rs b/src/main.rs
index e7a11a9..fccc7fd 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,37 @@
1fn main() { 1use syn::manager::Manager;
2 println!("Hello, world!"); 2
3#[tokio::main(flavor = "current_thread")]
4async fn main() {
5 let mut manager = Manager::default();
6
7 let feeds = vec![
8 "https://peppe.rs/index.xml",
9 "https://jvns.ca/atom.xml",
10 // "https://www.youtube.com/feeds/videos.xml?channel_id=UCuTaETsuCOkJ0H_GAztWt0Q",
11 ];
12
13 for f in feeds {
14 match manager.add_feed(f).await {
15 Ok(s) => println!("{s}"),
16 Err(e) => println!("{e}"),
17 }
18 }
19
20 for entry in manager.list_entries() {
21 println!("{entry}");
22 }
23
24 // let mut feed = Feed::new(url);
25
26 // feed.resolve().await.unwrap();
27
28 // let last_read = DateTime::parse_from_rfc2822("Mon, 16 Mar 2020 18:30:00 +0000")
29 // .unwrap()
30 // .with_timezone(&Utc);
31
32 // feed.last_read = last_read;
33
34 // for i in feed.unread().unwrap() {
35 // println!("{}", i.title.as_ref().unwrap().content)
36 // }
3} 37}
diff --git a/src/manager.rs b/src/manager.rs
new file mode 100644
index 0000000..839c8dc
--- /dev/null
+++ b/src/manager.rs
@@ -0,0 +1,107 @@
1use crate::{
2 error::{AddError, Error, IOError, PullError},
3 feed::{Entry, Feed},
4 status::{PullStatus, StoreStatus},
5};
6
7use chrono::prelude::*;
8use url::Url;
9
10#[derive(Default)]
11pub struct Manager {
12 feeds: Vec<Feed>,
13}
14
15impl Manager {
16 pub async fn add_feed(&mut self, url: &str) -> Result<PullStatus, Error> {
17 let link = Url::parse(&url).map_err(|e| AddError::InvalidUrl(e.to_string()))?;
18
19 // check if this feed is already present
20 if self.feeds.iter().any(|f| f.link == link) {
21 return Err(AddError::DuplicateLink.into());
22 }
23
24 // construct a new feed
25 let mut feed = Feed::new(link.clone());
26
27 let status = feed
28 .pull()
29 .await
30 .map_err(|pull_err| Error::Pull(link, pull_err))?;
31
32 // add new feed
33 self.feeds.push(feed);
34
35 Ok(status)
36 }
37
38 pub async fn pull(&mut self) -> Vec<Result<PullStatus, PullError>> {
39 futures::future::join_all(self.feeds.iter_mut().map(Feed::pull)).await
40 }
41
42 pub fn list_entries(&self) -> impl Iterator<Item = &Entry> {
43 EntryIterator {
44 all_entries: self.feeds.iter().map(Feed::entries).collect(),
45 }
46 }
47
48 pub fn list_feeds(&self) -> impl Iterator<Item = &Feed> {
49 self.feeds.iter()
50 }
51
52 pub async fn store(&self) -> Result<StoreStatus, IOError> {
53 let path = crate::dirs::store_path().ok_or(IOError::MissingStorePath)?;
54 let content = serde_yaml::to_string(&self.feeds)?;
55 std::fs::write(path, content)?;
56
57 Ok(StoreStatus::new(self.feeds.len()))
58 }
59
60 pub async fn load() -> Result<Self, IOError> {
61 let path = crate::dirs::store_path().ok_or(IOError::MissingStorePath)?;
62 let content = std::fs::read_to_string(path)?;
63 let feeds = serde_yaml::from_str(&content)?;
64
65 Ok(Self { feeds })
66 }
67}
68
69struct EntryIterator<'e> {
70 all_entries: Vec<&'e [Entry]>,
71}
72
73impl<'e> Iterator for EntryIterator<'e> {
74 type Item = &'e Entry;
75
76 fn next(&mut self) -> Option<Self::Item> {
77 let mut min_index = None;
78 let mut last_date = DateTime::<Utc>::MIN_UTC;
79 for (idx, latest_entry) in self
80 .all_entries
81 .iter()
82 .map(|entries| entries.first())
83 .enumerate()
84 {
85 if let Some(entry) = latest_entry {
86 if last_date < entry.published {
87 last_date = entry.published;
88 min_index = Some(idx);
89 }
90 }
91 }
92
93 match min_index {
94 Some(idx) => {
95 let entries = self.all_entries.get_mut(idx).unwrap();
96 let e = &entries[0];
97 if entries.len() > 1 {
98 *entries = &entries[1..];
99 } else {
100 self.all_entries.remove(idx);
101 }
102 Some(e)
103 }
104 None => None,
105 }
106 }
107}
diff --git a/src/status.rs b/src/status.rs
new file mode 100644
index 0000000..6874e88
--- /dev/null
+++ b/src/status.rs
@@ -0,0 +1,42 @@
1use crate::error::EntryError;
2use std::fmt;
3
4#[derive(Debug)]
5pub struct PullStatus {
6 count: usize,
7 errors: Vec<EntryError>,
8}
9
10impl PullStatus {
11 pub fn new(count: usize, errors: Vec<EntryError>) -> Self {
12 Self { count, errors }
13 }
14}
15
16impl fmt::Display for PullStatus {
17 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
18 write!(
19 f,
20 "pulled {} entries with {} errors",
21 self.count,
22 self.errors.len()
23 )
24 }
25}
26
27#[derive(Debug)]
28pub struct StoreStatus {
29 count: usize,
30}
31
32impl StoreStatus {
33 pub fn new(count: usize) -> Self {
34 Self { count }
35 }
36}
37
38impl fmt::Display for StoreStatus {
39 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
40 write!(f, "stored {} feeds", self.count,)
41 }
42}