CB4PXEZHWZBNRLET5DOG7ONB5QZZ3J3PTTGUNNUAD7YUZCPU37AAC
use feed_rs::parser::parse;
use std::fs::File;
fn main() -> Result<(), anyhow::Error> {
let mut output = laker::create_output_feed();
let file = File::open("qwantz-rss-2022-09-02.xml")?;
let source = parse(file)?;
dbg!(&source);
let feed_title = source.title.map(|t| t.content).unwrap_or_default();
let mut items = vec![];
for entry in &source.entries {
items.push(laker::convert_entry(entry, &feed_title));
}
output.set_items(items);
dbg!(&output);
assert!(output.is_valid(&json_feed_model::Version::Version1_1));
Ok(())
}
serde_json = "1"