Field | Description |
---|---|
Title (required) | Descriptive title of the paste, limited to 256 characters |
Paste (required) | The actual paste's text data |
Language (default: text) | Language to use for syntax highlighting when displaying the paste |
Visibility (default: public) | Control who can see the paste. Public: everyone, indexed by search engines. Private: only the author can read it. With link: anyone with the link can access it. Organization members: accessible to all members of the organization where the paste was created. |
Expiration (default: 2 weeks) | Date after which the paste will be automatically deleted. If burn after reading is selected the paste will be deleted immediately after the first visualization. |
Encryption key (default: none) | Key used to encrypt/decrypt the paste. The encryption process happens on the client side and the encryption key is never sent to our servers. If lost, it's not possible to recover the paste. |
pastesafely [-h]
[--log-level {ERROR,DEBUG,INFO}]
[-u URL]
[--cfg-profile CFG_PROFILE]
[-k API_KEY] [-P PASSWORD]
[-t TITLE]
[-l <language>]
[-e EXPIRE]
[-V {org,private,link,public}]
[-f FETCH]
Arguments:
-h, --help show the help message and exit
--log-level {ERROR,DEBUG,INFO} set the log level
-u, --url URL API endpoint to connect to, defaults to https://www.pastesafely.com/api/
-k, --api-key API_KEY API key for authentication/authorization
-P, --password PASSWORD key to encrypt/decrypt the paste
-t, --title TITLE title of the new paste
-l, --language LANGUAGE language to use for syntax highlighting
*see below for the full list of supported languages
-e, --expire EXPIRE number of days to keep the paste before destroying it ('never' for no expiration, or 'burn' for burn after reading)
-V, --visibility set paste visibility options
{org,private,link,public}
-f, --fetch FETCH fetch an existing paste and print it
- Basic usage, creates a plain text public paste:
tail -n100 apache.log | ./pastesafely
- Public paste, plain text, specifying a title:
tail -n100 apache.log | ./pastesafely --title "Recent Apache logs"
- Private paste, authenticating using an API key, using ini
for syntax highlighting:
cat mypy.ini | ./pastesafely -l ini -t"My mypy config" --api-key b5912aee352cec81be834321f342 --visibility private
- Private paste, authenticating using an API key, using Python for syntax highlighting, set to expire after 2 months. Some options are set in the configuration file instead of passed in as arguments:
cat fib.py | ./pastesafely -l python -t"Fibonacci in Python"
~/.pastesafely.ini
to set default values for the api_key
, visibility
, and expire
parameters:
[default]
api_key = b5912aee352cec81be834321f342
visibility = private
expire = 60