Skip to content

Commit

Permalink
Merge 4f12a16 into bc66b51
Browse files Browse the repository at this point in the history
  • Loading branch information
bauglir committed Mar 21, 2024
2 parents bc66b51 + 4f12a16 commit 3a3983b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 24 deletions.
7 changes: 0 additions & 7 deletions docs/architecture/workspace.dsl
Expand Up @@ -38,13 +38,6 @@ workspace {
library -> this "Sends encoded diagram to"
}

container "Blockdiag Service" {
description "Renders diagrams from the `blockdiag` suite of generators, e.g. `blockdiag`, `seqdiag`, `actdiag`, `nwdiag`, etc."
url http://blockdiag.com

kroki_core -> this "Defers `blockdiag` diagrams to"
}

container "BPMN Service" {
description "Renders 'Business Process Model and Notation' diagrams using `bpmn-js`."
url https://bpmn.io/toolkit/bpmn-js
Expand Down
47 changes: 34 additions & 13 deletions src/Kroki.jl
Expand Up @@ -235,6 +235,8 @@ DIAGRAM_TYPE_METADATA = Dict{Symbol, DiagramTypeMetadata}(
"C4 with PlantUML",
"https://github.com/plantuml-stdlib/C4-PlantUML",
),
:d2 => DiagramTypeMetadata("D2", "https://d2lang.com"),
:dbml => DiagramTypeMetadata("DBML", "https://dbml.org"),
:diagramsnet => DiagramTypeMetadata("diagrams.net", "https://diagrams.net"),
:ditaa => DiagramTypeMetadata("ditaa", "http://ditaa.sourceforge.net"),
:erd => DiagramTypeMetadata("erd", "https://github.com/BurntSushi/erd"),
Expand All @@ -251,10 +253,13 @@ DIAGRAM_TYPE_METADATA = Dict{Symbol, DiagramTypeMetadata}(
:structurizr => DiagramTypeMetadata("Structurizr", "https://structurizr.com"),
:svgbob =>
DiagramTypeMetadata("Svgbob", "https://ivanceras.github.io/content/Svgbob.html"),
:symbolator => DiagramTypeMetadata("Symbolator", "https://github.com/kevinpt/symbolator"),
:tikz => DiagramTypeMetadata("Symbolator", "https://github.com/pgf-tikz/pgf"),
:umlet => DiagramTypeMetadata("UMLet", "https://github.com/umlet/umlet"),
:vega => DiagramTypeMetadata("Vega", "https://vega.github.io/vega"),
:vegalite => DiagramTypeMetadata("Vega-Lite", "https://vega.github.io/vega-lite"),
:wavedrom => DiagramTypeMetadata("WaveDrom", "https://wavedrom.com"),
:wireviz => DiagramTypeMetadata("WireViz", "https://github.com/formatc1702/WireViz"),
)

"""
Expand Down Expand Up @@ -291,39 +296,55 @@ $(renderDiagramSupportAsMarkdown(LIMITED_DIAGRAM_SUPPORT))
"""
const LIMITED_DIAGRAM_SUPPORT = MIMEToDiagramTypeMap(
MIME"application/pdf"() => (
:blockdiag,
:seqdiag,
:actdiag,
:blockdiag,
:c4plantuml,
:erd,
:graphviz,
:nwdiag,
:packetdiag,
:plantuml,
:rackdiag,
:erd,
:graphviz,
:seqdiag,
:structurizr,
:tikz,
:vega,
:vegalite,
),
MIME"image/jpeg"() => (:c4plantuml, :erd, :graphviz, :plantuml, :structurizr, :umlet),
MIME"image/jpeg"() => (:erd, :graphviz, :tikz, :umlet),
MIME"image/png"() => (
:blockdiag,
:seqdiag,
:actdiag,
:nwdiag,
:diagramsnet,
:packetdiag,
:rackdiag,
:blockdiag,
:c4plantuml,
:diagramsnet,
:ditaa,
:erd,
:graphviz,
:mermaid,
:nwdiag,
:packetdiag,
:plantuml,
:rackdiag,
:seqdiag,
:structurizr,
:symbolator,
:tikz,
:umlet,
:vega,
:vegalite,
:wireviz,
),
MIME"image/svg+xml"() => (
:bpmn,
:bytefield,
:d2,
:dbml,
:excalidraw,
:nomnoml,
:pikchr,
:svgbob,
:wavedrom
),
MIME"image/svg+xml"() =>
(:bpmn, :bytefield, :excalidraw, :nomnoml, :pikchr, :svgbob, :wavedrom),
MIME"text/plain"() => (:c4plantuml, :plantuml, :structurizr),
MIME"text/plain; charset=utf-8"() => (:c4plantuml, :plantuml, :structurizr),
)
Expand Down
4 changes: 0 additions & 4 deletions support/docker-services.yml
Expand Up @@ -4,12 +4,10 @@ services:
core:
image: yuzutech/kroki:${KROKI_CONTAINER_IMAGE_TAG:-latest}
depends_on:
- blockdiag
- bpmn
- excalidraw
- mermaid
environment:
- KROKI_BLOCKDIAG_HOST=blockdiag
- KROKI_BPMN_HOST=bpmn
- KROKI_DIAGRAMSNET_HOST=diagramsnet
- KROKI_EXCALIDRAW_HOST=excalidraw
Expand All @@ -19,8 +17,6 @@ services:
- KROKI_SAFE_MODE=unsafe
ports:
- 8000:8000
blockdiag:
image: yuzutech/kroki-blockdiag:${KROKI_CONTAINER_IMAGE_TAG:-latest}
bpmn:
image: yuzutech/kroki-bpmn:${KROKI_CONTAINER_IMAGE_TAG:-latest}
diagramsnet:
Expand Down

0 comments on commit 3a3983b

Please sign in to comment.