Diagram/Kroki: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 13: | Line 13: | ||
kroki version | kroki version | ||
which kroki | which kroki | ||
</syntaxhighlight> | |||
|} | |||
==Kroki » Config== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
Kroki » Install | |||
|- | |||
|valign='top' colspan='2'| | |||
<syntaxhighlight style='margin:3px 0' lang='yaml'> | |||
cat <<'YML' | tee ${HOME}/kroki.yml >/dev/null | |||
--- | |||
endpoint: https://kroki.shahed.biz.ops | |||
timeout: 30s | |||
YML | |||
</syntaxhighlight> | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='yaml'> | |||
BASE64_SCHEME="$(cat <<-'MMD' | kroki encode /dev/stdin | |||
--- | |||
config: | |||
theme: forest | |||
--- | |||
graph TD | |||
A[Client] --> B[Ingress] | |||
B --> C[Kroki] | |||
C --> D[Mermaid Renderer] | |||
MMD | |||
)" | |||
setsid open https://kroki.shahed.biz.ops/mermaid/svg/${BASE64_SCHEME} >/dev/null 2>&1 & | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='yaml'> | |||
BASE64_SCHEME="$(cat <<-'MMD' | kroki encode - | |||
--- | |||
config: | |||
theme: neutral | |||
--- | |||
graph TD | |||
A[Client] --> B[Ingress] | |||
B --> C[Kroki] | |||
C --> D[Mermaid Renderer] | |||
MMD | |||
)" | |||
setsid open https://kroki.shahed.biz.ops/mermaid/svg/${BASE64_SCHEME} >/dev/null 2>&1 & | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Revision as of 08:07, 23 December 2025
cat <<'EXE' | sudo bash
KROKI_ARCH="$(echo "$(uname -s)_$(dpkg --print-architecture)"|tr '[:upper:]' '[:lower:]')"
KROKI_HOME="/opt/cli/$(echo "restic-$(uname -s)-$(dpkg --print-architecture)"|tr '[:upper:]' '[:lower:]')"
KROKI_VERSION=$(curl -s https://api.github.com/repos/yuzutech/kroki-cli/releases/latest | grep -Po '"tag_name": "v\K[^"]*')
curl -fsSLo kroki.tar.gz https://github.com/yuzutech/kroki-cli/releases/download/v${KROKI_VERSION}/kroki-cli_${KROKI_VERSION}_${KROKI_ARCH}.tar.gz
tar xf kroki.tar.gz kroki && install kroki /usr/local/bin
rm -rf kroki.tar.gz kroki
EXE
kroki version
which kroki
|
Kroki » Config
|
Kroki » Install | |
|---|---|
cat <<'YML' | tee ${HOME}/kroki.yml >/dev/null
---
endpoint: https://kroki.shahed.biz.ops
timeout: 30s
YML
| |
BASE64_SCHEME="$(cat <<-'MMD' | kroki encode /dev/stdin
---
config:
theme: forest
---
graph TD
A[Client] --> B[Ingress]
B --> C[Kroki]
C --> D[Mermaid Renderer]
MMD
)"
setsid open https://kroki.shahed.biz.ops/mermaid/svg/${BASE64_SCHEME} >/dev/null 2>&1 &
|
BASE64_SCHEME="$(cat <<-'MMD' | kroki encode -
---
config:
theme: neutral
---
graph TD
A[Client] --> B[Ingress]
B --> C[Kroki]
C --> D[Mermaid Renderer]
MMD
)"
setsid open https://kroki.shahed.biz.ops/mermaid/svg/${BASE64_SCHEME} >/dev/null 2>&1 &
|
References
|
References | ||
|---|---|---|