Skip to main content

Convert Markdown to Tree (Dictonary)

This module is going to convert markdown(.md) file into tree-structure-object. The tree object will be exported as treelib, which is defined on this repository (https://github.com/caesar0301/treelib)

Set Up

poetry add git+https://github.com/kevin-tofu/md2tree.git

Usage

How to convert markdown file into treelib

import md2tree

tree = md2tree.file2tree(
    'README.md'
)
print(tree)

md2tree.tree2file(
    './tree.json',
    tree,
    'root'
)

print function shows graph structure like below using treelib

root
└── Convert Markdown to Tree (Dictonary)
    ├── Set Up
    └── Usage
        └── Functions

The function 'md2tree.tree2file' exports graph with data as json file

{
  "name": "root",
  "data": null,
  "children": [
    {
      "name": "1",
      "data": {
        "title": "Convert Markdown to Tree (Dictonary)",
        "texts": [
          "\n",
          " This module is going to convert markdown(.md) file into tree-structure-object.\n",
          "\n"
        ]
      },
...

Functions

Functions Description
file2tree
lines2tree
tree2dict
tree2file

Metadata

Release files for md2tree 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for md2tree 0.1.0
File Size Uploaded Provenance Actions
md2tree-0.1.0.tar.gz 7.6 kB Without provenance Details for md2tree-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for md2tree 0.1.0
File Interpreter ABI Platform Actions
md2tree-0.1.0-py3-none-any.whl Python 3 none any Details for md2tree-0.1.0-py3-none-any.whl

Total release size: 16.6 kB

Release files / md2tree-0.1.0.tar.gz

Download URL md2tree-0.1.0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
106b3f68098c60ae847f72a67425ad744b52178df7a729efd7a1394773be6f2b
BLAKE2b-256 checksum
How to use checksums
45afa421692b7ed8dfaa4eef9d62903a37637ff248665f3c1e13b86becf35826
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.11.6 Linux/6.8.0-59-generic

Release files / md2tree-0.1.0-py3-none-any.whl

Download URL md2tree-0.1.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb12483e8bec3747213d420d172845efbaf25e43183dc08a5b33555c4bb9c1d4
BLAKE2b-256 checksum
How to use checksums
d69cf723c8245881a2fc0ae59703d9a8b577580f1ada57b2610fcd51ea60d87b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.11.6 Linux/6.8.0-59-generic

Security for md2tree 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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