First working version of creation and update watchdog
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user