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.3.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.3.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pste-0.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 8c63d1c6500b51ee3dd52b03dcb5596cca373c03e0a0afb9d2f4fa4ec98ae4ba
MD5 999f3f8c23bf220e9d819d8feb0378cb
BLAKE2b-256 dbb405f9e7962362da2947f6b244e4fa0903038130f9af1d0fe3fda372bb95f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pste-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: pste-0.3.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 321db21219786f61446796fe8c0fa4928ecd176ad0cb5d7735714cef4772d9ab
MD5 1f4f2fa2973f9a21bf8e11a48e2a3bff
BLAKE2b-256 3715a7e26beecf5e47cc00ef1f2b9b883cbc7dfd2d64962fb3ab4167fca7b6b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pste-0.3.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