How to use the son output of a command line tool.

25 views
Skip to first unread message

Adriaan Versteeg

unread,
Jan 12, 2016, 12:45:48 AM1/12/16
to fastr...@googlegroups.com
I have a command line tool that as a result outputs json to the stdout. How can I create a tool so that the output json can be used in a fastr network. I have two questions:

Do I have to create a wrapper to write it to a file or can the stdout be used immediately? 
Can I use existing data types? string or text_file or do I need to create a JSON datatype?

Hakim Achterberg

unread,
Jan 12, 2016, 2:36:01 AM1/12/16
to Fastr Users
There is a json collector plugin. It parses a json in a specific structure and the outputs can be String, Int etc. However, if the json is not following that structure, it might be possible to use the stdout collector which uses regexp to filter data from stdout, or we could add a collection plugin.

Did you create the command line tool yourself? That is probably the most important thing to decide which coarse of action to take.

The collector plugins are located in fastr/resources/collectorplugins. Sadly the documentation is currently lacking, but I will try to update it soon.

Cheers,
Hakim

Hakim Achterberg

unread,
Jan 12, 2016, 6:49:16 AM1/12/16
to Fastr Users
I updated the collector plugin document. It can be found at collectorplugin-reference
Reply all
Reply to author
Forward
0 new messages