Please allow to generate multiple images using a single PlantUML pipe execution

0 votes
asked Mar 19, 2017 in Closed feature request by anonymous
I'm trying to use PlantUML "-pipe" parameter to start PlantUML only once for generation of many images.

But it seems that the generation only takes place if stdin is getting closed. This means I have to start PlantUML again which costs time.

Please provide a way to run PlantUML once and to put one picture description via stdin after another and get one picture after another via stdout (with apropriate separator).

1 Answer

0 votes
answered Mar 19, 2017 by plantuml (295,000 points)
selected Mar 23, 2018 by Anthony-Gaudino
 
Best answer
We've just published a new beta https://www.dropbox.com/s/koo42q3d9gxw288/plantuml.jar?dl=0

This beta should better handle the -pipe option : you can now send several diagrams in stdin (please use appropriate @startXXX / @endXXX delimitor for those diagrams).

Right now, there are no delimitor between pictures in stdout : you have to detect PNG header start : is it possible for you ?

In the future, we may add some optional delimitor (using for example a -delimitor flag) in the command line.

This has not been widely tested, so please feedback if you find issues!

Thanks

PS: Note that you could also use the FTP option to generate several diagrams without having to restart java process. See http://plantuml.sourceforge.net/qa/?qa=5694/c%23-plantuml-jar-alternative
commented Apr 3, 2017 by anonymous
Hello, I tested a little bit. Works good. But in case of an error the given line number seems every time to have the doubled value.

With kind regards,
Stefan
commented Apr 3, 2017 by plantuml (295,000 points)
Could you give a simple example ? Not sure to understand the meaning of "doubled value". Thanks!!
commented Apr 3, 2017 by anonymous
Sorry for not being precise enough.

Each lineending in the examples is given as 0xah.

@startuml
@enduml

gives:
ERROR
1
Empty description

@startuml
a
@enduml

gives:
ERROR
2
Syntax error: a

@startuml
a -> b
c
@enduml

gives:
ERROR
4
Syntax error: c

@startuml
a -> b
c -> d
e
@enduml

gives:
ERROR
6
Syntax error: e

With kind regards,
Stefan
commented Apr 4, 2017 by plantuml (295,000 points)
Ok, thanks for the detail report.
This should be fixed in last beta (beta21)
https://www.dropbox.com/s/koo42q3d9gxw288/plantuml.jar?dl=0
commented Apr 4, 2017 by anonymous
Thank you, look good.
With kind regards,
Stefan
...