chore: first commit

This commit is contained in:
Alexander Navarro 2025-05-06 20:24:41 -04:00
commit 1d5a517395
13 changed files with 2396 additions and 0 deletions

23
src/main.rs Normal file
View file

@ -0,0 +1,23 @@
use std::fs::File;
use clap::Parser;
use readwise_bulk_upload::config::Args;
use readwise_bulk_upload::readwise::Document;
use readwise_bulk_upload::sql::get_database;
use readwise_bulk_upload::{Error, Result};
#[tokio::main]
async fn main() -> Result<()> {
let args = Args::parse();
let file = File::open(args.path())
.map_err(|_| Error::Runtime(format!(
r#"The file "{}" could not be open"#,
args.path().display()
)))?;
let documents: Vec<Document> = serde_json::from_reader(file)?;
let db = get_database().await?;
Ok(())
}