Usage of Clipboard as hidden I/O pipe instead input text file and output image file

0 votes
asked May 31 in Wanted features by nAlAz117 (270 points)

It would be nice to use plantuml.jar without external file based I/O. Let say before calling of "java -jar plantuml.jar …" wir will place in clipboard over CF_TEXT mode a text which usually need to be stored in a text file. Over special option plantuml.jar takes this text from clipboard and after rendering in an internal bitmap places this bitmap over CF_BITMAP into clipboard also instead to store this image as PNG file. So it will really accelerate generation of multiple expressions (100 and more) over calling "java -jar plantuml.jar …" from parent application.


2 Answers

+1 vote
answered May 31 by plantuml (177,280 points)

This is a strange idea, we like it :-)

So with last beta you can run PlantUML in some "clipboard loop" mode:

java -jar plantuml.jar -verbose -clipboardloop

In this mode, PlantUML looks every 10 s into the clipboard.If it gets some text starting with "@start", it generates an image and put it back in the clipboard. Is this the expected behaviour ?

BTW, there is also a FTP mode (see ) which also allows multiple generations without having to start PlantUML for each image.

+1 vote
answered Jun 1 by plantuml (177,280 points)

It is not exactly what we need. We will access plantuml.jar very randomly. It can be single expression or multiple formulas at once. But we need a single call of plantuml.jar per expression. The "-clipboard" option must indicate a start of special mode for plantuml.jar. It looks in clipboard for text and ALWAYS generates a bitmap. That means, if an erroneuos state (no text, bad syntax, etc) will be occur, then a bitmap "Bad Input data" or similar schould be placed in clipboard. In our software it will be immediately visualized. As example i provide a some fragment of our symbolic processor

The expressions will be first translated in AsciiMath text with colors and font states and then over call to plantuml.jar rendered in bitmaps. So we doing a loop over expresssions and will use in this loop plantuml.jar for current  expression on the fly :-)

PS. Usage of FTP is limited for our clients due to their offline state or many restrictions to access an online service.

commented Jun 1 by plantuml (177,280 points)
Ok, understand.
With last beta, you can now have:
java -jar plantuml.jar -clipboard

Tell us if it's what you are expecting!

PS: please do not create a new question and reuse this thread. Thanks!
commented Jun 1 by nAlAz117 (270 points)
YES! Perfect - exactly what we need! Thank you very much for extremly fast response :-)