add remote PDF fetcher with caching
This commit is contained in:
parent
e640a7cd09
commit
91c69f00f5
4 changed files with 1510 additions and 4 deletions
|
|
@ -1,9 +1,13 @@
|
|||
mod extract;
|
||||
mod fetch;
|
||||
|
||||
use extract::DataSet;
|
||||
use fetch::PdfFetcher;
|
||||
|
||||
fn main() {
|
||||
let doc = pdf::file::File::open("data.pdf").expect("Failed to read PDF");
|
||||
#[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");
|
||||
let dataset = DataSet::extract(&doc).expect("Failed to extract dataset");
|
||||
for row in dataset.csv_rows() {
|
||||
println!("{}", row.unwrap());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue