Skip to main content

ssmdconvert

ssmdconvert is a deterministic, local conversion library and CLI for turning common documents and EPUB books into valid SSMD 0.9. It can also analyze, project, and safely update SSMD speech annotations.

Install

python -m pip install ssmdconvert

PDF, DOCX, and local spaCy enrichment are optional:

python -m pip install "ssmdconvert[pdf]"
python -m pip install "ssmdconvert[docx]"
python -m pip install "ssmdconvert[spacy]"

Python 3.10 or newer is required. Conversion and analysis run locally. SSMDConvert does not download language models; the default --spacy off avoids loading spaCy.

One bundle workflow

Book and document sources use the same bundle commands and canonical artifact names. Editable workspaces are directories ending in .ssmd-bundle; portable archives end in .ssmd-bundle.zip. The manifest retains the existing kind-specific format and determines how the content is validated.

ssmdconvert bundle inspect novel.epub --json
ssmdconvert bundle convert novel.epub --chapters 2-20 -o novel.ssmd-bundle
ssmdconvert bundle convert notes.md -o notes.ssmd-bundle
ssmdconvert bundle validate novel.ssmd-bundle
ssmdconvert bundle pack notes.ssmd-bundle

When output is omitted, conversion creates a workspace beside the source. Use --force to replace an existing workspace. Chapter selection applies to books and uses original one-based source numbers.

The bundle command group provides six operations: inspect, convert, metadata, refresh, pack, and validate. Only directory workspaces can be refreshed or packed; ZIP archives are read-only. See the bundle guide for dirty-workspace behavior and manifest details.

A standalone SSMD file can also be rendered with the top-level converter:

ssmdconvert convert manuscript.md -o manuscript.ssmd
ssmdconvert inspect manuscript.ssmd --json

Analysis and speech workflows

Reports, context lookup, plain-text projection, and speech commands accept standalone SSMD and either bundle storage form:

ssmdconvert report novel.ssmd-bundle.zip --chapters 2-20
ssmdconvert context novel.ssmd-bundle chg:v1:0123456789abcdef0123456789abcdef
ssmdconvert txt notes.ssmd-bundle -o prepared.txt
ssmdconvert speech audit notes.ssmd-bundle --json
ssmdconvert speech freeze novel.ssmd-bundle.zip -o frozen.ssmd-bundle.zip

Book conversion freezes eligible automatic speech decisions by default. Use --speech-semantics preserve for structural-only conversion. Speech write-back publishes a new destination and never mutates a workspace in place. The analysis workflow guide describes cache freshness, language handling, progress, and safe publication.

Bundle-local speech profiles

Every newly created .ssmd-bundle includes an editable speech.toml recipe. Speech-aware commands automatically use the recipe from a bundle workspace or packed archive; an explicit --speech-profile still overrides it for one operation.

ssmdconvert bundle convert novel.epub -o novel.ssmd-bundle
ssmdconvert speech set novel.ssmd-bundle ART art
ssmdconvert speech set novel.ssmd-bundle B-E "B E"
# Edit speech.toml directly if preferred; no bundle refresh is needed.
ssmdconvert bundle convert novel.epub -o novel.ssmd-bundle --force
ssmdconvert speech export novel.ssmd-bundle -o speech.toml

Changing the recipe does not patch already materialized SSMD. Rebuild from the original source; --force intentionally replaces the destination bundle and any chapter edits in it. Existing SSMD sub annotations remain authoritative. Legacy bundles without speech.toml continue to work with an empty profile, and packing carries the profile for portable use.

Use speech inventory SOURCE --format toml -o speech.toml to bootstrap an external recipe, then pass it once with bundle convert --speech-profile speech.toml; the bundle stores a canonical copy for later rebuilds. See speech inventory and speech replacement profiles for matching and precedence details.

Python API

The convert_bundle() API dispatches supported sources and publishes a canonical workspace. Bundle loading, inspection, validation, refresh, and packing use the same neutral facade:

from ssmdconvert import convert_bundle, load_bundle, pack_bundle

result = convert_bundle("novel.epub", output="novel.ssmd-bundle")
loaded = load_bundle(result.output)
assert loaded.kind == "book"
archive = pack_bundle("novel.ssmd-bundle")

Lower-level document and book conversion functions remain available for callers that need in-memory models or custom publication. See the Python API reference.

Documentation

Metadata

Release files for ssmdconvert 0.2.4

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

Source distribution (sdist)

Source distribution for ssmdconvert 0.2.4
File Size Uploaded Provenance Actions
ssmdconvert-0.2.4.tar.gz 212.8 kB Without provenance Details for ssmdconvert-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ssmdconvert 0.2.4
File Interpreter ABI Platform Actions
ssmdconvert-0.2.4-py3-none-any.whl Python 3 none any Details for ssmdconvert-0.2.4-py3-none-any.whl

Total release size: 354.3 kB

Release files / ssmdconvert-0.2.4.tar.gz

Download URL ssmdconvert-0.2.4.tar.gz
Size 212.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3b58b2b318b813e609a41614cc5d911e78657750341dca101271b93686ca0efc
BLAKE2b-256 checksum
How to use checksums
c5c8e3a4f8b4ece8b2ff16a6ca4b038c7cdb7ac0d82c23de37449617f77c4b40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / ssmdconvert-0.2.4-py3-none-any.whl

Download URL ssmdconvert-0.2.4-py3-none-any.whl
Size 141.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db6aec6ac27e6d5512d47320708469428ba1de09be347e9dd7052c8aad1c3dba
BLAKE2b-256 checksum
How to use checksums
3d863a160cb1953a110bab573fcd3d725f906fcf271a8c46e69d9ad7e3ba3add
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Security for ssmdconvert 0.2.4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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