Crates.io | catbox |
lib.rs | catbox |
version | 0.8.2 |
source | src |
created_at | 2021-11-13 20:26:01.177512 |
updated_at | 2024-01-12 18:13:53.864401 |
description | Implementation of Catbox.moe's API |
homepage | https://github.com/Savolae/catbox |
repository | https://github.com/Savolae/catbox |
max_upload_size | |
id | 481521 |
size | 76,298 |
Unofficial command line tool and library for using catbox.moe's API.
For the library documentation, see Github Pages.
See the GitHub Releases page for the latest Linux and Windows builds of the command line tool.
You can compile and install the command line tool with Cargo:
cargo install catbox
To use the library in your project, add the repo to your Cargo.toml:
[dependencies]
catbox = "*"
Use catbox --help
to see usage.
Catbox has the following commands:
If user hash is not given for upload
, the files will be uploaded anonymously.
Deleting files requires that user hash was given.
The album
subcommand has additional subcommands:
All album commands except create
require an user hash.
You can use --help
on any command to see information about its usage.
The basic upload
command will work with both local files and URLs to files hosted somewhere else.
Some commands require an account hash to work. This can be supplied using
the --user
argument or by setting CATBOX_USER_HASH
environment value.
The explicitly provided argument will be preferred over the environment variable.
If the environment variable is set, it will be used even when optional.
All commands print the response from the server, usually a link to the created file or album.
See https://catbox.moe/tools.php for more information about the API and https://catbox.moe/faq.php for allowed filetypes and content.
Consider donating via https://www.patreon.com/catbox to help with server costs.
Upload a file:
catbox upload cute_picture.png
Upload multiple files:
catbox upload *.jpg # Upload all jpg files
catbox upload image.png file.txt # Upload image.png and file.txt
Delete a file:
catbox delete abc123.jpg --user 1234567890123456789012345
catbox delete https://files.catbox.moe/123456.png # Or just 123456.png
Create an album:
catbox album create --title 'My album' --desc 'An excellent album' abc123.jpg def456.png
The user argument is not needed if CATBOX_USER_HASH
is found in environment.
Upload a file to Litterbox for 3 days:
catbox litter --time 72h homework.zip