podal/src/main.rs
Paul Campbell 9057adddc3
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
i5-add-tests (part 2) (#7)
closes kemitix/podal#5

Reviewed-on: #7
Co-authored-by: Paul Campbell <pcampbell@kemitix.net>
Co-committed-by: Paul Campbell <pcampbell@kemitix.net>
2023-07-28 18:35:41 +01:00

34 lines
822 B
Rust

use podal::prelude::*;
use podal::{feed::FeedEnv, fetch::FetchEnv, history::HistoryEnv};
fn main() -> Result<()> {
println!("Podal");
let subscriptions = "subscriptions.txt";
let history = "downloaded.txt";
let site = "https://www.youtube.com/";
podal::run(
subscriptions,
history,
site,
podal::Env {
feed: FeedEnv {
find: podal::feed::find,
get: podal::feed::reqwest_blocking_get,
},
history: HistoryEnv {
find: podal::history::find,
add: podal::history::add,
},
fetch: FetchEnv {
download: podal::fetch::download,
get: podal::fetch::get,
},
},
)?;
println!("Done");
Ok(())
}