Skip to main content

Add your description here

Project description

sheetah

sheetah ist ein einfaches Python-Paket zur Verarbeitung von Markdown-Dokumenten. Es gliedert den Text an H2-Überschriften ("##") in Segmente, erlaubt fuzzy Suche und bietet ein interaktives CLI mit Clipboard‑Kopie.

Installation

pip install sheetah

Oder lokal im Quellcode (virtuellesenv):

cd sheetah
python -m venv .venv
. .venv/Scripts/activate  # oder source .venv/bin/activate
python -m pip install -e .[all]

Die Extras umfassen prompt_toolkit und pyperclip für die interaktive UI.

Nutzung

Programmatisch

from sheetah import Document

txt = """Einführung

## Abschnitt 1
Text1

## Abschnitt 2
Text2
"""

doc = Document.from_markdown(txt)
print(doc.description)
for seg in doc.search("Text"):
    print(seg.name)
    print(seg.text())

Kommandozeile

sheetah pfad/zur/datei.md

Eine interaktive Oberfläche erscheint:

  1. Eingabe der Suchanfrage oben
  2. Ergebnisse werden aufgelistet, bester Treffer ist vorgeschlagen
  3. Mit Pfeil hoch/runter navigieren; Vorschau rechts
  4. <Enter> kopiert den Text des ausgewählten Segments in die Zwischenablage
  5. <Ctrl-C> oder <Ctrl-Q> beendet das Programm

Die Beschreibung des Dokuments (alles vor dem ersten ##) wird über der Suchzeile angezeigt.

API

  • Document.from_markdown(markdown: str) -> Document – erstellt ein Dokument.
  • Document.items – Liste der Segment-Instanzen.
  • Document.description – Markdown-Text vor dem ersten Abschnitt.
  • Document.search(query: str, limit: Optional[int]=None) – fuzzy Suche.
  • Segment.name – Name (Header) des Segments.
  • Segment.text() – reiner Text.
  • Segment.html() – HTML-Konvertierung.

Tests

pytest

Lizenz

MIT, siehe LICENSE.

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

sheetah-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

sheetah-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file sheetah-0.1.0.tar.gz.

File metadata

  • Download URL: sheetah-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sheetah-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e8e807586890c5be08ecf2d9cc740c66e3be56b2a01898f702a67f0c17959677
MD5 49d66fd5922c883af180b167aa0922e1
BLAKE2b-256 9111ae15dba888f1863ee339c12530693bd3713cca057f4deabfd683a2b84823

See more details on using hashes here.

File details

Details for the file sheetah-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sheetah-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sheetah-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfeba02c04e651d57d2e2dee921cda7db5758f8f601161958654e97efe0bae9d
MD5 ebdd496b2993814125936a06eebca783
BLAKE2b-256 9027f40897aed1fce207d5fc409e361070b837bb829f99c29d34a3fdb272f152

See more details on using hashes here.

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