From f7be10edfc3719ea51170680e8ef3260bb941186 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Sat, 5 Sep 2026 20:38:46 +0100 Subject: aggregate feeds into one --- src/config.rs | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index 089d3e2..a5652c1 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,11 +1,41 @@ -use std::{fs::File, io::{read_to_string}, path::Path}; +use std::{collections::BTreeMap, fs::File, io::read_to_string, path::Path}; +use rss::{Category, Cloud, Image, TextInput, extension::{Extension, dublincore::DublinCoreExtension, itunes::ITunesChannelExtension, syndication::SyndicationExtension}}; use serde::Deserialize; #[derive(Deserialize)] pub struct Config { #[serde(default)] - pub urls: Vec + pub urls: Vec, + pub channel: ChannelConfig, +} + +#[derive(Deserialize)] +pub struct ChannelConfig { + pub title: String, + pub link: String, + pub description: String, + pub language: Option, + pub copyright: Option, + pub managing_editor: Option, + pub webmaster: Option, + #[serde(default)] + pub categories: Vec, + pub cloud: Option, + pub ttl: Option, + pub image: Option, + pub text_input: Option, + #[serde(default)] + pub skip_hours: Vec, + #[serde(default)] + pub skip_days: Vec, + #[serde(default)] + pub extensions: BTreeMap>>, + pub itunes_ext: Option, + pub dublin_core_ext: Option, + pub syndication_ext: Option, + #[serde(default)] + pub namespaces: BTreeMap, } pub fn default_config_file_locations() -> Vec { -- cgit v1.2.3