#smoothing #storage #command-line-tool #cli #image #url #aptoma

app ass-cli

A small CLI tool for working with Aptoma Smooth Storage

3 releases (1 stable)

1.0.0 Jul 20, 2020
0.2.0 Sep 27, 2019
0.1.0 Jan 31, 2019

#35 in #smoothing

MIT license

22KB
500 lines

Build Status

Aptoma Smooth Storage CLI

A small CLI tool for working with Aptoma Smooth Storage.

Install

If you have cargo installed you can install ass-cli using

$ cargo install ass-cli

Otherwise you can download the latest binary from Releases

Example Usage

$ ass-cli -a account-name image upload data/image.jpg
Image uploaded: {
  "author": null,
  "created": "2019-01-19T14:32:19.000Z",
  "description": null,
  "height": 1200,
  "id": 1205771,
  "md5": "8afcec7eca2329d924b9aa112adc568b",
  "name": "image.jpg",
  "original_url": "...",
  "size": 545244,
  "source_url": null,
  "title": null,
  "updated": "2019-01-19T14:32:19.000Z",
  "user_id": 2,
  "width": 1600
}
URL: https://smooth-storage-url.com/users/account-name/images/1205771.jpg?accessToken=407c8eefb5cd5bcd8ef00f243cc467c367da68336af3ef13a28ce4ea28a46d85

For further usage see

$ ass-cli --help

Account files

Account configuration files are stored as .json files with the following format:

{
  "url": "https://smooth-storage-url.com",
  "name": "account-name",
  "apikey": "account api key"
}

Create one configuration file for each account you want to use, and save them in ~/.config/ass-cli (or similar default configuration path for non-Linux systems). When invoking ass-cli you can specify which configuration file to use by supplying the filename, without .json post fix, to the -a/--account parameter. So, if you have a file ~/.config/ass-cli/dev.json, you can specify that account using ass-cli -a dev <ASS CLI COMMAND>.

When invoking ass-cli you can also specify the path to this configuration file using the -c/--config parameter.

Dependencies

~19–32MB
~574K SLoC