![]() |
Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
Hi,
I don't think my use cases will fit the "Queeen Beecon" approach, but I must thank you none the less for bringing its ancestor "Desktop Command Execution" to my attention. I don't know how I managed to miss it, but the idea behind both widgets is incredibly useful ! |
Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
Quote:
Proxy support in N900 Maemo (don't know for previous versions) is far from being perfect and comfortable to handle. While testing the previous Beecon behind our company's firewall, hildon-home/desktop got frozen because of the wget command trying to access internet resources while being blocked by our firewall. Only way to unfreeze it was to kill both the shell script spawned by Beecon, awk and wget hung processes. UPDATE 201002251730{Don't know why wget hung itself like this in endless timeout but} Setting -t 1 -T 3 options prevents wget from hanging and getting stuck for more then -T 3 seconds even if connection or proxy problems arise!!! However set -T <secs> according to the foreseen size of the web content to be fetched I figured out a way to programmatically retrieve the proxy settings both for HTTP and for HTTPS from the internal MicroB browser configuration file: /home/user/.mozilla/microb/prefs.js File holds several values related to proxy settings: Code:
user_pref("network.proxy.http", "my.proxy.pri"); http://i47.tinypic.com/3582csk.png In order for wget to properly work behind a proxy, two environment variables must be set in this way: Code:
export http_proxy=http://my.proxy.pri:3128/ Code:
`awk 'BEGIN {FS="[\(\", ;\)]+"}/proxy\.http"/{hx=$3}/proxy\.http_port"/{hp=$3}/proxy\.type"/{pt=$3}/proxy\.ssl"/{sx=$3}/proxy\.ssl_port"/{sp=$3}END{if(pt==0)exit;print "export http_proxy=http://" hx ":" hp "\/ export https_proxy=http://" sx ":" sp "\/"}' /home/user/.mozilla/microb/prefs.js` Code:
`awk 'BEGIN {FS="[\(\", ;\)]+"}/proxy\.http"/{hx=$3}/proxy\.http_port"/{hp=$3}/proxy\.type"/{pt=$3}/proxy\.ssl"/{sx=$3}/proxy\.ssl_port"/{sp=$3}END{if(pt==0)exit;print "export http_proxy=http://" hx ":" hp "\/ export https_proxy=http://" sx ":" sp "\/"}' /home/user/.mozilla/microb/prefs.js`;wget -t 1 -T 3 -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}}' Code:
# cat /usr/sbin/pxy.sh Code:
chmod 755 /usr/sbin/pxy.sh Code:
`pxy.sh` ; wget -t 1 -T 3 -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}}' |
Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
queen-beecon (0.0.3) uploaded to autobuilder a few minutes ago ... should be in devel for download shortly...
* Bugfixing for widget resize(dimensions) and positioning * Bugfixing for general network related behaviours and content update, even after settings change * Bugfixing for Command Edit and blank command selector after returning from command edit dialog * Changed Exit Code output for command from !?0000xxxx to !?xxxx * Changed Command Output is returned, if any, even if Exit Code less then 0 |
Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
http://i50.tinypic.com/8yb23a.png
GMail New Messages Notifier Beecon Following Beecon retrieves number of unread messages in specified Gmail Inbox. Substitute <username> and <password> with your personal account information. Code:
wget -t 1 -T 3 -q -O - https://<username>:<password>@mail.google.com/mail/feed/atom --no-check-certificate | awk 'BEGIN{m=2}/<fullcount>.+<\/fullcount>/{gsub(/<[^>]*>/,"",$0);print $1 " New";if($1>0)m=1;else m=0}END{exit m}' Exit Status 0 (Green Beecon) for 0 New Mails Exit Status 1 (Yellow Beecon) for >0 New Mails Exit Status 2 (Red Beecon) for problems fetching Mails Exit Status -1 (Grey Beecon) for System problems For PROXY/WGET related info have a look at THIS post Ciao, No!No!No!Yes! |
Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
|
Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
queen-beecon (0.1.0) now in extras-devel ... same usual relevant advices! :)
* WARNING! Architecture and readibility of code has been heavily revised for implementing the new functionalities... * WARNING! Please bear with possible regressions and report bugs to the Maintainer * New: Implemented the possibility to hide the background Canvas both for Beecons and Snippets * New: Implemented the possibility to use different icons/images for Beecon's status output instead of just specific background color (Ex. 0=green led, 1=yellow led, 2=red led) (with high positioning versatility) ;) * New: Implemented the possibility to use icons/images instead of text both for Beecons/Snippets command title and output (with high positioning versatility) ;) * New: Implemented creation and management of private general purpose directory "~/.queen_beecon_dir" for widget (images/icons/etc.) * New: Implemented "Update on widget Startup" option for every instance * New: Implemented basic management/deletion of dead/disposed instances configurations data from config file * New: Added button "Save & Run" settings dialog which saves settings and contextually triggers command execution * Changed: Widget Layout is now nicer with better gummy "button-press" like visual feedback using Gradient fill * Changed: Button Save in settings dialog does not trigger a command execution any more * Changed: Now command do not get updated after getting back from settings dialog (even after "save"); relevant event only drives updates (manual, timer, desktop, network) |
Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
1 Attachment(s)
queen-beecon (0.1.1) now in extras-devel ... same usual relevant advices! :)
* Changed: Visual feedback for widget pressure is now also provided for Canvas-less beecons and snippets (button down canvas is displayed when pressed) * Changed: Changed default size for newly created instances (50px=>100px) * Changed: Housekeeping for dead/disposed instances is now run on each instance initialization and on class termination (should be more accurate now) * Bugfixing: Writing/Reading configuration file inconsistencies fixed * Bugfixing: Correction in images (status/results/title) hide/show logic. If images displayed and then commented out, they kept showing! - FIXED And some goodies... http://i50.tinypic.com/15mcmsk.png attached to the post for use as status icon with Beecons. |
Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
Quote:
|
Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
Quote:
I'm sorry I still haven't studied how to package icons/images inside .deb and to extract them in relevant directory at .deb install time. If you can point me to some tutorial for doing this, please do... however this issue is in my TODO list but with low priority. To use this icons you have just to extract them in the ~/.queen_beecon_dir directory and directly refer to them in the settings (if no pathname is specified then QBW looks inside that) I'm mostly working on solving widget issues and testing core functionalities. I'd also like to come out with some ways to export/import whole Beecons (basic parameters and possibly icons/images)... to more easily share them once assembled and tested. (I'm also aware of potential security concerns with respect to this matter). Ciao, No!No!No!Yes! |
Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
Queen Beecon Widget 0.1.1 has now been promoted to extra testing.
|
All times are GMT. The time now is 16:32. |
vBulletin® Version 3.8.8