Extending asciidoctordiagram

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Extending asciidoctordiagram

amhe360
Does asciidoctor diagram itself support an extension mechanism?
Or, do I need to fork the asciidoctor-diagram code to support the generation of a diagram from a new unique input file format?

Then, will asciidoctor pick up and use the lastest installed version of asciidoctordiagram or do I also need to modify asciidoctor to get it to use a modified version of asciidoctor-diagram?

I prefer to develop the new asciidoctor-diagram capability in Java -- if that shapes the answer any.

Thanks in advance!
Reply | Threaded
Open this post in threaded view
|

Re: Extending asciidoctordiagram

Alexander Schwartz
Every supported diagram type in Asciidoctor Diagram is itself an extension of Asciidoctor and depends on a common DiagramConverter provided by Asciidoctor Diagram.

You should be able to add a new diagram type by following the example of for example PlantUML: https://github.com/asciidoctor/asciidoctor-diagram/blob/master/lib/asciidoctor-diagram/plantuml.rb and https://github.com/asciidoctor/asciidoctor-diagram/tree/master/lib/asciidoctor-diagram/plantuml

As adding new diagram types depend on Asciidoctor Diagram Ruby code, I doubt that you can write add a diagram type by using just Java code although I might be mistaken here.

Regards,
Alexander
Alexander Schwartz (alexander.schwartz@gmx.net)
https://www.ahus1.de