Skip to main content

Command-line client for pste, a self-hosted paste server inspired by sprunge

Project description

pste

Command-line client for pste-server, a self-hosted paste server inspired by sprunge.

Installation

pip install pste
# or
pipx install pste

Configuration

Set PSTE_URL to the bookmark URL printed by pste-admin key add on the server — the same URL you'd save in a browser to use the web form:

export PSTE_URL="https://pste.example.com/?key=your-api-key"

Usage

# Create a paste from stdin
echo "hello world" | pste
pste < file.txt
cat file.txt | pste

# Create with options
echo "hello" | pste -s              # single-view (deleted after first read)
echo "hello" | pste -e 7d           # expires in 7 days
echo "hello" | pste -e 2W           # expires in 2 weeks
pste -l python < script.py          # explicit syntax highlighting language
pste -l < script.py                 # auto-detect language (Pygments, >0.5 confidence)

# Fetch a paste (by ID or full URL)
pste AB1234
pste https://pste.example.com/AB1234
pste https://pste.example.com/AB1234?python   # ?lang is stripped; always fetches plain text

Language flag behaviour

Invocation What is sent URL returned
pste (no -l) nothing plain URL
pste -l python lang=python https://host/AB1234?python
pste -l (no value) auto_detect=1 https://host/AB1234?python if detected, else plain URL

When a ?<lang> URL is returned, opening it in a browser shows Pygments-highlighted HTML with table line numbers (Ctrl-A selects only the code) and a Copy button. Fetching via pste always strips the ?lang and returns plain text.

Expiry format

-e/--expire accepts an integer followed by a unit:

  • H — hours
  • D — days
  • W — weeks
  • M — minutes

Examples: 24H, 7D, 2W, 30M

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

pste-0.2.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pste-0.2.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file pste-0.2.0.tar.gz.

File metadata

  • Download URL: pste-0.2.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pste-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3c4ade1677ef7f259776689a19fc6175e231040320dbf01548efbcb633093847
MD5 e7ebc08a498f6bae131d54d878d1c943
BLAKE2b-256 1c53dbcbc603425289084134918f20e53b1636668cb122656fd486449fc2695e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pste-0.2.0.tar.gz:

Publisher: pypi.yml on crognlie/pste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pste-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pste-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pste-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ab750eed1f2d6609edae57f4de8f625424e5afb0f46a76363fa0a53bac110da
MD5 156627f0498776eb18bf2ca443f8dd8e
BLAKE2b-256 dda328c7fc2c2c03c57095159ea4a37cf511a4fba49316126bdefae868e948f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pste-0.2.0-py3-none-any.whl:

Publisher: pypi.yml on crognlie/pste

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page