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:
[STRIKEOUT:.python >>> 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bakeit-0.0.2.tar.gz
.
File metadata
- Download URL: bakeit-0.0.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6a28eabcbc52eb8470d0fc9280c2929779bc770d74415361c3f90685eea9c76 |
|
MD5 | 8cc665e43e0d143be2437a2c32708529 |
|
BLAKE2b-256 | 4e59c9463a40919f1fcb81aa55dc488944fb5ea26cb8a86eeebfe3434df4bec5 |
File details
Details for the file bakeit-0.0.2-py2-none-any.whl
.
File metadata
- Download URL: bakeit-0.0.2-py2-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b466cc5244bf2852a116c46e5326e6796f580537575cfd07929095bd452d0b00 |
|
MD5 | e094d6e410069da0f14e8a35b412d1dd |
|
BLAKE2b-256 | 677806eb60e0d567a6a39aef8434e5716e3dd727bfedf00eb6eb003710c68ced |