Closed VladimirAlexiev closed 2 months ago
Here's a fixed diagram for https://text-to-diagram.com/?b=plantuml&example=chess . I removed the square brackets, used long arrows for the arrows going across the cluster:
@startuml
' Actors
"Hans Niemann" as hans
rectangle "defendants" {
"Magnus Carlsen" as mc
"Play Magnus Group" as playmagnus
"Chess.com" as chesscom
"Hikaru Nakamura" as naka
mc -> playmagnus: Owns majority
playmagnus <-> chesscom: Merger talks
chesscom -> naka: Sponsoring
}
' Accusations
hans -> defendants: suing for $100M
' Offense
naka --> hans : Accused of cheating on his stream
mc --> hans : Lost then withdrew with accusations
chesscom --> hans: 72 page report of cheating
@enduml
Here is the result (which for me is rendered in github using https://chrome.google.com/webstore/detail/plantuml-visualizer/ffaloebcmkogfdkemcekamlmfkkmgkcf). I think it's quite competitive to the d2 result:
Here is a fixed diagram for https://text-to-diagram.com/?b=plantuml&example=text .
Compile error: PlantUML does not support rich text
is a very unfair statement.
The only thing I couldn't do is include quotes in the text, since that's used to delimit the text
@startuml
rectangle description as "
== Hope is a good breakfast, but it is a bad supper
* Look into my eyes and try to forget that you have a Macy's charge card!
* The **Tree of Learning** bears the noblest fruit, but noble fruit tastes bad.
There is nothing new under the sun, but there are lots of old things we don't know yet
* //Ambrose Bierce//
"
rectangle x
description -> x
@enduml
@VladimirAlexiev Thanks for continuing #40 the comparisons with more sample fixes. At that time I was evaluating text-to-diagram technologies for several commercial projects. ( I feel we have to have to fund and participate in open source to keep it thriving). I am starting yet another effort and I am updating my knowledge of available technologies again. After such a period of time since the first report in #40, I am very disappointed to see the false and bias information still present. It is simply not necessary as there are valid critiques of PlantUML. The comparisons information could be easily fixed. I do not plan to recommend this project to my colleagues any further.
Thanks @VladimirAlexiev , I will include next time I update this.
@chainofreasoning your report is the length of a small tutorial. I am the only one that maintains this on top of many other repositories. I've just not had the time. D2 has undergone many changes and I have not updated this site to reflect that either. If you'd like to submit a PR, you're welcome to. If you'd like to "fund and participate in open source", you're welcome to.
We can all understand being overburdened, rearranging priorities, and such. Happens to us all and is easily forgivable. The fact remains the public information is incorrect and needlessly defamatory towards another open source project. Your snide remarks will not change that. As a community we can do better. We tried to do the first passes at helping with examples and fixes. I am sorry if you found the issue report to long but I err on more details with issue reports dealing with runtime errors across platforms. I am "welcomed" to do what I want with my time as anyone else. Leaving this issue is what I choose to do.
@chainofreasoning I make an earnest effort to be correct in comparisons, so I appreciate issue reports like these (and yours). It's also why this effort is public, so that corrections can easily be spotted and made. As for your issue, it's not that it's detailed that I'm pointing out -- I appreciate the detail. It's that it's not easily addressable, there's time and effort involved for the maintainer of the project, since it's not a PR. Please refrain from insults like calling this project defamatory, otherwise I'll have to block you.
@VladimirAlexiev thanks again for the improvements. Implemented many.
Friendly error messages: Not just "syntax error" True, but it shows the exact error location
Comparison stands.
Images & Icons: What are the available options for including images and icons: Any URL It has some HTML tags, including that lets you use any URL as image: https://plantuml.com/creole#f42f1366d9ab93bb. In addition, it has a very wide set of icons (https://plantuml.com/openiconic), unicode emojis (https://plantuml.com/unicode and https://plantuml.com/creole#68305e25f5788db0) and sprites (https://plantuml.com/sprite and https://plantuml.com/stdlib)
Updated to say PlantUML can load any url.
Markdown: Use Markdown for text objects in the diagram True, but it has https://plantuml.com/creole which is just about the same
It's not. Markdown is highly standardized. It's like saying Bash is the same as Python or something just because it can achieve the same things.
LaTeX: Render math equations suitable for academic usage Yes, see https://plantuml.com/ascii-math
Fair, updated to say PlantUML supports this.
Native Github rendering: Does it render natively on Github: I guess that depends on plugins and addons. Eg for me, neither https://github.com/terrastruct/d2/blob/master/docs/flow.d2 nor https://github.dev/terrastruct/d2/blob/master/docs/flow.d2 are rendered, but PlantUML is rendered using https://chrome.google.com/webstore/detail/plantuml-visualizer/ffaloebcmkogfdkemcekamlmfkkmgkcf (eg see diagrams below)
That's not what native means.
Code snippets: Render syntax-highlighted code snippets PlantUML supports code snippets, see https://plantuml.com/creole#ca0dbad92a874b2f, but currently not code highlighting. Then again, who wants a lot of code in a diagram?
Without syntax highlighting, code snippets are just monospaced text? Point stands.
Responsive dark mode: Can the diagram render with both light and dark mode, switching depending on user preference. Yes, there is at http://www.plantuml.com/plantuml/ (the next URL token is uml for light mode, duml for dark) image
That's not what responsive means.
PDF exports: Can the CLI export PDF output: It only requires adding some jars: https://plantuml.com/pdf
Updated to say "with additional installs".
you should not use square brackets in nodes (eg [foo] in https://text-to-diagram.com/?b=plantuml&example=containers because these get rendered as "components" with an interface icon, not simple rectangles
I tried it. This doesn't work.
@startuml
node "parent" {
node "childB" {
grandchild
}
childA -> grandchild
}
foo -> childA
@enduml
Here's a fixed diagram for https://text-to-diagram.com/?b=plantuml&example=chess .
Updated
Here is a fixed diagram for https://text-to-diagram.com/?b=plantuml&example=text .
Updated
Hi @alixander! Great work with going through all the items on that list. Very much appreciated!
One minor point, regarding the grandchild item, it looks like there's a keyword missing (i.e. something that tells PlantUML what type/shape the element should be). With that added, the example works fine:
Nevermind, I just realised this change was already made live. Sorry for the noise 😥
For shits and giggles, here's a diagram from the manual with every shape nested:
Continuing #40 , I looked at the list Features at the bottom of https://text-to-diagram.com/?b=plantuml. Here are my comments on features marked as not supported by PlantUML
<img>
that lets you use any URL as image: https://plantuml.com/creole#f42f1366d9ab93bb.True, but it has https://plantuml.com/creole which is just about the same
uml
for light mode,duml
for dark)In addition:
[foo]
in https://text-to-diagram.com/?b=plantuml&example=containers because these get rendered as "components" with an interface icon, not simple rectangles