Skip to main content

Markdown file parser and structured extraction tool

Project description

jostack-mdparse

CI License-Apache_2.0 Python 3.10+

Markdown file parser and structured extraction tool (CLI + Python API).

Installation

pip install jostack-mdparse

Quick Start

CLI

# Extract as JSON
jostack-mdparse extract README.md -f json

# Extract specific sections
jostack-mdparse extract docs/ -s "Installation,Usage" -f text

# Print table of contents
jostack-mdparse toc README.md

# Print frontmatter metadata
jostack-mdparse meta blog-post.md

Python API

from jostack_mdparse import extract

# Basic extraction
result = extract("README.md", format="json")

# Filter by heading level
result = extract("docs/guide.md", heading_level="1,2", format="text")

# Extract specific sections
result = extract("README.md", sections="Usage", strip_html=True)

Commands

Command Description
extract Parse Markdown and output structured data (JSON, text, HTML)
toc Print the table of contents (heading tree)
meta Print frontmatter metadata as JSON

Parameters

Parameter Type Default Description
output-dir str None Directory where output files are written
format str "json" Output format: json, text, html
quiet bool False Suppress console logging output
heading-level str None Filter by heading levels (comma-separated)
sections str None Extract sections by heading text (comma-separated)
include-frontmatter bool True Include YAML/TOML frontmatter in output
strip-html bool False Strip inline HTML tags
include-code-blocks bool True Include fenced code blocks
include-toc bool False Add generated table of contents
flatten-lists bool False Flatten nested lists
section-separator str None Separator between sections in text output
normalize-links bool False Convert relative links to absolute

Development

# Install in development mode
pip install -e .

# Run tests
make test

# Run linting
make lint

# Format code
make format

License

MIT

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

jostack_mdparse-0.3.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

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

jostack_mdparse-0.3.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file jostack_mdparse-0.3.0.tar.gz.

File metadata

  • Download URL: jostack_mdparse-0.3.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jostack_mdparse-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6682b5b9056908d4998c7df6b10897758f1831be6db9000095dfc0ea7048ed6b
MD5 b208c7d9162a5cd3aeccce77d03dc725
BLAKE2b-256 af75b7f7d3aadbc55e52db02e3e86d53295b29d7214043406ff77abd5f0144f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for jostack_mdparse-0.3.0.tar.gz:

Publisher: release.yml on hyunhee-jo/jostack-mdparse

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

File details

Details for the file jostack_mdparse-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jostack_mdparse-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e467f1cca8aa31321c465018c32c0237167ba8f60495a4ee13fbebdb4d5f5377
MD5 9aec23c9fa4520bf5ef4ff906a58941c
BLAKE2b-256 ed651ea88c12bba35a94cf288f80aeb6ef91bf37107a8f0bca8e829113fc2267

See more details on using hashes here.

Provenance

The following attestation bundles were made for jostack_mdparse-0.3.0-py3-none-any.whl:

Publisher: release.yml on hyunhee-jo/jostack-mdparse

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