Skip to main content

Standalone semiliterate extraction engine and CLI.

Project description

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

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

semiliterate-0.1.0.tar.gz (15.0 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.1.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for semiliterate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e440799b72eeaed6b8fa78f2bc63324c45203ade621998a089023c15541509b5
MD5 b38d94d29669ada71e616111c45ea880
BLAKE2b-256 d706c360d91b510b6c9e78fa7382e45277ea8f7cfc4a380359c429182df7b92d

See more details on using hashes here.

Provenance

The following attestation bundles were made for semiliterate-0.1.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.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for semiliterate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36740024fbde1f90b211b00cfc79d67a3365a0b78988863ab69d768e1644b845
MD5 480473b8ba055652963a9031886e4dbc
BLAKE2b-256 6f330b5825312f02a12bb31775a4a5d5490f21d9382e0738b713538e29f91fff

See more details on using hashes here.

Provenance

The following attestation bundles were made for semiliterate-0.1.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.

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