Skip to main content

semantic-md

Semantic Markdown uses YAML schemas to convert Markdown documents to JSON. Learn more at semanticmd.org.

Converting Markdown to JSON

smd json converts a Markdown document to JSON, using the schema named in the document's front matter:

smd json input.md output.json

You can instead provide a schema explicitly with --schema:

smd json input.md output.json --schema schema.yaml

Converting JSON to Markdown

smd md uses a schema's match patterns and JSON patches to construct Markdown, then verifies that converting the result back to JSON produces the input:

smd md input.json output.md --schema schema.yaml

The generated Markdown includes front matter pointing to the schema, so it can be converted back with smd json output.md output.json.

The converter escapes plain text inserted into Markdown patterns. Values captured with |md or |list, and values captured directly from table cells, are treated as Markdown rather than plain text. Not all JSON values or schemas can be rendered; if no candidate passes the conversion-back check, smd md reports an error.

The output is a valid Markdown representation, not necessarily the original document. A schema may discard formatting or other source details, and inverse rendering may choose a canonical form (for example, a particular fraction or table layout). Consequently, some Markdown documents will not round-trip exactly even when their JSON output does.

Metadata

Release files for semantic-md 0.0.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 semantic-md 0.0.4
File Size Uploaded Provenance Actions
semantic_md-0.0.4.tar.gz 653.6 kB Without provenance Details for semantic_md-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for semantic-md 0.0.4
File Interpreter ABI Platform Actions
semantic_md-0.0.4-py3-none-any.whl Python 3 none any Details for semantic_md-0.0.4-py3-none-any.whl

Total release size: 667.3 kB

Release files / semantic_md-0.0.4.tar.gz

Download URL semantic_md-0.0.4.tar.gz
Size 653.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3f3e1bbc96a0c7d3f4e2f716ce350d738512b940c8537ceb15cf78a5529cc10d
BLAKE2b-256 checksum
How to use checksums
36e3f4b3f0782f6ba3bdb365f94822b6540fa74882afd8e12a259b5b3f763078
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / semantic_md-0.0.4-py3-none-any.whl

Download URL semantic_md-0.0.4-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d789d37982eb902865e307cf534334bf10333a431498ba2303e5f23ebaf80d61
BLAKE2b-256 checksum
How to use checksums
a76fbd220c6ae3982a9fe899d3759251a2f9a54c6602079444acfb7c1a92c8ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for semantic-md 0.0.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