Option | Value |
---|---|
{{ key}} | {{ value }} |
Download Script
Pastey provides a script that can be used to paste output directly from the command line:
$ pastey -f /var/log/nginx.log
$ echo "Hello, Pastey!" | pastey -c -
Download the following, make it executable, and put it in your system PATH to be used anywhere!
Show script usage
Usage: pastey [-h] [-e] [-f INFILE] [-s] [-t title] [-x time_hrs] [-- command] CLI interface to pastey. Available options: -h, --help Print this help and exit -e, --encrypt Encrypt the paste content -f, --file Read the content from this file. -s, --single Create a paste that expires after the first view -t, --title Set the title of the paste -x, --expiration Set the time in hours after which the paste expires (Default is expiration is disabled) -- Stop further option parsing Arguments passed after the -- option are evaluated as a command, and that command's output is pasted. The full command is used as the title. If zero arguments are passed, or none of --file or -- are passed, content is read from stdin.
JSON
You can also send a properly-formatted json POST request to /json:
{ "content": "This is a paste", "title": "Interesting title", "expiration": -1, "encrypt": true, "single": false }
Note that expiration is some value in hours, and that -1 = no expiration date. Only the content field is mandatory.