Crates.io | pastes |
lib.rs | pastes |
version | 0.1.3 |
source | src |
created_at | 2023-05-23 06:38:01.550463 |
updated_at | 2023-05-25 19:51:41.605228 |
description | Pastes is a simple tool to upload files and text to pastes.dev or bytebin.lucko.me |
homepage | https://github.com/funnyboy-roks/pastes |
repository | https://github.com/funnyboy-roks/pastes |
max_upload_size | |
id | 871749 |
size | 66,249 |
A cli tool to upload files to pastes.dev or bytebin.lucko.me
The program will attempt to determine the file type based on the extension, and thus, whether it should be uploaded to pastebin or
pastes
can be run as a single command
$ pastes my_text_file.txt # Upload a text file to pastes.dev
$ pastes my_image.png # Upload an image to bytebin.lucko.me
$ pastes my_unknown_file # Upload to bytebin
$ pastes my_unknown_file --pastes # Upload to pastebin (read the file as plaintext)
$ pastes my_unknown_file --bytebin # Upload to bytebin
$ pastes ... -t application/json # Force application/json mime type
Or, it can be run in a pipeline
$ echo "hello" | pastes --json | jq '.url'
$ cat my_file.txt | pastes -t text/plain
# Is equivalent to
$ pastes my_file.txt -t text/plain
For full usage see pastes --help
While this project has been built with Linux in mind, it should theoretically work on other platforms.
cargo install pastes
A few items on the todo list:
--download
flag that
will treat the file as a url or keymime2ext
crate to guess the file extension and write to thatPlease feel free to open an issue or pull request if you find a bug or have a feature idea. I'm always open to help on all projects!