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/

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

Uploaded Source

Built Distribution

bakeit-0.0.3-py2-none-any.whl (5.8 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for bakeit-0.0.3.tar.gz
Algorithm Hash digest
SHA256 435cb227353f8e45c5a6e13648ef76c3b700a43334efb9c060aca76776300fc6
MD5 76e0a8e889556f13f8045a4ef93d52b3
BLAKE2b-256 516ebb73421af8a35e10e61b4d6877aebef1d4f081ef188592363e4b78ec1bc0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bakeit-0.0.3-py2-none-any.whl
Algorithm Hash digest
SHA256 0739bf584c305ffaa7c632e6f0db85267bc30aa4fe52b5c2e185a560700c6e50
MD5 05f16202b18d5bbf9dba19edac75e6d8
BLAKE2b-256 87ea38d3ff41a9287c66b5574de7d3ff2f1b7aae727b53f12de0536031006dcf

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