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 <file to upload>
Paste URL: https://www.pastery.net/oniasd/

You can also pipe stuff to it:

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

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/oniasd/"]

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.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distributions

bakeit-0.1.1-py3.4.egg (7.0 kB view details)

Uploaded Source

bakeit-0.1.1-py2.7.egg (7.0 kB view details)

Uploaded Source

bakeit-0.1.1-py2-none-any.whl (6.2 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for bakeit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8a04b7470b9c4104643b5377c8edc648744f6863af52b9b7198d9c095146e8ca
MD5 950826ac03c7fa316ecf6eac2fae3d67
BLAKE2b-256 9cea139a57f7e6d9f572bc71ed5cd6bb6c7cd6bf425043ba450dcebf8c4eedc2

See more details on using hashes here.

File details

Details for the file bakeit-0.1.1-py3.4.egg.

File metadata

  • Download URL: bakeit-0.1.1-py3.4.egg
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bakeit-0.1.1-py3.4.egg
Algorithm Hash digest
SHA256 378a1ccd1ee7ee2b4229b79c37fe074256c87a6ec829c85652abe77261d8f0a2
MD5 b3ce2a2cfd3f97e20fe06caa6da2aea0
BLAKE2b-256 9d6c753d05a1ce397286380755eadf1182a1f656c8c5d06469e3b28efdc0edae

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for bakeit-0.1.1-py2.7.egg
Algorithm Hash digest
SHA256 9ba1359cab3b780883a33ba74c8cb7654b0729ec4ba2ccde26d0b66d9f1883a9
MD5 57f89ff9335564efad17942a3438d91c
BLAKE2b-256 7fba952a768cb3de70795ff77a9a5beadaeb6bd8b94279df3e54d1be4b8991e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bakeit-0.1.1-py2-none-any.whl
Algorithm Hash digest
SHA256 ef00101bcc9842c5d7bcc6b20e9df046ad4d4658a13238751324c99191c25122
MD5 ba6bcbbdc474db294d53771931d9ec59
BLAKE2b-256 c405fd8e1ebabeb2c5b7f2aa9e9384742c5a6ae670ac25ee724d9c55d40336f7

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