I have Dashing working and now want to add a few 'combined' widgets.
So a widget that adds up numbers from (for example) Facebook and Twitter. I also have two separate widgets, one for Facebook and one for Twitter.
I can just make one job named twitter+facebook.rb
and that would solve the problem, but I now want to add a third and a fourth source. I don't want to end up with one big jobs file, but a twitter.rb
and google-analytics.rb
and facebook.rb
and mailcimp.rb
etc. combined with a (for example) calaculation.rb
.
Is it possible to pass values between jobs?
I do not see a method within Dashing for derived values at the moment.
One way to achieve this right now would be monkey-patching
send_event
to compute a derived value. Having defined your source-specific jobs, add a job for computing the combined data with something like this:If there's enough interest, it would be useful to add a more general solution to Dashing itself.