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] [-v] [-f] -p param_value arg1 [arg2...] Script description here. Available options: -h, --help Print this help and exit -v, --verbose Print script debug info -c, --content Pass the content of the paste in a simple argument -e, --encrypt Encrypt the paste content -f, --file Read the content from this file. If file is "-", read from stdin -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 -- 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 a the title. If zero arguments are passed, or none of --content, --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.