Skip to main content

Command-line interface for pastebin.com API

Project description

pastebin-cli

Command-line interface to paste code/text to pastebin.com, written in pure Python without any external dependency. If your operating system has an old Python version: this software works from Python 3.5 to 3.8.

Note: the command-line works fine but still needs some API features, like listing user pastes.

Installation

You can either install it using pip:

pip install pastebin-cli

or download pastebin.py executable and put in your $PATH (you can rename it to pastebin).

Usage

$ pastebin --help
usage: pastebin [-h] [--log-level {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}]
                [--api-key API_KEY]
                {paste,get} ...

optional arguments:
  -h, --help            show this help message and exit
  --log-level {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}
  --api-key API_KEY

Subcommands:
  {paste,get}
    paste               Paste a file
    get                 Get a specific paste
$ ./pastebin paste --help
usage: pastebin paste [-h] [--expires-in {N,10M,1H,1D,1W,2W,1M,6M,1Y}]
                      [--privacy {public,unlisted,private}]
                      [--file-format FILE_FORMAT]
                      filename

positional arguments:
  filename

optional arguments:
  -h, --help            show this help message and exit
  --expires-in {N,10M,1H,1D,1W,2W,1M,6M,1Y}
  --privacy {public,unlisted,private}
  --file-format FILE_FORMAT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pastebin-cli-0.1.0.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distributions

pastebin_cli-0.1.0-py3.6.egg (6.2 kB view hashes)

Uploaded Source

pastebin_cli-0.1.0-py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page