Skip to main content

semiliterate

semiliterate is a standalone extraction engine and CLI for building markdown documentation from semiliterate source files. It preserves the extraction behavior from mkdocs-simple-plugin without depending on MkDocs.

Install

pip install -e .

CLI

semiliterate build --source . --out .build-docs

Options:

  • --config PATH: load YAML config
  • --source PATH: source tree root
  • --out PATH: output tree
  • --include-mode copy|symlink|skip: how included files are materialized
  • --dry-run: scan and report without writing files
  • -v, --verbose: enable info logging

Config

The YAML config is intentionally close to the previous plugin config:

folders:
  - src
  - examples

ignore:
  - .git/**
  - node_modules/**
  - _site/**

include:
  - "*.md"
  - "*.png"

semiliterate:
  - pattern: ".*"
    terminate: "^\\W*md-ignore"
    extract:
      - start: "^\\s*\"\"\"\\W?md\\b"
        stop: "^\\s*\"\"\"\\s*$"

If you want to keep the built-in defaults and add a few more file types, use include_extra and ignore_extra:

include_extra:
  - "*.csv"
  - "*.webp"
ignore_extra:
  - "_build/**"

include and ignore still replace the defaults if you set them directly.

Python API

from semiliterate import ExtractionPattern
from semiliterate import Semiliterate
from semiliterate import build_docs

build_docs(source=".", out=".build-docs")

Useful exports:

  • Semiliterate
  • ExtractionPattern
  • SimpleScanner
  • build_docs
  • load_config

Compatibility Notes

  • The extraction regexes and inline parameter behavior are carried over directly from mkdocs-simple-plugin.
  • .mkdocsignore, include matching, hidden-file handling, and destination file naming follow the original implementation.
  • This package does not depend on MkDocs and does not include any plugin or site-generator integration.

Example

Given a source file:

"""md
# Title
Some docs.
"""

Running:

semiliterate build --source . --out .build-docs

creates:

.build-docs/<source-file-basename>.md

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

semiliterate-0.2.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

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

semiliterate-0.2.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file semiliterate-0.2.0.tar.gz.

File metadata

  • Download URL: semiliterate-0.2.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for semiliterate-0.2.0.tar.gz
Algorithm Hash digest
SHA256 330ba2ee592dd66328446157fad9e320d91f64f7ce5e892f6e9dd7e5da673b3e
MD5 ef8074b26d6a743323cbfcf6d06eff39
BLAKE2b-256 700916472fc517833a6974c58beb71a849cdc4168186642b630f8fcf45623f63

See more details on using hashes here.

Provenance

The following attestation bundles were made for semiliterate-0.2.0.tar.gz:

Publisher: release.yml on PrimerPages/semiliterate

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

File details

Details for the file semiliterate-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: semiliterate-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for semiliterate-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb49209fcdd2b05aa92156461cba4e7b5b300d5e91c225507d0fab746994462c
MD5 4e6c13eb13a37bf77c74662a10d0aa3d
BLAKE2b-256 ce2278a60cfbd38d7aafed9c47aee8793c84d24f1c7d65f3bd67623b19a7eb0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for semiliterate-0.2.0-py3-none-any.whl:

Publisher: release.yml on PrimerPages/semiliterate

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

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

0.0.2

2 files

0.0.1

2 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