Giter Site home page Giter Site logo

md2src's Introduction

Mardown to Source

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

Build Status Coverage Status Crates.io download

Installation

To download the latest release, please run either cargo install md2src or brew install AlexanderWillner/tap/md2src.

Example

Run run md2src README.md to create the source file named code_snippet_000.rs from the following code:

fn main() {
    todo!();
}

Help

$ md2src --help
md2src 1.1.0
Alexander Willner <[email protected]>
Markdown to source. Extracts code blocks marked with triple backticks into files.

USAGE:
    md2src [OPTIONS] <filename> [--] [folder]

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: // (note: this does not compile)]

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

md2src's People

Contributors

alexanderwillner avatar arcadie avatar

Stargazers

GAURAV avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

arcadie takaj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.