init
This commit is contained in:
commit
da40e48b19
20 changed files with 4150 additions and 0 deletions
14
src/sources/mod.rs
Normal file
14
src/sources/mod.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
use anyhow::Result;
|
||||
|
||||
mod wikipedia;
|
||||
|
||||
pub trait Source {
|
||||
/// Return the URL to query
|
||||
fn url(&self) -> String;
|
||||
/// Given the content of the url figure out the date of the latest leak
|
||||
fn latest_leak(&self, html: String) -> Result<time::Date>;
|
||||
}
|
||||
|
||||
pub fn sources() -> Vec<Box<dyn Source + Send>> {
|
||||
vec![Box::new(wikipedia::Wikipedia)]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue