Option | Value |
---|---|
pastey_version | 0.5.1 |
behind_proxy | False |
blacklist_cidr | [] |
data_directory | /app/data |
default_theme | Light |
force_https_links | False |
force_show_recent | False |
guess_threshold | 0.2 |
ignore_guess | ['TeX', 'SQL'] |
listen_address | 0.0.0.0 |
listen_port | 5000 |
minimum_url_length | 5 |
override_domain | |
purge_interval | 3600 |
rate_limit | 5/hour |
recent_pastes | 10 |
restrict_pasting | False |
show_cli_button | True |
use_whitelist | True |
whitelist_cidr | ['127.0.0.1/32', '10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16'] |
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.