Qball's Weblog
If Then Else
I wrote a small tool. in the past day. called IfThenElse (Yes needs a better name).
The idea is simple:
You have a trigger, for example a timeout.
So for example every 10 minutes check the network state.
When the network state is connected, Check every 2.5 minutes google reader for unread messages.
When there are unread messages show a status icon…
Or in image form (this is generated from a working example):
The whole thing is based on a one ‘main’ program that calls external scripts to function. The program itself is written in Vala, uses GtkBuilder to dynamically load ‘flows’ like the above one.
The main goal in the future is that I can do things like, pause the music when skype calls come in. Notify me every 10 minutes when there are items on my todo list. etc.
The program is not ready for use, but I am looking for some input/help.
In a list:
- Current input format is a GtkBuilder file. This nicely ‘matches’ the structure of the above flow (it is just an xml file). But is not very user friendly to write.
- So we either generate a gui to generate the chains? (should be easy, just allow user to draw a flowchart) or come up with a better file format.
- Use Cases. This would help me decide what needs to be added. At the moment I have a timer trigger working, I can execute external programs for the check. Execute external programs as action or show an status icon..
- Write examples helper scripts? (allow directly calling of python scripts? javascript? using libpeas?)
Please mail me (qball@gmpclient.org) or contact me on irc #gmpc @ irc.freenode.net.
Q
Code can be found here: https://github.com/DaveDavenport/IfThenElse