First working version of creation and update watchdog

This commit is contained in:
Lukas Wölfer
2025-07-24 19:02:10 +02:00
parent 29e85397a7
commit 8172d4c769
10 changed files with 195 additions and 122 deletions

View File

@@ -1,9 +1,6 @@
use std::time::SystemTime;
use mwbot::{
Bot, Page,
generators::{Generator, querypage::QueryPage, search::Search},
parsoid::{Wikicode, WikinodeIterator},
};
pub async fn wanted_ids(bot: Bot) -> Vec<(u32, Page)> {
@@ -45,15 +42,16 @@ fn parse_wsdc_page_name(name: &str) -> Result<u32, TitleParseError> {
}
}
// fn get_wsdc_page_date(page: &Wikicode) -> Option<SystemTime> {
// let prefix = "Updated-On: ";
// page.filter_comments()
// .iter()
// .filter_map(|x| {
// let c = x.text_contents();
// if c.starts_with(prefix) { Some(c) } else { None }
// })
// .map(|x| x.trim_start_matches(prefix).parse::<u64>());
// fn get_wsdc_page_date(bot: &Bot, page: &Page) -> Option<SystemTime> {
// todo!();
// let prefix = "Updated-On: ";
// page.filter_comments()
// .iter()
// .filter_map(|x| {
// let c = x.text_contents();
// if c.starts_with(prefix) { Some(c) } else { None }
// })
// .map(|x| x.trim_start_matches(prefix).parse::<u64>());
// }
#[allow(dead_code)]