maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread (https://talk.maemo.org/showthread.php?t=45388)

No!No!No!Yes! 2010-02-22 00:47

[Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Hi, Folks.
Based on an idea and widget by cpscotti ("Desktop Command Execution Widget" R E S P E C T & Kudos, Dude!) and due to personal needs, I forked developments towards:

http://i.imgur.com/5YbFw.pngQueen BeeCon Widgethttp://i.imgur.com/5YbFw.png
AT FULL POWER!
http://i.imgur.com/Khwoi.png
http://i41.tinypic.com/12375g8.png
http://i49.tinypic.com/2e2qb9t.png

Queen BeeCon Widget is a highly customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for Maemo 5 Fremantle and the N900.

The Widget is based on the execution of external Shell/OS Commands which can be either as simple as one-liner statements or as complex as articulated shell scripts, which, for example, fetch, parse and aggregate contents retreived from the system, other applications or the Internet.

There are two basic Widget types, Beecons and Snippets:

Beecons are small hexagonal cells whose background color or associated image/icon changes according to the executed Command Exit Status.

Beecons can handle virtually unlimited Command Exit Status:
  • <0 Normally notifying system errors in esecuting the script/command
  • 0 Returned when script/command successfully completes
  • 1 Used to report a warning condition
  • 2 If script/command needs to notify some application error conditions
  • <=126 Other exit status which can be handled for displaying user defined icons/images

Snippets are normal text/graphic boxes with fixed background color and images which is not influenced by the executed Command Exit Status.

See WIKI

Enjoy, No!No!No!Yes!

No!No!No!Yes! 2010-02-22 00:48

Queen BeeCon Widget: Features List & Known Issues
 
Moved to WIKI

No!No!No!Yes! 2010-02-22 00:48

Queen BeeCon Widget: Now-Brewing, Change Log & TODO list
 
Moved to WIKI

Bratag 2010-02-22 14:47

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
I find this app to be both cool and a little confusing, but I suspect thats because Its so comprehensive. Purely as a way of monitoring items at a glance however its great, though perhaps a little space consuming on the desktop.

No!No!No!Yes! 2010-02-22 16:45

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Here is the Normal version of the "Rootfs(%):" command:
Code:

df | awk '$1 == "rootfs" {print $5}'
Here is the equivalent Beeconified version of the "Rootfs(%):" command which you can replace:
Code:

df | awk 'BEGIN { FS="[ %]+" } $1 == "rootfs" { print $5 "%"; if ($5 < 90) exit 0; else if ($5 < 95) exit 1; else exit 2 }'
With the beeconified version of the command, the awk statement will return:
Exit Status 0 (Green Beecon) for less the 90% rootfs file system full
Exit Status 1 (Yellow Beecon) for less the 95% rootfs file system full
Exit Status 2 (Red Beecon) for 95% or more rootfs file system full
http://i45.tinypic.com/1zjhvc.png http://i48.tinypic.com/2cyje5i.png http://i47.tinypic.com/1625lyd.png

Bratag 2010-02-22 16:48

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by No!No!No!Yes! (Post 541337)
Here is the Normal version of the "Rootfs(%):" command:
Code:

df | awk '$1 == "rootfs" {print $5}'
Here is the equivalent Beeconified version of the "Rootfs(%):" command which you can replace:
Code:

df | awk 'BEGIN { FS="[ %]+" } $1 == "rootfs" { print $5 "%"; if ($5 < 90) exit 0; else if ($5 < 95) exit 1; else exit 2 }'
With the beeconified version of the command, the awk statement will return:

Exit Status 0 (Green Beecon) for less the 90% rootfs file system full
Exit Status 1 (Yellow Beecon) for less the 95% rootfs file system full
Exit Status 2 (Red Beecon) for 95% or more rootfs file system full
http://i45.tinypic.com/1zjhvc.png http://i48.tinypic.com/2cyje5i.png http://i47.tinypic.com/1625lyd.png

Very cool - One imagines this can be applied to pretty much any % based command.

late666 2010-02-22 17:46

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
It's a cool idea, but I think a more elegant way to do this is to stick to the half transparent black rectangle like the one in the original desktop command execution widget..
It would also save up on space.

No!No!No!Yes! 2010-02-22 18:06

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by Bratag (Post 541340)
Very cool - One imagines this can be applied to pretty much any % based command.

Sure... see also following Beeconified version of a "ping -q -c 3 server1" command to test server1 responsiveness:
Code:

ping -q -c 3 server1 | awk 'BEGIN { FS="[ \/]+"; rt=0 } $1 == "round-trip" { rt=1; print $6 "\n" $7 "\n" $8 "\n(ms)"; if ($8 < 100) exit 0; else if ($8 < 200) exit 1; else exit 2 } END { if ( rt == 0 ) exit -1 }'
The awk statement will return:
Exit Status 0 (Green Beecon) for round-trip max below 100ms
Exit Status 1 (Yellow Beecon) for round-trip max between 100 and 200 ms
Exit Status 2 (Red Beecon) for round-trip max above 200ms
Exit Status -1 (Grey Beecon) for server1 unresponsiveness
http://i49.tinypic.com/23uc5s3.png http://i45.tinypic.com/2zeiauh.png http://i49.tinypic.com/30hpnr6.png http://i45.tinypic.com/2ev82l5.png

No!No!No!Yes! 2010-02-22 19:36

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by late666 (Post 541421)
It's a cool idea, but I think a more elegant way to do this is to stick to the half transparent black rectangle like the one in the original desktop command execution widget..
It would also save up on space.

Ciao,
I discussed about this matter with cpscotti, the current maintainer of DCEW, before I went public. We both agreed with the fact that both tools can have supporters and admirers especially if we move the topic into the "elegance" vs. "versatility" vs. "simplicity" vs. "practicality" vs. "completeness" vs. "complexity" vs. "beautifulness" vs. "coolness" vs. "hackishness" debate.
Due to my personal needs, for home and for work, I dedicated two, out of the four desktops, to monitoring widgets and I rely more on a visual/chromatic experience than on a plain textual feedback.
Furthermore, on the todo list there is also an open mind in developing a graphic architecture with far more freedom for the end-users to design and plug in their favourite visual "geometry", being that basic shapes or multi-area/clickable icons with alpha channel.
Thank you for your feedback. Bye.

No!No!No!Yes! 2010-02-24 01:14

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
http://i46.tinypic.com/ege1sh.jpg

And now... let's get ready for the 2010 MLB season...

Before using this Beecon make sure you have "wget" package installed:

Start X-Terminal and type:
Code:

Nokia-N900-51-1:/home/user/MyDocs# wget
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
Nokia-N900-51-1:/home/user/MyDocs#

If you don't receive the above output you need to install the package:
Code:

apt-get install wget
Beecon provides periodic updates for matches of your favourite MLB team:
Code:

wget -q -O - http://m.mlb.com/scores/`date +%Y%m%d`/ | awk 'BEGIN{t="NYY";m=0}/<td>.+<\/td>/{split(gensub(/<[^>]*>/,"","g"),a);if(a[1]!=t && a[3]!=t && a[4]!=t)next;m=1;if(a[2]=="vs."){print a[1] "\n" a[3] "\n" a[4],a[5];exit 1}print a[1],a[2] "\n" a[4],a[5] "\n" a[6];if((a[4]==t&&a[5]>a[2])||(a[1]==t&&a[2]>a[5]))exit 0;if(a[5]==a[2])exit 1;else exit 2}END{if(m==0){print "No\nMatch!\n";exit 1}}'
Just replace the:
Code:

t="NYY"
with one of the predefined abbreviations:
ATL, LAD, NYY, TOR, FLA, NYM, BOS, BAL, CIN, WSH, SD, PHI, SF, PIT, CHC, HOU, CLE, CWS, DET, KC, MIL, STL TB, TEX, MIN, OAK, LAA, SEA, COL, ARI.

Set update interval as you like and enjoy...

Beecon will return:
Exit Status 0 (Green Beecon) if team is winning
Exit Status 1 (Yellow Beecon) if match is tied up or no match for the day or match starting later on
Exit Status 2 (Red Beecon) if team is losing the match

http://i49.tinypic.com/wciudv.png http://i49.tinypic.com/nyg41w.png http://i45.tinypic.com/24b589i.png
http://i47.tinypic.com/j7ep2v.png http://i49.tinypic.com/wbywb7.png http://i47.tinypic.com/15ge1k.png


All times are GMT. The time now is 11:15.

vBulletin® Version 3.8.8