fix guids
This commit is contained in:
parent
d635f1cbc8
commit
9a78884eaa
2 changed files with 1 additions and 9 deletions
|
@ -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"] }
|
||||
|
|
|
@ -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 {}",
|
||||
|
|
Loading…
Reference in a new issue