initial commit
This commit is contained in:
20
src/input.rs
Normal file
20
src/input.rs
Normal 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>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user