initial commit

This commit is contained in:
aaron-jack-manning
2024-01-11 17:30:55 +11:00
commit dd04b9f29f
9 changed files with 1849 additions and 0 deletions

20
src/input.rs Normal file
View File

@@ -0,0 +1,20 @@
use std::path;
use std::collections::HashMap;
#[derive(clap::Parser)]
pub (crate) struct Args {
/// Path to the configuration file listing podcast RSS feeds.
#[arg(default_value = "./podcasts.toml")]
pub (crate) config : path::PathBuf,
/// The podcast to update. Updates all in configuration file if unspecified.
#[arg(long, short)]
pub (crate) podcast : Option<String>,
}
/// Struct modelling configuration file format.
#[derive(serde::Deserialize)]
pub (crate) struct Config {
/// Map from podcast alias to RSS feed either as a url (prefix: http) or file path.
pub (crate) podcasts : HashMap<String, String>,
}