Skip to main content

A cli tool for uploading pastes to paste.sh.ht

Project description

Source Hub Paste CLI - paste.sr.ht

This simple script utilizes the new GraphQL API to offer the ability to upload files directly from the command line!

Usage

First you have to login to the service. To do this simply run shpaste login it will give you directions on how to login:

$ shpaste login
Please navigate to: https://meta.sr.ht/oauth2/personal-token to generate a personal auth token
Grant string: "paste.sr.ht/PROFILE paste.sr.ht/PASTES:RW"
: YOUR_TOKEN_HERE

Then you can start sending some files! Run cat my_file.txt | shpaste and you will receive the link:

$ cat test.txt | shpaste
https://paste.sr.ht/~joshmulliken/6c5494f6984bf515ee92f1a534d9d866f02de73d

Installation

Installation is really simple! Just run pip3 install shpaste.

Additional Docs

Using the main CLI:

$ shpaste --help
usage: shpaste [-h] [-f FILENAME] [-v VISIBILITY] {login} ...

paste.sr.ht command line utility

positional arguments:
  {login}

optional arguments:
  -h, --help            show this help message and exit
  -f FILENAME, --filename FILENAME
                        Optional filename
  -v VISIBILITY, --visibility VISIBILITY
                        PUBLIC, PRIVATE, or UNLISTED

Logging in:

$ shpaste login --help
usage: shpaste login [-h] [-t TOKEN]

Login to paste.sr.ht with your personal access token

optional arguments:
  -h, --help            show this help message and exit
  -t TOKEN, --token TOKEN
                        personal access token from https://meta.sr.ht/oauth2

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

shpaste-0.1.5.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

shpaste-0.1.5-py2.py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 2 Python 3

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