waltz_cli

Crates.iowaltz_cli
lib.rswaltz_cli
version0.1.4
sourcesrc
created_at2017-03-20 16:58:30.553035
updated_at2018-10-03 18:13:41.06552
descriptionExtract code blocks from Markdown and save them as files.
homepage
repositoryhttps://github.com/killercup/waltz
max_upload_size
id9065
size4,258
Pascal Hertleif (killercup)

documentation

https://github.com/killercup/waltz

README

Waltz

Extract code files from Markdown files.

Write guides in Markdown with code blocks that belong in several files, and let waltz extract the code for you so you can build/run/test it easily.

DANGER: Will eat your laundry

This is highly experimental. Has not been tested with real-world code.

Install binary

There are pre-compiled binaries for newer releases that you can find on the releases page.

Alternatively, install it like this:

curl -LSfs https://japaric.github.io/trust/install.sh | sh -s -- --git killercup/waltz

Install manually

Make sure you have Rust and Cargo installed.

$ cargo install --git https://github.com/killercup/waltz

Alternatively, clone this repository and run cargo install --path waltz_cli.

Usage

Markdown syntax

Write regular Markdown, but add an additional file flag to your code blocks, so they have lang,file=path after the triple back ticks. (This is the relative path of the file this code should end up in).

Example:

# Getting started

First of all, create a simple `Cargo.toml` file:

```toml,file=Cargo.toml
[package]
authors = ["Pascal Hertleif <killercup@gmail.com>"]
name = "foo"
version = "0.1.0"
```

As Rust library

Add waltz = "0.4" to your dependencies and use it!

API documentation

CLI

$ cargo install waltz_cli
$ waltz
[...]
Usage: waltz <input file> [<target directory>]
[...]
$ waltz docs/guides/getting-started.md

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 67

cargo fmt