Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

cmdline workflows should translate into real workflows

#91

Maybe with a tap generator... like:


  % tap generate workflow name a -- b -- c....

Reported by bahuvrihi · August 26th, 2008 @ 07:49 AM

State: resolved
Milestone: Tap-0.11.0
Assigned to: bahuvrihi bahuvrihi

Activity

  1. bahuvrihi
    bahuvrihi

    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]
    

    August 31st, 2008 @ 03:36 PM

  2. bahuvrihi
    bahuvrihi
    • 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.

    October 11th, 2008 @ 09:10 AM

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.