Skip to main content

stenodict-cli

Tools for building and modifying stenography dictionary files, with Plover-focused workflows.

CLI

Install from PyPI:

pip install stenodict-cli

Commands:

  • convert - Convert Markdown dictionaries to JSON.
  • expand - Expand a template using entry sources to create a JSON dictionary that contains all combinations.
  • remap - Remap strokes in JSON dictionaries to exclude strokes that appear in given Markdown dictionaries.
  • merge - Merge Markdown and JSON dictionaries into one JSON output.

convert

Converts one or more Markdown sources into JSON. If --output is a .json file, all inputs are merged into that file. If --output is a directory, each source is converted to a separate JSON file preserving its relative path. Use --exclude to skip files or folders by regex.

stenodict convert \
  --input /path/to/md/sources \
  --input /path/to/extra/md \
  --output /path/to/output/json \
  --exclude "modifier-keys" \
  --quiet
stenodict convert \
  --input /path/to/md/sources \
  --output /path/to/output/combined.json

Input Format

Source files are Markdown documents that contain YAML code blocks:

# Navigation

## Navigation Keys

```yaml
-FPL: '{}{#up}' # Up
-RBG: '{}{#down}' # Down
-FR: '{}{#left}' # Left
-LG: '{}{#right}' # Right
```

expand

Expands template entries into a JSON dictionary that contains all combinations. Each template line defines an outline pattern and translation pattern using <outline> and <translation> placeholders. Each entry file provides outline → translation mappings that are substituted into the template to produce final dictionary entries. If --output is a .json file, the result is written there. If --output is a directory, the output filename matches the template source filename with a .json extension.

Templates and entries are Markdown files that contain YAML code blocks. You can also pass an inline template string. See the file format examples below.

stenodict expand \
  --template /path/to/modifier-keys.md \
  --entries /path/to/entries.md \
  --entries /path/to/extra-entries.md \
  --output /path/to/output/directory/ \
  --quiet
stenodict expand \
  --template /path/to/modifier-keys.md \
  --entries /path/to/entries.md \
  --output /path/to/output/modifier-keys.json
stenodict expand \
  --template "<outline>: '{^}<translation>'" \
  --entries /path/to/entries.md \
  --output /path/to/output/inline.json

Template Format

Use <outline> and <translation> placeholders in your template. Each entry in the entry files supplies both parts and will be expanded into a full stroke/translation pair.

# Modifier Keys

```yaml
PWA/<outline>: '{#option(<translation>)}' # Option
KPWA/<outline>: '{#option(control(<translation>))}' # Option+Control
SKPWA/<outline>: '{#option(control(shift(<translation>)))}' # Option+Control+Shift
```

Entries Format

Entry files are plain YAML mappings from outline to translation. These are the values substituted into <outline> and <translation> in the template.

# Keys

```yaml
A: '{^}a' # a
TPW-R: '{#F1}' # F1
-FRPB: '{}{#backspace}' # Backspace
K-BG: '{^,}' # Comma
KW-PL: '{?}' # Question Mark (Leading space)
```

remap

Remaps strokes in JSON dictionaries using stroke lists from .md files. --input and --entries accept a file or directory and can be repeated. If --output is a .json file, all inputs are merged into it. If --output is a directory, each input file is written to a corresponding output path. Use --exclude to skip stroke list files by regex.

stenodict remap \
  --input /path/to/input.json \
  --input /path/to/more/input.json \
  --entries /path/to/remap-md \
  --output /path/to/output.json \
  --quiet

Remap Entries Format

The remap entries inputs are Markdown documents that contain YAML code blocks.

# Keys

## Letters

```yaml
A: '{^}a' # a
AP: '{^}A' # A
-B: '{^}b' # b
P-B: '{^}B' # B
KR: '{^}c' # c
KR-P: '{^}C' # C
```

merge

Merges Markdown and JSON dictionaries into a single JSON output. Inputs can be .md or .json files, or directories that contain them. Use --exclude to skip files by regex. Use --on-conflict to control duplicate strokes (error, error-delete-output, keep-first, or keep-last). error-delete-output removes the output file before raising.

stenodict merge \
  --input /path/to/md \
  --input /path/to/dicts.json \
  --output /path/to/merged.json \
  --on-conflict keep-last \
  --quiet

Development

Set up a local environment with uv and run from source:

uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"
stenodict --help

Install the pre-commit hook and run checks:

pre-commit install
pre-commit run --all-files

Testing

Run the test suite with pytest:

pytest

Metadata

Release files for stenodict-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stenodict-cli 0.1.0
File Size Uploaded
stenodict_cli-0.1.0.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stenodict-cli 0.1.0
File Interpreter ABI Platform
stenodict_cli-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.8 kB

Release files / stenodict_cli-0.1.0.tar.gz

Download URL stenodict_cli-0.1.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
939026b9c951d60abbd6906317305d534128e670ba06e4822fcd4a3e747c51e7
BLAKE2b-256 checksum
How to use checksums
a548e8d9fa7a151d66153af2cd9a226bbcdfcbc1c0dccd83e39fcf2a715d93e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 1, 2026.

Transparency log

Release files / stenodict_cli-0.1.0-py3-none-any.whl

Download URL stenodict_cli-0.1.0-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
314b9ec18cf92d1b91d5358f2e99886c6f9a250558d2074078e96a7d29873ef8
BLAKE2b-256 checksum
How to use checksums
7a6d83d048a0b484b55499a327e69d2aa6aab8f4d7b136e57249aadb4bcfdfa7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page