This is the interface for the command line program rinobot.js
First, clone the repo via git:
git clone https://github.com/rinocloud/rinobot.gitAnd then install dependencies.
npm installRun these two commands simultaneously in different console tabs.
$ npm run dev # builds the html based UI and also the rinobot child process, hot reloads
$ npm run start-hot # starts the electron windowLet Eoin do the packaging for now
In the simplest case it only has a list of tasks inside a pipeline
v1:
tasks:
- command: 'rinobot-plugin-rebin'
match: '*.txt'
args: '--bin=4'
- command: 'rinobot-plugin-line-plot'
match: '*.txt'
args: '--xmax=4'v2:
pipelines:
# add a file and a list of tasks to run on it, and its children
- filename: '*.txt'
tasks:
- name: rinobot-plugin-normalize
args: '--xmin=3 --xmax={{key}}'
- name: rinobot-plugin-rebin
args: '--bin=3'
- name: rinobot-plugin-line-plot
metadata:
key: valuetasks = [{
"name": "rebin2",
"flow": "then"
},{
"name": "rebin4",
"flow": "and"
},{
"name": "plot",
"flow": "then",
},{
"name": "replot1",
"flow": "then",
},{
"name": "replot2",
"flow": "and",
},{
"name": "fin",
"flow": "then",
}]sortedTasks = []
currentRow = []
for index, t in enumerate(tasks):
nextTask = None
if index < len(tasks) - 1:
nextTask = tasks[index + 1]
currentRow.append(t)
if nextTask and nextTask["flow"] == "then":
sortedTasks.append(currentRow)
currentRow = []
elif not nextTask:
sortedTasks.append(currentRow)
inputFiles = ["data.txt"]
for tasks in sortedTasks:
outputFiles = []
for task in tasks:
for inputFile in inputFiles:
outputFile = runTask(inputFile, task)
outputFiles.append(outputFile)
inputFiles = outputFiles