BakeIt
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!
Metadata
Release files for bakeit 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bakeit-0.1.7.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bakeit-0.1.7-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 11.3 kB
Release files / bakeit-0.1.7.tar.gz
| Download URL | bakeit-0.1.7.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b341ab4dbe0be69b72231d8d7d328b8b3d580bc5318cca2c3561e21a9b9e2fdc
|
|
BLAKE2b-256 checksum How to use checksums |
dd0c24ba989f019dd9a438288d2391a75403e753ea56416882d531b689fbb759
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / bakeit-0.1.7-py2-none-any.whl
| Download URL | bakeit-0.1.7-py2-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
4abe66035e5425a5638f2ca34a78c1297ea30007dfbfc89ef6d8c4b7b7d3b93e
|
|
BLAKE2b-256 checksum How to use checksums |
9d2650298e3a051d1f5928f5175ff10dd32068ec1b87b53624fad9bbd7b90dd0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |