2 releases
0.1.1 | Aug 8, 2023 |
---|---|
0.1.0 | Aug 8, 2023 |
#13 in #cdn
13KB
67 lines
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.
Dependencies
~9–22MB
~302K SLoC