From 8c310bc687aed94b033a23a8b7f85b551ca750d7 Mon Sep 17 00:00:00 2001 From: Joshua Coles Date: Wed, 7 Feb 2024 20:28:11 +0000 Subject: [PATCH] Add README and license, remove unused dependencies --- Cargo.lock | 15 --------------- Cargo.toml | 4 ++-- README.md | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 17 deletions(-) create mode 100644 README.md diff --git a/Cargo.lock b/Cargo.lock index ecfff76..ca88bbd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -103,13 +103,11 @@ dependencies = [ name = "arc-ingester" version = "0.1.0" dependencies = [ - "async-compression", "chrono", "clap", "flate2", "futures", "itertools", - "log", "rayon", "serde", "serde_json", @@ -120,19 +118,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "async-compression" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a116f46a969224200a0a97f29cfd4c50e7534e4b4826bd23ea2c3c533039c82c" -dependencies = [ - "flate2", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", -] - [[package]] name = "async-trait" version = "0.1.77" diff --git a/Cargo.toml b/Cargo.toml index 48acf4d..d37bce1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,8 @@ name = "arc-ingester" version = "0.1.0" edition = "2021" +authors = ["Joshua Coles"] +license = "MIT OR Apache-2.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -9,11 +11,9 @@ edition = "2021" clap = { version = "4.4.18", features = ["derive", "env"] } sqlx = { version = "0.7.3", features = ["json", "runtime-tokio-rustls", "postgres", "chrono", 'uuid'] } tokio = { version = "1", features = ["full"] } -log = { version = "0.4.20" } flate2 = "1" thiserror = "1" sha256 = "1" -async-compression = { version = "0.4", features = ["gzip", "tokio"] } serde = { version = "1.0.196", features = ["derive"] } serde_json = "1.0.113" rayon = "1.8.1" diff --git a/README.md b/README.md new file mode 100644 index 0000000..026fee9 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# Arc Ingester + +Read the JSON export from the [Arc](https://www.bigpaua.com/arcapp) app and ingest it into a postgresql database. This +is designed to be run as a cron job or launchctl jjob to keep the database up to date with the latest data from the app. + +## Requirements + +- The Arc app installed on your iPhone (or possibly other iOS devices?) +- The app set to export data +- A postgresql database to ingest the data into + +## Installation + +Currently, the ingester is not available as a binary, so you will need to build it from source. You will need to have +[Rust](https://www.rust-lang.org) installed to do this. + +```shell +cargo install --git https://github.com/joshuacoles/arc-ingester +``` + +## Running + +The ingester is a command line tool that takes the following arguments, + +```shell +arc-ingester --root "~/Library/Mobile Documents/iCloud~com~bigpaua~LearnerCoacher/Documents" --db "postgresql://localhost/arc" +``` + +see `arc-ingester --help` for more information.