Skip to main content

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

Release files for shpaste 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shpaste 0.1.5
File Size Uploaded
shpaste-0.1.5.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shpaste 0.1.5
File Interpreter ABI Platform
shpaste-0.1.5-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 9.9 kB

Release files / shpaste-0.1.5.tar.gz

Download URL shpaste-0.1.5.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3da5133449d0723c5831335b2dc4391990f770d6fd19029bcb4ccc302d0229cb
BLAKE2b-256 checksum
How to use checksums
41a4914ce1cb6cc355e76d62a5f31adfee04e418784ea8bf3bd9232bc97212e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / shpaste-0.1.5-py2.py3-none-any.whl

Download URL shpaste-0.1.5-py2.py3-none-any.whl
Size 5.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d7b635282550cdb45eaa51a9e083e164900db036a3062023ff47d22ced655a98
BLAKE2b-256 checksum
How to use checksums
22bdf963bd4a8f67a7cabce21fd704f901b12de86e7bf4f79eba22255ba4d3bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page