Skip to content

cli tool that extracts the text between codeblocks in markdown

License

Notifications You must be signed in to change notification settings

johnbotris/mdblocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mdblocks

Extract all the text between code blocks in markdown and outputs it all to to stdout

Install

with cargo install

To use cargo install, you should have your cargo bin directory (typically $HOME/.cargo/bin) in your path. Then from inside the crate root (where Cargo.toml is located) run

cargo install --path .

manually

From the crate root run

cargo build --release

then copy ./target/release/mdblocks to whereever you want

note: you can also just run the program from the crate root using `cargo run`

Usage

If command line arguments are provided, mdblocks will read each as a file, and output any code blocks found, in the order of the arguments

mdblocks file1 [file2 [...]]

If no arguments are provided, mdblocks will read from stdin

cat file.txt | mdblocks

About

cli tool that extracts the text between codeblocks in markdown

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages