Skip to main content

Interactive terminal editor for SKOS taxonomy files

Project description

ster

CI codecov Python 3.11+ License: MIT Ruff

rdflib typer rich pylode

   _____ ______ ______ ____
  / ___//_  __// ____// __ \
  \__ \  / /  / __/  / /_/ /
 ___/ / / /  / /___ / _, _/
/____/ /_/  /_____//_/ |_|

  [ Breton: "Meaning" or "Sense" ]
  [  Simple Taxonomy EditoR     ]

ster is an interactive terminal editor for SKOS taxonomy files. Browse, create, and edit concepts in a full-screen TUI — no GUI, no database, just clean Turtle files.

ster is the Breton word for meaning, with homonyms for river and star. Let it guide your semantic voyage, keeping the flow and always following your star.


Features

Interactive TUI

  • Full-screen tree browser with keyboard navigation
  • Inline concept creation, renaming, deletion, and label editing
  • Detail panel: view and edit all SKOS fields (labels, definitions, scope notes, related links…)
  • Fold / unfold subtrees; shows hidden-concept count
  • Visual indicator for concepts that carry cross-scheme mapping links

Multi-file workspace

  • Open several .ttl files at once and see a merged taxonomy view
  • Edits are always written to the correct source file automatically

Cross-scheme mapping

  • Add exactMatch, closeMatch, broadMatch, narrowMatch, relatedMatch links between concepts in different files
  • Remove links from the detail view — works even when the target file has been deleted
  • Both source and target files are saved and staged in git on every change

Git integration

  • Stage, commit, and push changes without leaving the terminal
  • Browse full commit history with diffs inside the TUI

HTML export

  • Generate a browsable, wiki-style HTML page from any taxonomy via pyLODE
  • One HTML file per language detected in the taxonomy
  • Sticky language-switcher bar links between language versions
  • Available from the main menu or ster export

Other

  • Step-by-step init wizard (ster init)
  • Auto-detection of taxonomy files in the current directory
  • Round-trip safe: reads and writes .ttl, .rdf, .jsonld
  • SKOS integrity validation

Installation

Minimal (TUI + editing)

pip install ster

With HTML export

pip install "ster[html]"

From source

git clone https://github.com/gbelbe/ster.git
cd ster
pip install -e .          # core only
pip install -e ".[html]"  # with HTML export
pip install -e ".[dev]"   # with test suite

Dependencies

Group Package Purpose
core rdflib>=7.0 RDF parsing and serialisation
core typer[all]>=0.12 CLI framework
core rich>=13.0 Terminal rendering, prompts, tables
[html] pylode>=3.0 HTML generation from SKOS (VocPub profile)
[dev] pytest>=8.0 Test suite
[dev] pytest-cov>=5.0 Coverage reporting

pyLODE is not installed by default. When you trigger an HTML export, ster will offer to install it automatically.


Quick start

Launch the interactive editor

ster

The home screen lists all taxonomy files in the current directory. Use arrow keys to check files, then press Enter to open them.

  ┌─────────────────────────────────────────────────────┐
  │  [ ] equipement.ttl          7 concepts             │
  │  [x] windvane-taxonomy.ttl  23 concepts             │
  └─────────────────────────────────────────────────────┘
  ↵  Open checked files
  ⎇  Browse git history
  🌐 Generate webpage
  +  Create new taxonomy
  ✕  Quit

Keyboard shortcuts (TUI)

Key Action
Navigate tree / fields
Enter Expand/collapse node or open detail
a Add a child concept
A Add a top-level concept
d Delete selected concept
e Edit selected field in detail panel
m Add a mapping link to another concept
g Commit & push changes
? Help screen
q / Esc Back / quit

Create a new taxonomy

ster init my-taxonomy.ttl

The wizard walks you through name, description, base URI, languages, and author.

Export to HTML

ster export my-taxonomy.ttl          # generates ./html/my-taxonomy_en.html …
ster export my-taxonomy.ttl -l en,fr # specific languages only
ster export my-taxonomy.ttl -o /tmp  # custom output directory

Or use the 🌐 Generate webpage option from the main menu.

Validate

ster validate my-taxonomy.ttl

Architecture

ster/
├── model.py         — Pure dataclasses: Concept, ConceptScheme, Taxonomy
├── store.py         — RDF I/O via rdflib (.ttl / .rdf / .jsonld)
├── operations.py    — All SKOS mutations (add, remove, move, relate…)
├── workspace.py     — Multi-file workspace: merged view + per-file saves
├── workspace_ops.py — Cross-file mapping operations
├── nav.py           — Full-screen TUI (curses): tree, detail, inline edit
├── cli.py           — Typer entry-points (ster, ster init, ster export…)
├── html_export.py   — HTML generation via pyLODE VocPub
├── git_manager.py   — Git staging, commit, push
├── git_log.py       — Git history browser (TUI)
├── wizard.py        — Init wizard
├── handles.py       — Short handle generation from camelCase URIs
└── validator.py     — SKOS integrity checks

Each layer depends only on the layers below it, keeping every module independently testable.


Supported formats

Extension Format
.ttl Turtle (recommended)
.rdf / .xml RDF/XML
.jsonld / .json JSON-LD

Development

pip install -e ".[dev]"
pytest
pytest --cov=ster --cov-report=term-missing

CI / CD

Every push and pull request runs four parallel jobs via GitHub Actions:

Job Tool What it checks
Lint ruff Code style, import order, common bugs
Type check mypy Static type correctness
Security bandit + pip-audit SAST + known CVEs in dependencies
Tests pytest × Python 3.11 / 3.12 / 3.13 Full test suite + coverage report

Coverage is uploaded to Codecov on every run.

Run checks locally

pip install -e ".[dev]"

ruff check .            # lint
ruff format --check .   # format
mypy ster/              # types
bandit -r ster/ -c pyproject.toml   # security
pip-audit               # dependency CVEs
pytest --cov=ster       # tests + coverage

Or install the pre-commit hooks to run ruff automatically on every commit:

pip install pre-commit
pre-commit install

License

MIT

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

ster-0.1.0.tar.gz (181.1 kB view details)

Uploaded Source

Built Distribution

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

ster-0.1.0-py3-none-any.whl (96.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ster-0.1.0.tar.gz
  • Upload date:
  • Size: 181.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ster-0.1.0.tar.gz
Algorithm Hash digest
SHA256 501a29cf13a6a4e66894edf7ee334ac59a9161443a1b245ce971e9cfa92c0752
MD5 9482f8d73de4f451f35a5450f3a88bad
BLAKE2b-256 9d024c499ef6aa92f37a0815a168bf60ca82bcf4577bb01e82638defbc6989b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ster-0.1.0.tar.gz:

Publisher: publish.yml on gbelbe/ster

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

File details

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

File metadata

  • Download URL: ster-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 96.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ster-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e88252540a4c0360f0f7d3902428e9a77965ef74097115ab634e0c1b9815099
MD5 e63199c5c287bc8382eeaca0b7feb7fa
BLAKE2b-256 4aa4521743ef1ea7486d69450e9f004433129f882dee7ebbf76775ad9cd99541

See more details on using hashes here.

Provenance

The following attestation bundles were made for ster-0.1.0-py3-none-any.whl:

Publisher: publish.yml on gbelbe/ster

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