The Following User Says Thank You to fpp For This Useful Post: | ||
|
2010-02-24
, 16:41
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#12
|
Before using this Beecon make sure you have "wget" package installed:
Start X-Terminal and type:
If you don't the above output you need to install the package: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#
Code:apt-get install wget
user_pref("network.proxy.http", "my.proxy.pri"); user_pref("network.proxy.http_port", 3128); user_pref("network.proxy.no_proxies_on", ""); user_pref("network.proxy.ssl", "my.proxy.pri"); user_pref("network.proxy.ssl_port", 3128); user_pref("network.proxy.type", 1);
export http_proxy=http://my.proxy.pri:3128/ export https_proxy=http://my.proxy.pri:3128/
`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`
`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}}'
# cat /usr/sbin/pxy.sh 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 #
chmod 755 /usr/sbin/pxy.sh
`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}}'
|
2010-02-25
, 21:48
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#13
|
|
2010-02-26
, 15:42
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#14
|
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}'
|
2010-03-01
, 22:43
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#15
|
|
2010-03-02
, 07:05
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#16
|
|
2010-03-02
, 20:39
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#17
|
|
2010-03-02
, 20:41
|
Posts: 2,014 |
Thanked: 1,581 times |
Joined on Sep 2009
|
#18
|
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...
attached to the post for use as status icon with Beecons.
|
2010-03-02
, 20:59
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#19
|
|
2010-03-02
, 21:50
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#20
|
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 !
maemo blog
Last edited by fpp; 2010-02-24 at 17:01.