Closed kubamarchwicki closed 8 years ago
Hi Kuba,
When I was adding support for Ditaa in asciidoctor-diagram there was no proper release binary of Ditaa available for download. I forked the project, did some cleanup and packaged that up as ditaamini. It's 'mini' since it's pretty small and I stripped out all the code that requires additional external dependencies. Source repo is at https://github.com/pepijnve/ditaa
You're right that I did make some other small changes. I added that method to TextGrid to load Ditaa diagram source from an InputStream. That's much more convenient for my particular usage of Ditaa.
As for the missing transparent options, I accidentally missed it. I had based myself on the documentation at http://ditaa.sourceforge.net/#usage which doesn't list all the available options. I've gone ahead and added support for the missing rendering options that ditaa supports (transparent
, background
and fixed-slope
).
Woow that was fast! :+1: Thx - the description was quite elaborate as I was thinking of setting up pull request but you didt so fast :) great stuff
--Kuba
The 1.3.0 release was long overdue and this request gave me just enough of a push to just finish it. :)
:+1:
Hi, This is a bit 'yak shaving'ish - but here is the story.
Ditaa extension for asciidoctor-diagram (great stuff - btw) allows (recently - as of #69) for ditaa options. One of the options on DItaa sourcecode is "transparent" background (https://github.com/stathissideris/ditaa/blob/master/src/org/stathissideris/ascii2image/core/CommandLineConverter.java#L71). However - this is not a feature available in the downloadable version of DItaa.
When I build Ditaa from source I can easily run it with
Then for a following snippet
I got result as expected (with transparent background!)![ditaa_3](https://cloud.githubusercontent.com/assets/637628/9049205/cecc0770-3a3f-11e5-95de-f2fc690f8a51.png)
However that doesn't get supported by the diagram extension. The
ditaamini0_9.jar
doesn't look to me as a standard ditaa distribution and simple replacement of an old jar with a new build triggers a following errorNow, when I browse further - I see some more changes are required in here https://github.com/pepijnve/asciidoctor-diagram-java/blob/master/src/main/java/org/asciidoctor/diagram/Ditaa.java#L33
Before I start drilling there and fiddling with the code further, I just want to confirm that my thoughts are right. The steps should be
Additional question, if the freshly built ditta.jar is not a drop-in replacement how can I reproduce the built of
ditaamini0_9.jar
--Kuba
PS. My usecase. I started to use diagram for my training presentations. I have the diagrams together with slides and when it gets rendered into any html deck - the transparent background would make a bit more sense in some cases.