md2src 1.0.0

Markdown to source. Extracts code blocks marked with triple backticks into files.
md2src-1.0.0 is not a library.
Visit the last successful build: md2src-1.1.0

Mardown to Source

Simple rust binary to extract code blocks marked with triple backticks from markdown files into source files.

Build Status Coverage Status Crates.io

Installation

To download the latest release, please run cargo install md2src.

Example

Run run md2src to create the source file named code_snippet_000.rs from this code:

fn main() {
    todo!();
}

Help

$ md2src --help
md2src 1.0.0
Alexander Willner <alex@willner.ws>
Markdown to source. Extracts code blocks marked with triple backticks into files.

USAGE:
    md2src [OPTIONS] [ARGS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -e, --extension <extension>    File extension for code files [default: rs]
    -l, --language <language>      Code snippet language to extract [default: rust]
    -p, --prefix <prefix>          Prefix code files with this string [default: code_snippet_]
    -i, --ignore <string>          Ignore code with this string [default: #[doc = "This will fail]

ARGS:
    <filename>    Markdown file that contains the code snippets [default: README.md]
    <folder>      Folder for the code snippets [default: .]