Skip to main content

get the numbering at markdown file

Project description

Usage

1. Import package

from pathlib import Path
from md_head_num import MdHeadNum

2. Prepare the markdown file list

md_files = list(Path("tests").glob("*.md"))
md_files  # [PosixPath('tests/test1.md'), PosixPath('tests/test2.md')]

3. Create an instance of MdHeadNum

mn = MdHeadNum(md_files, max_level=5)

4. read markdown file and get the numbering

mn.numbering()

5. Numbered markdown file save and save_as

# mn.save()  # Note: This will overwrite the original file
mn.save_as("_Numbered")  # This will save the numbered(Example: test1_Numbered.md) file with a suffix

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

md_head_num-0.1.1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

md_head_num-0.1.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file md_head_num-0.1.1.tar.gz.

File metadata

  • Download URL: md_head_num-0.1.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.4 Windows/10

File hashes

Hashes for md_head_num-0.1.1.tar.gz
Algorithm Hash digest
SHA256 407a27438669f7f2fffa94306dee0c4d5872d864db7f6485aa41db48d4c87865
MD5 caad662120af57ef48d5272f242425b3
BLAKE2b-256 1db458173ff4c06a93baa0ccb999760fb898c75933aa93923f0f67cccc42caf5

See more details on using hashes here.

File details

Details for the file md_head_num-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: md_head_num-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.4 Windows/10

File hashes

Hashes for md_head_num-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 303aa07955d3fc5d42615bb7f3f0d0f93d6b465c7d08f55e88af42b5062855ce
MD5 431c4e14d0bd8f6969a1ed2372e18dbc
BLAKE2b-256 05b9a73754ae6497c351516e3331c490846c4d33489d0d419fa510e2a036c514

See more details on using hashes here.

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