Crates.io | markdown_splitter |
lib.rs | markdown_splitter |
version | 0.1.1 |
source | src |
created_at | 2020-04-18 12:03:34.019134 |
updated_at | 2020-04-18 12:03:34.019134 |
description | Utility tool to split a Markdown file into chunks from annotations |
homepage | https://github.com/romainbou/markdown-splitter |
repository | https://github.com/romainbou/markdown-splitter |
max_upload_size | |
id | 231489 |
size | 30,207 |
Utility tool to split a Markdown file into chunks following annotations
In order to identify which part of the document should be splitted we can use 'export' open and closing tags
# This is a document the is going to be splitted
<!-- export -->
This unnamed part will generate a new `export.md`
<!-- /export -->
This part will be ignored
<!-- export part1 -->
This contents will generate a new `part1.md`
<!-- /export part1 -->
<!-- export part-two.md -->
This contents will generate a new `part-two.md`
With multiple lines
<!-- /export -->
mds markdown.md
tree
.
├── export.md
├── markdown.md
├── part1.md
└── part-two.md
mds markdown.md
`export.md` created
`part1.md` created
`part-two.md` created
Specifying a default output file
mds markdown.md -o export.md
`export.md` created
Maintaining a diary or a blog in one file with annotations. This tool allows to split the file into multiple markdown files for each articles. Those markdown articles are now easy to publish with static site generators like Gatsby.
cargo build
cargo test