Skip to content

Commit

Permalink
Merge branch 'dev' - rename arloader
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebEverett committed Nov 2, 2021
2 parents e93dea2 + 11f6d6b commit 1541dfc
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
sudo apt-get install -y libudev-dev --allow-unauthenticated
sudo apt-get install -y zip --allow-unauthenticated
cargo build --target x86_64-unknown-linux-gnu --release
zip x86_64-unknown-linux-gnu.zip target/x86_64-unknown-linux-gnu/release/arload README.md -j
zip x86_64-unknown-linux-gnu.zip target/x86_64-unknown-linux-gnu/release/arloader README.md -j
- name: Test
run: |
cargo test --release --target x86_64-unknown-linux-gnu -- --nocapture
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "arload"
name = "arloader"
authors = ["calebeverett <caleb@calebeverett.io>"]
description = "Command line application and library for uploading files to Arweave."
version = "0.1.3"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/CalebEverett/arload"
repository = "https://github.com/CalebEverett/arloader"

[lib]
name = "arload"
name = "arloader"
path = "src/lib.rs"

[dependencies]
Expand Down
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![build status](https://github.com/CalebEverett/arload/actions/workflows/build.yml/badge.svg)](https://github.com/CalebEverett/arload/actions/workflows/build.yml)
[![build status](https://github.com/CalebEverett/arloader/actions/workflows/build.yml/badge.svg)](https://github.com/CalebEverett/arloader/actions/workflows/build.yml)

# arload
# arloader

Command line application and library for uploading files to Arweave.

Expand All @@ -10,30 +10,28 @@ Command line application and library for uploading files to Arweave.

2. Install
```
git clone git@github.com:CalebEverett/arload.git
cd arload
cargo build
cargo install arloader
```

3. Get an estimate of how much it is going to cost to store your files:

```
cargo run estimate "tests/fixtures/*.png"
arloader estimate "tests/fixtures/*.png"
```

```
The price to upload 10 files with 18265 total bytes is 9071040 winstons ($0.00045219137).
```
4. Check your wallet balance
```
cargo run wallet-balance
arloader wallet-balance
```
```
Wallet balance is 1549658342531 winstons ($49.82). At the current price of 444274406 winstons ($0.0221) per MB, you can upload 3488 MB of data.
```
5. Upload your files, specifying a `log_dir` to write statuses to so you check them later. Make sure to wrap your paths in quotes to avoid your shell expanding them into lists of files.
```
cargo run upload "tests/fixtures/[1-5]*.png" --log-dir target/tmp/
arloader upload "tests/fixtures/[1-5]*.png" --log-dir target/tmp/
```

```
Expand All @@ -52,7 +50,7 @@ Uploads are async and utilize streams, although the default buffer size is 1. To
6. Your transactions may not be written write away, depending on network traffic and how long it takes miners to add them to the blockchain. To check the status of your transactions run:

```
cargo run update-status "tests/fixtures/[1-5]*.png" --log-dir target/tmp/
arloader update-status "tests/fixtures/[1-5]*.png" --log-dir target/tmp/
```
```
path id status confirms
Expand All @@ -66,7 +64,7 @@ cargo run update-status "tests/fixtures/[1-5]*.png" --log-dir target/tmp/

6. To get a summary report of the status of your uploads, run:
```
cargo run status-report "tests/fixtures/[1-5]*.png" --log-dir target/tmp/
arloader status-report "tests/fixtures/[1-5]*.png" --log-dir target/tmp/
```
```
status count
Expand All @@ -82,7 +80,7 @@ cargo run status-report "tests/fixtures/[1-5]*.png" --log-dir target/tmp/
7. If you wanted to determine whether any of your upload transactions were unsuccessful - you can filter the statuses of your files by status and by number of confirmations.

```
cargo run list-status "tests/fixtures/[1-5]*.png" --log-dir target/tmp/ -max-confirms 1
arloader list-status "tests/fixtures/[1-5]*.png" --log-dir target/tmp/ -max-confirms 1
```

```
Expand All @@ -96,7 +94,7 @@ Found 3 files matching filter criteria.

8. If you then want to re-upload some of your files, you can run
```
cargo run upload-filter "tests/fixtures/[1-5]*.png" --log-dir target/tmp/ --max-confirms 1 --buffer 3
arloader upload-filter "tests/fixtures/[1-5]*.png" --log-dir target/tmp/ --max-confirms 1 --buffer 3
```
with the same filter criteria you used above.
```
Expand All @@ -109,7 +107,7 @@ Uploaded 3 files. Run `update-statuses` to confirm acceptance.
and then if you run
```
cargo run update-status "tests/fixtures/[1-5]*.png" --log-dir target/tmp/
arloader update-status "tests/fixtures/[1-5]*.png" --log-dir target/tmp/
```
you can see that your files have been re-uploaded.
```
Expand All @@ -126,7 +124,7 @@ Updated 5 statuses.
9. If you want to get the transaction ids for all your uploads, the status objects are written to json files in `log_dir` or you can get json output by passing `json` to the `output flag`.

```
cargo run list-status "tests/fixtures/[1-5]*.png" --log-dir target/tmp/ --output json
arloader list-status "tests/fixtures/[1-5]*.png" --log-dir target/tmp/ --output json
```

```
Expand Down
6 changes: 3 additions & 3 deletions src/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ impl Methods for Provider {
/// Calculates the wallet address of the provided keypair according to [addressing](https://docs.arweave.org/developers/server/http-api#addressing)
/// in documentation.
///```
/// # use arload::crypto::Methods as CryptoMethods;
/// # use arload::{Arweave, Methods as ArweaveMethods};
/// # use arloader::crypto::Methods as CryptoMethods;
/// # use arloader::{Arweave, Methods as ArweaveMethods};
/// # use ring::{signature, rand};
/// # use std::{fmt::Display, path::PathBuf};
/// #
Expand Down Expand Up @@ -102,7 +102,7 @@ impl Methods for Provider {
/// Verifies that a message was signed by the public key of the Provider.key keypair.
///```
/// # use ring::{signature, rand};
/// # use arload::crypto::{Provider, Methods};
/// # use arloader::crypto::{Provider, Methods};
/// # use std::path::PathBuf;
/// #
/// # #[tokio::main]
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use arload::{
use arloader::{
error::ArweaveError,
status::{OutputFormat, OutputHeader, Status, StatusCode},
transaction::{Base64, FromStrs, Tag},
Expand Down
2 changes: 1 addition & 1 deletion tests/integration.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use arload::{
use arloader::{
error::ArweaveError as Error,
status::{OutputFormat, OutputHeader, Status, StatusCode},
transaction::Tag,
Expand Down

0 comments on commit 1541dfc

Please sign in to comment.