Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wiktor-k/tangler
Extracts (tangles) code fragments from Markdown documents.
https://github.com/wiktor-k/tangler
e2e markdown rust tangle
Last synced: 2 months ago
JSON representation
Extracts (tangles) code fragments from Markdown documents.
- Host: GitHub
- URL: https://github.com/wiktor-k/tangler
- Owner: wiktor-k
- License: apache-2.0
- Created: 2023-01-16T09:34:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-20T15:29:29.000Z (8 months ago)
- Last Synced: 2024-10-12T03:25:42.012Z (3 months ago)
- Topics: e2e, markdown, rust, tangle
- Language: Rust
- Homepage: https://crates.io/crates/tangler
- Size: 61.5 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE-APACHE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Tangler
[![CI](https://github.com/wiktor-k/tangler/actions/workflows/rust.yml/badge.svg)](https://github.com/wiktor-k/tangler/actions/workflows/rust.yml)
[![Crates.io](https://img.shields.io/crates/v/tangler)](https://crates.io/crates/tangler)Extracts (tangles) code fragments from Markdown documents.
This can be used to test examples in README documents to make sure they are always up to date.
The most common use of this crate is installing it as part of the CI script, extracting selected code fragments and then executing them.
```bash
cargo install tangler
tangler bash < README.md | bash -euxo pipefail -
```The first argument is a selector of the blocks that should be extracted. The tool takes the input markdown document from stdin and outputs only matching blocks to stdout.
## License
This project is licensed under either of:
- [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0),
- [MIT license](https://opensource.org/licenses/MIT).at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in this crate by you, as defined in the
Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.