cmdline workflows should translate into real workflows
Reported by bahuvrihi | August 26th, 2008 @ 07:49 AM | in Tap-0.11.0
Maybe with a tap generator... like:
% tap generate workflow name a -- b -- c....
Comments and changes to this ticket
-
bahuvrihi August 31st, 2008 @ 03:36 PM
A potential syntax...
require 'yaml' workflow = [ ['a', 'a1', 'a2', {'key' => 'value', 'another' => 'value', 'name' => 'blah'}], ['b', 'b1'], ['c'], "+2[1,2,3]", "1:2:3", "3[4,5,6]" ] command = workflow.collect do |argv| case argv when Array argv.collect do |arg| case arg when Hash then arg.to_a.collect {|k,v| "--#{k} #{v}" } else arg.to_s end end.flatten.join(' ') else argv.to_s end end puts command.join(" -- ") # a a1 a2 --name blah --another value --key value -- b b1 -- c -- +2[1,2,3] -- 1:2:3 -- 3[4,5,6] puts workflow.to_yaml # --- # - - a # - a1 # - a2 # - name: blah # another: value # key: value # - - b # - b1 # - - c # - +2[1,2,3] # - "1:2:3" # - 3[4,5,6]
-
bahuvrihi October 11th, 2008 @ 09:10 AM
- Assigned user set to bahuvrihi
- State changed from new to resolved
- Milestone set to Tap-0.11.0
- Tag changed from feature, tap to feature, tap
I'm calling this resolved. Schema and Parser implement workflows from the command line input.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A framework for making configurable, file-based tasks and workflows.