Skip to main content

A command-line interface for Pastery, the best pastebin in the world.

Project description

BakeIt is a command line utility (and Python library) to Pastery, the best pastebin in the world. BakeIt aims to be simple to use and unobtrusive.

Installation

To install, use pip:

pip install bakeit

You are done!

Usage

Using BakeIt is similarly easy. First, create a file with your Pastery API key in ~/.config/bakeit.cfg, like so:

[pastery]
api_key = eisha8ahqui7Aesh0fasyu8HFsdo

Then, just pass the file you want to upload to the bakeit command:

$ bakeit myfile.txt
Paste URL: https://www.pastery.net/oniasd/

You can also pipe stuff to it:

$ cat myfile.txt | grep hello | bakeit
Paste URL: https://www.pastery.net/oxczvs/

The config file

A full config file can look like this:

[pastery]
api_key = eisha8ahqui7Aesh0fasyu8HFsdo
duration = 2880

The api_key parameter, as explained above, is mandatory. You can find it at the bottom of your Pastery account page.

The duration parameter is optional. If set, it will be used as the default duration for every new paste. The command-line argument takes precedence over this parameter, though, so you can change it per-paste when invoking bakeit.

Usage as a Python library

BakeIt provides the PasteryUploader class:

>>> from bakeit import PasteryUploader
>>> pu = PasteryUploader("your API key")
>>> pu.upload("this is the text to upload")
"https://www.pastery.net/pabtus/"

PasteryUploader accepts the following arguments:

  • body - The body of the paste.

  • title (optional) - The title to give the paste.

  • language (optional) - The language the paste is in. Pastery will attempt to autodetect this if omitted.

  • duration (optional) - The number of minutes to keep this paste for.

  • max_views (optional) - The number of views to keep this paste for.

Happy pasting!

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

bakeit-0.1.9.tar.gz (4.5 kB view details)

Uploaded Source

Built Distributions

bakeit-0.1.9-py2.7.egg (9.3 kB view details)

Uploaded Source

bakeit-0.1.9-py2-none-any.whl (7.3 kB view details)

Uploaded Python 2

File details

Details for the file bakeit-0.1.9.tar.gz.

File metadata

  • Download URL: bakeit-0.1.9.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bakeit-0.1.9.tar.gz
Algorithm Hash digest
SHA256 b68e82c07d8da7fc1dd7dad692ef090c0d846f4cd7980b959a894444f41f7255
MD5 f4a8a7d216fbfcb813bb49a87f307b0b
BLAKE2b-256 801cd687f2f89d6ab3e717063c5f271669f22eb22090e6fd00889e16f426425f

See more details on using hashes here.

File details

Details for the file bakeit-0.1.9-py2.7.egg.

File metadata

  • Download URL: bakeit-0.1.9-py2.7.egg
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bakeit-0.1.9-py2.7.egg
Algorithm Hash digest
SHA256 8ea2b404c0a78032b4c346871cece2dda6ec582601bb7abbbd3477b0b435b173
MD5 0153fabbb9ceb16aa8ecad0c8ca72baa
BLAKE2b-256 0e8cd5f38d83fa8bb8f8886fb53ee239ca20c25595be1175dafbf4e3efe4ebf4

See more details on using hashes here.

File details

Details for the file bakeit-0.1.9-py2-none-any.whl.

File metadata

File hashes

Hashes for bakeit-0.1.9-py2-none-any.whl
Algorithm Hash digest
SHA256 6dce00ca469e6d9f47f1a3cbf317ceb4d3c98582e38d0037a5b5ea6f9bfb5abd
MD5 fb8b4feb4116eeb82e7b903372c78785
BLAKE2b-256 d3be8f74752a3e31a17dfeaae2fb2580344afc48985c4184e236ece73352bf64

See more details on using hashes here.

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