chimg

Crates.iochimg
lib.rschimg
version0.1.1
sourcesrc
created_at2023-08-08 21:48:59.58636
updated_at2023-08-08 21:56:34.190858
descriptionA tool to upload images to Cohost's CDN
homepage
repositoryhttps://github.com/anschelsc/chimg
max_upload_size
id939542
size42,506
Anschel Schaffer-Cohen (anschelsc)

documentation

README

Instalation

If you have cargo installed, running cargo install chimg should work straightforwardly. I will try and make this more accessible to non-Rust-users in the future.

Setup

Copy the file .cohost.json.example from the git repository to .cohost.json and fill in your own information. Right now you have to store your password in plaintext, sorry. If you can't find the example file, .cohost.json should look like this: { "email": "eggbug@example.com", "password": "hunter2", "page": "hi_im_eggbug" }

Usage

Invoke the tool with chimg FILE where FILE is the path to the image you would like to upload. Make sure .cohost.json is in your current working directory. The output will be a URL which can be used to embed your image in another post.

Once the image is embedded in a published or saved post, it is safe to delete the original draft created by chimg. But there's no harm in keeping it around beyond cluttering your drafts.

Commit count: 9

cargo fmt