Skip to content

scil/mdsplit-js

Repository files navigation

license CI npm NPM downloads Percentage of issues still open

js port of python markusstraub/mdsplit

Extra Features

  1. customize the file name for each chapter (each head represents a chapter). Index can be added to file name
-cf "return `${chapter.index}-${( chapter.heading?  chapter.heading.headingTitle:  fallback )}`  " -o output_dir  "big.md" 
  1. new treatment method for the text contents under a header which has sub headers
# h1

history

## h2

by default, this markdown file would be split into

- h1.md
- h1
  - h2.md

but with the extra cli option -eq, the output is

- h1
  - h1.md
  - h2.md

with both options -eq and -cf

-eq -cf "return `${chapter.index}-${( chapter.heading?  chapter.heading.headingTitle:  fallback )}`  "  -l 2 -o output_dir "big.md" 

the output could be

- 0-h1
  - 0-h1.md
  - 1-h2.md

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published