From bfe9d95e050fe52d51b08213455d2f28af94e011 Mon Sep 17 00:00:00 2001 From: kev Date: Wed, 10 Apr 2024 11:26:37 +0800 Subject: [PATCH] add mermaid-cli --- README.md | 1 + mermaid-cli/README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 mermaid-cli/README.md diff --git a/README.md b/README.md index 0905e48..f51ccc1 100644 --- a/README.md +++ b/README.md @@ -407,6 +407,7 @@ A collection of delicious docker recipes. - [x] memgraph - [x] memgraph-mage - [x] memgraph-platform +- [x] minlag/mermaid-cli - [x] metabase/metabase - [x] metasploitframework/metasploit-framework :skull: - [x] minio/minio diff --git a/mermaid-cli/README.md b/mermaid-cli/README.md new file mode 100644 index 0000000..8ba90f1 --- /dev/null +++ b/mermaid-cli/README.md @@ -0,0 +1,40 @@ +mermaid-cli +=========== + +[Mermaid][1] is a JavaScript-based diagramming and charting tool that uses +Markdown-inspired text definitions and a renderer to create and modify complex +diagrams. The main purpose of Mermaid is to help documentation catch up with +development. + +## Tutorial + +``` +flowchart LR + +A[Hard] -->|Text| B(Round) +B --> C{Decision} +C -->|One| D[Result 1] +C -->|Two| E[Result 2] +``` + +```mermaid +flowchart LR + +A[Hard] -->|Text| B(Round) +B --> C{Decision} +C -->|One| D[Result 1] +C -->|Two| E[Result 2] +``` + +```bash +# Create an alias +$ alias mermaid-cli='docker run --rm -u $(id -u):$(id -g) -v $PWD:/data minlag/mermaid-cli' + +# Make config file +$ cat input.mmd + +# Generate an SVG +$ mermaid-cli -i input.mmd -o output.svg -t dark -b transparent +``` + +[1]: https://github.com/mermaid-js/mermaid