@scil/mdsplit-js

100.4.1 • Public • Published

mdsplit-js

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

Readme

Keywords

none

Package Sidebar

Install

npm i @scil/mdsplit-js

Weekly Downloads

0

Version

100.4.1

License

MIT

Unpacked Size

301 kB

Total Files

13

Last publish

Collaborators

  • scil