diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 38 |
1 files changed, 36 insertions, 2 deletions
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 @@ | |||
1 | fn main() { | 1 | use syn::manager::Manager; |
2 | println!("Hello, world!"); | 2 | |
3 | #[tokio::main(flavor = "current_thread")] | ||
4 | async 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 | } |