devyn / wegasoo

the automation central

This URL has Read+Write access

README.textile

Wegasoo (pronounced: weh gah seu) is a task executor.

Think of actions being made up of tasks. That’s how this works. If you think about Wegasoo in blocks, it is the best choice.

It competes with others such as Sake, by being more verbose and transparent with a nice, colorful CLI.

For example, here is a simple action:


---
example:
  time:
    utc: |
      self << WGS_Message['the current time in UTC is:',z{Time.now.utc.strftime('%b %d, %Y %H:%M.%S')}]

And the output of wegasoo example:time:utc:

>> (1/1) the current time in UTC is:
>>       Jan 1, 2009 0:00.00

I know what you’re thinking. “I can just check the time!” But where Wegasoo comes in really useful is the replacement for a typical Makefile. This is an example Makefile.


# this Makefile is for the project "simpc"

simpc.c:
    gcc -o simpc simpc.c

all: simpc.c

clean:
    rm -f simpc

The output of make all clean:

gcc -o simpc simpc.c
rm -f simpc

Not very verbose or attractive, is it. Now, translated into Wegasoo:


---
simpc:
  make:
    simpc.c: |
      self << WGS_Compile['simpc.c']
    all: |
      dependency 'simpc:make:simpc.c'
    clean: |
      self << WGS_Clean['simpc']

The output of wegasoo simpc:make:all; wegasoo simpc:make:clean:

>> (1/1) simpc:make:simpc.c
>>       (1/1) compiling C object: simpc.c
>>             gcc -o simpc simpc.c
>> (1/2) cleaning up
>>       (2/2) deleting simpc

That’s much better. And not much more complicated to write. This way, if you have to compile a very large program, you are kept up to date.

Writing plugins is easy too. Take a look at the ones in the plugins/ dir for an example.

To see everything you can do, run wegasoo wgs:list.