Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

How to start generating picture with pipe mode

0 votes
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
asked Mar 19 by anonymous

1 Answer

0 votes
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
answered Mar 19 by plantuml (118,230 points)
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
Could you give a simple example ? Not sure to understand the meaning of "doubled value". Thanks!!
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
Ok, thanks for the detail report.
This should be fixed in last beta (beta21)
https://www.dropbox.com/s/koo42q3d9gxw288/plantuml.jar?dl=0
Thank you, look good.
With kind regards,
Stefan
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...