https://github.com/dolph/pasteraw-client
Pipe stdin to a raw pastebin.
https://github.com/dolph/pasteraw-client
Last synced: over 1 year ago
JSON representation
Pipe stdin to a raw pastebin.
- Host: GitHub
- URL: https://github.com/dolph/pasteraw-client
- Owner: dolph
- License: apache-2.0
- Created: 2013-08-14T16:01:40.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2016-03-03T19:58:04.000Z (over 10 years ago)
- Last Synced: 2025-03-22T08:01:43.058Z (over 1 year ago)
- Language: Python
- Homepage: https://pypi.python.org/pypi/pasteraw
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
===============
pasteraw-client
===============
Pipe `stdin` directly to a raw pastebin. Get a URL back. Go be productive.
By default, `pasteraw` uses a hosted pastebin service, `pasteraw.com
`_. You can also deploy `your own instance
`_ of the service and use it instead.
Installation
------------
.. image:: https://img.shields.io/pypi/v/pasteraw.svg
:target: https://pypi.python.org/pypi/pasteraw
From PyPi::
$ pip install pasteraw
Command line usage
------------------
Given a file::
$ cat somefile
Lorem ipsum.
Pipe the file to `pasteraw` and get back a URL to a raw paste of that file::
$ cat somefile | pasteraw
http://cdn.pasteraw.com/9lvwkwgrgji5gbhjygxgaqcfx3hefpb
Do whatever you want with the URL. Curl it, email it, whatever::
$ curl http://cdn.pasteraw.com/9lvwkwgrgji5gbhjygxgaqcfx3hefpb
Lorem ipsum.
Python library usage
--------------------
To use `pasteraw.com `_::
>>> c = pasteraw.Client()
>>> url = c.create_paste('Lorem ipsum.')
>>> print(url)
http://cdn.pasteraw.com/9lvwkwgrgji5gbhjygxgaqcfx3hefpb
Alternatively, if you're using your own deployment of `pasteraw
`_, pass your own API endpoint to the
client::
>>> c = pasteraw.Client('http://pasteraw.example.com/api/v1')
Usage is otherwise identical to using `pasteraw.com `_.