How to start generating picture with pipe mode

0 votes
asked Mar 19 by anonymous
Hello,

I'm trying to use plantuml "-pipe" parameter to start plantuml only once for generation of many pictures.

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. Is there a possibility to let plantuml run once and to put one picture description

via stdin after another with getting one picture after another via stdout (with apropriate separator)?

With kind regards,

Stefan

1 Answer

0 votes
answered Mar 19 by plantuml (132,110 points)
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 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 by plantuml (132,110 points)
Could you give a simple example ? Not sure to understand the meaning of "doubled value". Thanks!!
commented Apr 3 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 by plantuml (132,110 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 by anonymous
Thank you, look good.
With kind regards,
Stefan
...