Markdown file parser and structured extraction tool
Project description
jostack-mdparse
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jostack_mdparse-0.1.0.tar.gz.
File metadata
- Download URL: jostack_mdparse-0.1.0.tar.gz
- Upload date:
- Size: 22.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62a0c6dcecc0ad07cb218a6c2e6be070603c00bcc79cc12284e5c7014be36991
|
|
| MD5 |
18160196ac53087dd3e49ce9ba6040e4
|
|
| BLAKE2b-256 |
3b1d444a5b830b83b3d7094f4cdb4e572c5f7ed26d7d61da992a748924b8879f
|
Provenance
The following attestation bundles were made for jostack_mdparse-0.1.0.tar.gz:
Publisher:
release.yml on hyunhee-jo/jostack-mdparse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jostack_mdparse-0.1.0.tar.gz -
Subject digest:
62a0c6dcecc0ad07cb218a6c2e6be070603c00bcc79cc12284e5c7014be36991 - Sigstore transparency entry: 1245359696
- Sigstore integration time:
-
Permalink:
hyunhee-jo/jostack-mdparse@a17a25c403eb446a0cf9485e55dba2476aa15939 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/hyunhee-jo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a17a25c403eb446a0cf9485e55dba2476aa15939 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jostack_mdparse-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jostack_mdparse-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e6d5eb6c19335aef82f9574e11be57b990a4eef198d57fe3d11ce718785c5c1
|
|
| MD5 |
af70176af9a4e8b821c8c5137306e01d
|
|
| BLAKE2b-256 |
0e4fb0bea20b8963be75813773145c420ba941dab98a587bfe6bfe593b18a3ef
|
Provenance
The following attestation bundles were made for jostack_mdparse-0.1.0-py3-none-any.whl:
Publisher:
release.yml on hyunhee-jo/jostack-mdparse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jostack_mdparse-0.1.0-py3-none-any.whl -
Subject digest:
0e6d5eb6c19335aef82f9574e11be57b990a4eef198d57fe3d11ce718785c5c1 - Sigstore transparency entry: 1245359781
- Sigstore integration time:
-
Permalink:
hyunhee-jo/jostack-mdparse@a17a25c403eb446a0cf9485e55dba2476aa15939 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/hyunhee-jo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a17a25c403eb446a0cf9485e55dba2476aa15939 -
Trigger Event:
push
-
Statement type: