2022-04-05 15:21:52 -04:00
|
|
|
mod extract;
|
2022-04-05 18:21:33 -04:00
|
|
|
mod fetch;
|
2022-04-05 14:07:28 -04:00
|
|
|
|
2022-04-05 15:21:52 -04:00
|
|
|
use extract::DataSet;
|
2022-04-05 18:21:33 -04:00
|
|
|
use fetch::PdfFetcher;
|
2022-04-05 14:07:28 -04:00
|
|
|
|
2022-04-05 18:21:33 -04:00
|
|
|
#[tokio::main]
|
|
|
|
async fn main() {
|
|
|
|
let mut fetcher = PdfFetcher::new().expect("Failed to initialize PDF fetcher");
|
|
|
|
let doc = fetcher.fetch().await.expect("Failed to fetch PDF");
|
2022-04-05 15:21:52 -04:00
|
|
|
let dataset = DataSet::extract(&doc).expect("Failed to extract dataset");
|
|
|
|
for row in dataset.csv_rows() {
|
|
|
|
println!("{}", row.unwrap());
|
2022-04-05 14:07:28 -04:00
|
|
|
}
|
|
|
|
}
|