VladimirAlexiev / rdf2rml

RDF by Example: rdfpuml for True RDF Diagrams, rdf2rml for R2RML Generation
39 stars 5 forks source link

Input from stdin #13

Open johanwk opened 1 year ago

johanwk commented 1 year ago

It would be convenient to be able to pipe a file to rdfpuml instead of referring to a file.

(This occurred to me while setting up for using rdfpuml in Emacs with org-babel, as it would be easier to send a Turtle source block to rdfpuml with a :stdin header, avoiding the need to write a temporary file.)

VladimirAlexiev commented 5 months ago

@johanwk In your current setup, how important is this? It would also have to pipe the output to STDOUT: and then how would you capture this to pass to plantuml?

justin2004 commented 5 months ago

on linux how about

cat somefile | someapp /dev/stdin

johanwk commented 5 months ago

Actually, I think it's not very important (anymore)!

I somehow figured out how to make use of org-mode's standard way of using temporary directories, while working on how to call ROBOT. There's no feature in ROBOT for stdin/stdout. But when we use temporary directories, the input and output files can be kept out of they way. I want to improve the rdfpuml-blockbabel code to do the same as for ROBOT.

johanwk commented 5 months ago

@justin2004, thank you so much for joining our project!

johanwk commented 4 months ago

@johanwk In your current setup, how important is this? It would also have to pipe the output to STDOUT: and then how would you capture this to pass to plantuml?

PlantUML has a -pipe option, see PlantUML Command line

cat somefile.puml | java -jar plantuml.jar -pipe > somefile.png