fix guids
All checks were successful
ci/woodpecker/push/deploy Pipeline was successful
ci/woodpecker/cron/deploy Pipeline was successful

This commit is contained in:
Jake Walker 2025-01-27 19:23:57 +00:00
parent d635f1cbc8
commit 9a78884eaa
No known key found for this signature in database
2 changed files with 1 additions and 9 deletions

View file

@ -9,4 +9,3 @@ chrono = { version = "0.4.39", default-features = false, features = ["now"] }
kuchikiki = "0.8.2"
reqwest = { version = "0.12.12", features = ["blocking"] }
rss = { version = "2.0.11" }
uuid = { version = "1.12.1", features = ["v7"] }

View file

@ -5,7 +5,6 @@ use chrono::{Datelike, Days, NaiveTime, Utc};
use mininews::parser::{parse, EventBlock, PAGE_URL};
use reqwest::blocking::get;
use rss::{ChannelBuilder, Guid, Item, ItemBuilder};
use uuid::{Timestamp, Uuid};
fn generate_feed(items: &Vec<EventBlock>, exclude_today: bool) -> Result<String> {
let mut channel = ChannelBuilder::default()
@ -42,13 +41,7 @@ fn generate_feed(items: &Vec<EventBlock>, exclude_today: bool) -> Result<String>
.pub_date(pub_date.to_rfc2822())
.guid(Guid {
permalink: false,
value: Uuid::new_v7(Timestamp::from_unix_time(
pub_date.timestamp() as u64,
0,
0,
0,
))
.to_string(),
value: pub_date.date_naive().to_string(),
})
.description(format!(
"Wikipedia current events from {}",