Crates.io | chimg |
lib.rs | chimg |
version | 0.1.1 |
source | src |
created_at | 2023-08-08 21:48:59.58636 |
updated_at | 2023-08-08 21:56:34.190858 |
description | A tool to upload images to Cohost's CDN |
homepage | |
repository | https://github.com/anschelsc/chimg |
max_upload_size | |
id | 939542 |
size | 42,506 |
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.
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"
}
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.