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_toolkitundpyperclipfü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:
- Eingabe der Suchanfrage oben
- Ergebnisse werden aufgelistet, bester Treffer ist vorgeschlagen
- Mit Pfeil hoch/runter navigieren; Vorschau rechts
<Enter>kopiert den Text des ausgewählten Segments in die Zwischenablage<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 derSegment-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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8e807586890c5be08ecf2d9cc740c66e3be56b2a01898f702a67f0c17959677
|
|
| MD5 |
49d66fd5922c883af180b167aa0922e1
|
|
| BLAKE2b-256 |
9111ae15dba888f1863ee339c12530693bd3713cca057f4deabfd683a2b84823
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfeba02c04e651d57d2e2dee921cda7db5758f8f601161958654e97efe0bae9d
|
|
| MD5 |
ebdd496b2993814125936a06eebca783
|
|
| BLAKE2b-256 |
9027f40897aed1fce207d5fc409e361070b837bb829f99c29d34a3fdb272f152
|