Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ditaa diagram options are not working #1803

Open
gladykov opened this issue Nov 7, 2024 · 3 comments
Open

Ditaa diagram options are not working #1803

gladykov opened this issue Nov 7, 2024 · 3 comments

Comments

@gladykov
Copy link

gladykov commented Nov 7, 2024

According to this #1279 , diagram options should work.

But when using examples from here:
https://plantuml.com/ditaa

example:

@startditaa < --no-shadows, scale=0.7
+---------+  /--------\   +-------+
| cBLU    +--+cAAA    +---+Version|
|         |  |  Data  |   |   V3  |
|    +----+  |  Base  |   |cRED{d}|
|    |cPNK|  |     {s}|   +-------+
|    |    |  \---+----/
+----+----+    
@endditaa

Renders as:
image

in https://kroki.io/#try

@ggrossetie
Copy link
Member

PlantUML embeds ditaa so the following syntax is recognized only by PlantUML:

@startditaa < --no-shadows, scale=0.7
(...)
@endditaa

When using the ditaa endpoint in Kroki, you should pass diagram options as described in the documentation:

https://kroki.io/ditaa/svg/eNrT1oUBbQUFfRg7RkFBQRsmzlWjkOzkE6oAEdNOdnR0hLJ1tcNSi4oz8_NqgGpgoAaMXBJLEsEMMA4zBtIQNdpQu4Acp8TiVKia5CBXl-qUWqiamuQAP2-IOUBQXVxbg-YeqLEgIgYkBBLX54IYDTVfQQEAZBMvuw==?no-shadows

https://kroki.io/ditaa/svg/eNrT1oUBbQUFfRg7RkFBQRsmzlWjkOzkE6oAEdNOdnR0hLJ1tcNSi4oz8_NqgGpgoAaMXBJLEsEMMA4zBtIQNdpQu4Acp8TiVKia5CBXl-qUWqiamuQAP2-IOUBQXVxbg-YeqLEgIgYkBBLX54IYDTVfQQEAZBMvuw==

It seems that the scale option does not work properly. I get the following error:

java.io.FileNotFoundException: --scale 0.7 (No such file or directory) at [email protected]/java.io.FileInputStream.open0(FileInputStream.java) at [email protected]/java.io.FileInputStream.open(FileInputStream.java:219) at [email protected]/java.io.FileInputStream.(FileInputStream.java:157) at [email protected]/java.io.FileInputStream.(FileInputStream.java:112) at org.stathissideris.ditaa.core.CommandLineConverter.convert(CommandLineConverter.java:72) at org.stathissideris.ditaa.core.CommandLineConverter.main(CommandLineConverter.java:40) (exit code 1)

@ggrossetie
Copy link
Member

I've deployed a fix and now scale is working:

https://kroki.io/ditaa/svg/eNrT1oUBbQUFfRg7RkFBQRsmzlWjkOzkE6oAEdNOdnR0hLJ1tcNSi4oz8_NqgGpgoAaMXBJLEsEMMA4zBtIQNdpQu4Acp8TiVKia5CBXl-qUWqiamuQAP2-IOUBQXVxbg-YeqLEgIgYkBBLX54IYDTVfQQEAZBMvuw==?scale=0.7

Since we have a dedicated endpoint for Ditaa (and a consistent way of defining diagram options) I don't know if we should also support the PlantUML syntax... @gladykov What do you think?

@gladykov
Copy link
Author

I have no strong opinion here. Just encountered this situation while browsing examples and experimenting with Kroki.

jynolen pushed a commit to jynolen/kroki that referenced this issue Dec 3, 2024
Use pre-built Docker image for erd (yuzutech#1754)

Restart browser if killed on Mermaid (yuzutech#1745)

chore(deps): update java dependencies (yuzutech#1722)

chore(deps): update structurizr packages to v2.2.0 (yuzutech#1757)

chore(docs): add Ditaa diagram options to diagram-options page (yuzutech#1781)

Co-authored-by: Guillaume Grossetie <[email protected]>

chore(node): upgrade to Node LTS 20.18.0 (yuzutech#1784)

chore(deps): use Node built-in test runner (yuzutech#1785)

chore(docs): add hugomods-kroki to list of 3rd-party tools (yuzutech#1724)

chore(node): replace mocha + chai by Node test runner and assert modules (yuzutech#1786)

chore(deps): replace mocha by Node test runner (yuzutech#1787)

chore(bpmn): upgrade dependencies (docker base image, puppeteer, bpmn, pino) (yuzutech#1788)

chore(deps): update java testing packages (yuzutech#1772)

chore(deps): update dependency rust to v1.82 (yuzutech#1791)

chore(deps): update node dependencies (yuzutech#1737)

chore(deps): update actions/checkout action to v4.2.1 (yuzutech#1790)

chore(deps): update maven plugins (yuzutech#1755)

chore(docs): introduce helm deploy method in use kubernetes section (yuzutech#1793)

Co-authored-by: Guillaume Grossetie <[email protected]>

chore(deps): update java dependencies (yuzutech#1789)

chore(deps): update structurizr packages to v3 (major) (yuzutech#1792)

chore(deps): upgrade Mermaid to 11.3.0 (yuzutech#1795)

chore(deps): bump puppeteer and pino in diagrams.net (yuzutech#1794)

chore(deps): update node dependencies (major) (yuzutech#1671)

chore(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.2 (yuzutech#1801)

chore(deps): update java dependencies to v1.5.12 (yuzutech#1798)

chore(deps): update actions/checkout action to v4.2.2 (yuzutech#1797)

chore(deps): update dependency mermaid to v11.4.0 (yuzutech#1800)

chore(deps): update versions and distributions

fix(ditaa): pass argument values as separate arguments

ref yuzutech#1803

Version 0.26.0

chore(release): free up disk space on GitHub runner

chore(release): allow to manually push a release

chore(release): keep the v prefix when creating the release

chore(release): fix environment variable assignment

chore(release): dynamic run-name when using workflow_dispatch

feat: proposal without cheerio

fix: lint + kroki unsafe

chore(deps): update node dependencies (yuzutech#1737)

chore(deps): bump puppeteer and pino in diagrams.net (yuzutech#1794)

feat: self contains svg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants