samwilson / diagrams-extension

A MediaWiki extension that displays GraphViz, Mscgen, PlantUML, and Mermaid diagrams in wiki pages.
https://www.mediawiki.org/wiki/Extension:Diagrams
GNU General Public License v2.0
8 stars 11 forks source link

Support for Ditaa diagrams #57

Open bkaczynski opened 2 years ago

bkaczynski commented 2 years ago

PlantUML has integration with Ditaa. I've setup Mediawiki on Linux server, add Diagrams extension, I've tested nwdiag and sequence diagrams - everything works. I've installed from package repository (openSUSE) both

# zypper se -i -v ditaa
Loading repository data...
Reading installed packages...

S  | Name  | Type    | Version        | Arch   | Repository
---+-------+---------+----------------+--------+------------------------------------------
i+ | ditaa | package | 0.10-lp153.2.2 | noarch | mnhauke's playground (openSUSE_Leap_15.3)
    name: ditaa
# zypper se -i -v plantuml
Loading repository data...
Reading installed packages...

S  | Name     | Type    | Version             | Arch   | Repository
---+----------+---------+---------------------+--------+------------------------------------------
i+ | plantuml | package | 1.2022.4-lp153.91.1 | noarch | mnhauke's playground (openSUSE_Leap_15.3)
    name: plantuml

# which plantuml 
/usr/bin/plantuml
# which ditaa 
/usr/bin/ditaa

After adding basic ditaa diagrams from plantuml's page

<uml>
@startuml
ditaa
+--------+   +-------+    +-------+
|        +---+ ditaa +--> |       |
|  Text  |   +-------+    |diagram|
|Document|   |!magic!|    |       |
|     {d}|   |       |    |       |
+---+----+   +-------+    +-------+
    :                         ^
    |       Lots of work      |
    +-------------------------+
@enduml
</uml>

(tested @startditaa and @endditaa syntax but also does not work) I see the output in the article: https://paste.opensuse.org/5345902 Mediawiki 1.38.0 but tested also on earlier stable version. There is seperate Ditaa extension but it's unmaintened and does not work anymore on MW 1.38 Is it something I can check more or that kind of PlantUML diagram is not supported by extension?

samwilson commented 2 years ago

This is great. I didn't realise that Ditaa was built in to PlantUML.

It'd be best to support <ditaa> tags wouldn't it, to avoid the workaround you give above?

bkaczynski commented 2 years ago

Yes, It would. If it's not a problem if <ditaa> tag is used by unmaintained Ditaa extension