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)

qwerty12 2010-05-19 22:05

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

Originally Posted by No!No!No!Yes! (Post 657980)
I encourage you to suggest possible enhancements or wishlists in this area.

These aren't suggestions as I realise implementing them would take a while (GObject; **** yeah! [Though, props to Vala - implementing properties and D-Bus methods and signals is so simple in Vala that it's almost orgasmic...), but ideas of what can be done with D-Bus if you ever feel like extending your brilliant efforts.

* If your object uses GObject properties for settings etc., you can manipulate them with the standard org.freedesktop.properties (something like that interface) as DBus-GLib will export them. You've already provided get/set_param methods :)
* You can also allow signals to emitted - create them in the GObject Way and define them in your interface XML. You could have one emitted for when a widget is updated.

No!No!No!Yes! 2010-05-20 06:38

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

Originally Posted by qwerty12 (Post 666732)
These aren't suggestions as I realise implementing them would take a while (GObject; **** yeah! [Though, props to Vala - implementing properties and D-Bus methods and signals is so simple in Vala that it's almost orgasmic...), but ideas of what can be done with D-Bus if you ever feel like extending your brilliant efforts.

* If your object uses GObject properties for settings etc., you can manipulate them with the standard org.freedesktop.properties (something like that interface) as DBus-GLib will export them. You've already provided get/set_param methods :)
* You can also allow signals to emitted - create them in the GObject Way and define them in your interface XML. You could have one emitted for when a widget is updated.

Appreciate your tips, thanks Faheem.
As I'm pretty very old school as a coder - my last C/C++ lines happened almost 20 years ago :D - it'll take some time to digest you precious contribution :o

However I also have one more issue which is bothering me since QBW was born. I already opened a thread in Development forum but no brave member came up with suggestions.

I hope I have a better chance now that community has gone much more cerebral about Maemo, N900 and Hildon-Desktop.
I repost here my original request as it could move QBW a step further with still one new possibility.

Thanks to new extended IPC mechanism it could be now possible to treat many QBW instances as one intercommunicating entity thus allowing stacked instances (and hot spots over beecons) like in this example:

Quote:

Originally Posted by No!No!No!Yes! (Post 582390)
I believe the cheapest solution could be this one:

http://i41.tinypic.com/nei7hy.png http://i39.tinypic.com/2zf7j8y.png http://i44.tinypic.com/eugi69.png

With "A" being the "status" beecon (with status querying script updating manually, every startup, on desktop change, every 30 or so seconds updated via new QBW IPC features by "B") and "B" being the "toggle" beecon/button (with status toggling script just for manual interaction)

http://i42.tinypic.com/wu4bxi.png http://i44.tinypic.com/11m8ahz.png http://i43.tinypic.com/2u4lw5g.png

ISSUE: Still unable to programmatically control the stacking of different widgets on desktop.

This was the original enigma:
Quote:

Originally Posted by No!No!No!Yes! (Post 538205)
Hi, as per subject I need to programmatically control the overlaying positions of 3 instances of the same multi-instance hildon desktop (hildon-home) widget.
Programming Language is C.

I basically need to send the top most yellow box behind the red and green boxes (the very-very back) while I'm in the top most widget's settings dialog box.

http://i46.tinypic.com/2vcgjye.png

http://i48.tinypic.com/2qukdqh.png

I've already tried:
  1. gtk_window_set_keep_below gtk_window_set_keep_below
  2. HildonWindowStack family functions

No success so far... anyone can help?

Bye!


qwerty12 2010-05-20 08:16

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

Originally Posted by No!No!No!Yes! (Post 667111)
Appreciate your tips, thanks Faheem.
As I'm pretty very old school as a coder - my last C/C++ lines happened almost 20 years ago :D - it'll take some time to digest you precious contribution :o

Oh, believe me, I'm not a good coder at all. Far from it...

Anyway, for the signals thing (if you think it's a good idea):
http://slexy.org/view/s2JQ0NMQ5R

(Very rushed, sorry)

Results in this when monitoring d-bus:
Quote:

signal sender=:1.32 -> dest=(null destination) serial=1085 path=/com/nokia/qbw; interface=com.nokia.qbw; member=Updated
int32 0
Quote:

Originally Posted by No!No!No!Yes! (Post 667111)
This was the original enigma:

I - as expected - do not know, sorry. The best I could point you to is hd_home_view_add_applet in hildon-desktop's source but it's a private function and works on ClutterApplets...

No!No!No!Yes! 2010-05-20 10:47

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

Originally Posted by qwerty12 (Post 667216)
Oh, believe me, I'm not a good coder at all. Far from it...

Anyway, for the signals thing (if you think it's a good idea):
http://slexy.org/view/s2JQ0NMQ5R

Idea absolutely integrated ... got one more issue, though;

xml changed as I need QBW Instance ID which issued signal:
Code:

        <signal name="sig_content_updated">
          <arg type="s"/>
          <arg type="i"/>
        </signal>

now:
Code:

g_cclosure_marshal_VOID__INT
doesn't seem to be adequate any more but dunno how to create new marshaller in queen-beecon-service.h:
Code:

g_cclosure_marshal_VOID__STRING__INT
I tried
Code:

        queen_beecon_signals[SIG_CONTENT_UPDATED] = g_signal_new("sig_content_updated",
                                                                        QUEEN_BEECON_TYPE,
                                                                        G_SIGNAL_RUN_LAST,
                                                                        G_STRUCT_OFFSET (QueenBeeconClass, queen_beecon_dbus_sig_content_updated),
                                                                        NULL, NULL,
                                                                        dbus_glib_marshal_queen_beecon_BOOLEAN__STRING_INT_POINTER, //g_cclosure_marshal_VOID__INT,
                                                                        G_TYPE_NONE, 2,
                                                                        G_TYPE_STRING,
                                                                        G_TYPE_INT);

but I still keep not receiving any signal on the bus.

qwerty12 2010-05-20 12:38

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

Originally Posted by No!No!No!Yes! (Post 667393)
Idea absolutely integrated ... got one more issue, though;

xml changed as I need QBW Instance ID which issued signal:
Code:

        <signal name="sig_content_updated">
          <arg type="s"/>
          <arg type="i"/>
        </signal>

now:
Code:

g_cclosure_marshal_VOID__INT
doesn't seem to be adequate any more but dunno how to create new marshaller in queen-beecon-service.h:
Code:

g_cclosure_marshal_VOID__STRING__INT
I tried
Code:

        queen_beecon_signals[SIG_CONTENT_UPDATED] = g_signal_new("sig_content_updated",
                                                                        QUEEN_BEECON_TYPE,
                                                                        G_SIGNAL_RUN_LAST,
                                                                        G_STRUCT_OFFSET (QueenBeeconClass, queen_beecon_dbus_sig_content_updated),
                                                                        NULL, NULL,
                                                                        dbus_glib_marshal_queen_beecon_BOOLEAN__STRING_INT_POINTER, //g_cclosure_marshal_VOID__INT,
                                                                        G_TYPE_NONE, 2,
                                                                        G_TYPE_STRING,
                                                                        G_TYPE_INT);

but I still keep not receiving any signal on the bus.

I believe you need to generate the marshaller yourself. This is how I do it in headset-control:

Quote:

Originally Posted by configure.ac
AC_PATH_PROG([GLIBGENMARSHAL], [`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`])
AC_SUBST([GLIBGENMARSHAL])

Quote:

Originally Posted by src/Makefile.am
INCLUDES = -DG_LOG_DOMAIN=\"@PACKAGE@\"

BUILT_SOURCES = hal-marshal.h hal-marshal.c headset-control-service.h
noinst_HEADERS = $(BUILT_SOURCES)

EXTRA_DIST = hal-marshal.list headset-control-service.xml
CLEANFILES = $(BUILT_SOURCES)

hal-marshal.h: hal-marshal.list
$(GLIBGENMARSHAL) --prefix=hal_marshal $< --header > $@


hal-marshal.c: hal-marshal.list hal-marshal.h
echo '#include "hal-marshal.h"' > $@
$(GLIBGENMARSHAL) --prefix=hal_marshal $< --body >> $@


headset-control-service.h: headset-control-service.xml
$(DBUSBINDINGTOOL) --mode=glib-server --prefix=headset_control $< --output=$@

bin_PROGRAMS = headset-control

headset_control_CFLAGS = $(HEADSET_CONTROL_CFLAGS)
headset_control_LDADD = $(HEADSET_CONTROL_LIBS)

headset_control_SOURCES = hal-marshal.h hal-marshal.c headset-control-obj.h headset-control-obj.c headset-controld.c

Quote:

Originally Posted by hal-marshal.list
VOID:STRING,STRING


No!No!No!Yes! 2010-05-20 20:30

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

DBUS Methods & Parameters
QBW implements the following list of methods to trigger specific actions:
Implemented (Internal Testing in Scratchbox) dbus_method_monitor Toggle on-screen yellow notification message of incoming DBUS method requests for destination Instance (for debug purposes)
Implemented (Internal Testing in Scratchbox) show Give show impulse to a QBW
Implemented (Internal Testing in Scratchbox) hide Give hide impulse to a QBW
Implemented (Internal Testing in Scratchbox) wakeup Give wake up impulse to a QBW and update content and layout
Implemented (Internal Testing in Scratchbox) sleep Give sleep/disable/minimize impulse to a QBW
Implemented (Internal Testing in Scratchbox) update_content Give impulse to a QBW for content update
Implemented (Internal Testing in Scratchbox) update_layout Give impulse to a QBW QBW for layout update
Implemented (Internal Testing in Scratchbox) exec Give other QBWs one-shot alternative scripts/commands to execute and update content accordingly
Implemented (Internal Testing in Scratchbox) set_param_string Change and store QBW settings parameter of type string
Implemented (Internal Testing in Scratchbox) set_param_int32 Change and store QBW settings parameter of type int
Implemented (Internal Testing in Scratchbox) set_param_uint32 Change and store QBW settings parameter of type uint
Implemented (Internal Testing in Scratchbox) set_param_double Change and store QBW settings parameter of type double
Implemented (Internal Testing in Scratchbox) set_param_boolean Change and store QBW settings parameter of type boolean
Implemented (Internal Testing in Scratchbox) get_param Get QBW settings parameter
Implemented (Internal Testing in Scratchbox) set_position Set QBW position on desktop
Implemented (Internal Testing in Scratchbox) get_position Get QBW position on desktop
Implemented (Internal Testing in Scratchbox) get_exit_status Retrieve other beecon's last executed commands exit status

DBUS Signals & Parameters
QBW issues the following list of signals to notify the "world" about predefined conditions and events.
Implemented (Internal Testing in Scratchbox) signal_content_update Issued when QBW Instance executes and return and exit status

@qwerty12 ... weeeeewwww!!! fortunately no need for extra marshalling as it turned out Instance ID reaches the DBUS PATH...
Code:

[sbox-FREMANTLE_X86: ~] > run-standalone.sh dbus-monitor "interface='oh.no.more.qbw'"
signal sender=org.freedesktop.DBus -> dest=:1.29 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
  string ":1.29"
signal sender=:1.13 -> dest=(null destination) serial=44 path=/oh/no/more/qbwid2; interface=oh.no.more.qbw; member=sig_content_updated
  string ""
  int32 0


No!No!No!Yes! 2010-05-20 21:52

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Here's a Demo Video of DBUS interaction for QBW
http://i50.tinypic.com/10xy06q.jpg

mrl0n3ly714 2010-05-21 03:20

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
is there a way we can save the icons, command and size font all together...?

mrl0n3ly714 2010-05-21 04:42

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
it would be kkool if you can add one more feature in it, the preview showing a size ,colors,....base on the config so you dont have to save and back out and save and back out to edit the config, would save time and would be nice see the design.

No!No!No!Yes! 2010-05-21 05:48

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

Originally Posted by mrl0n3ly714 (Post 668701)
is there a way we can save the icons, command and size font all together...?

All supported Backup/Restore/Save/Load features are in the WIKI HOW TO
I'm mainly focusing in developing Core functionalities right now.
Service functionalities will maybe come once release is stable and tested.

No!No!No!Yes! 2010-05-21 06:08

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

Originally Posted by mrl0n3ly714 (Post 668728)
it would be kkool if you can add one more feature in it, the preview showing a size ,colors,....base on the config so you dont have to save and back out and save and back out to edit the config, would save time and would be nice see the design.

Hildon Widgets do have several graphical/functional constraints ... it would be very effort consuming (and code-fattener) to develop an internal preview/miniature of the final widget look & feel.
I personally spend far much more time in developing the scripts/command driving the Beecons than customizing its graphical aspect.
It always turns out that you just need to change 3/4 parameters and ignore the other ones.
5mins average once you get acquainted to it.
Let me say that effort/benefit ratio makes it not worthy to spend time in this direction as, almost always and on the average, made 100 the time spent on the whole Beecon process creation, 70 goes to scripting, 25 to photoshopping backgrounds, icons & images, 5 to assemble final QBW settings.
Bye.

No!No!No!Yes! 2010-05-21 22:15

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Only for the Braves...
Here's a PR1.1.1 compatible version of the 0.1.7 package
Install it at your own risk ... it is not even in extras-devel; so please just take your time to report BUGS or misbehaviours.
[MAXIMUM WARNING APPLIES]

Have a look also at the specific DBUS section of the WIKI for info on this new major update.

queen-beecon_0.1.7-PR1.1.1_armel.deb
queen-beecon_0.1.7-PR1.1.1.tar.gz

tissot 2010-05-21 22:28

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

Originally Posted by No!No!No!Yes! (Post 669925)
Only for the Braves...
Here's a PR1.1.1 compatible version of the 0.1.7 package
Install it at your own risk ... it is not even in extras-devel; so please just take your time to report BUGS or misbehaviours.
[MAXIMUM WARNING APPLIES]

queen-beecon_0.1.7-PR1.1.1_armel.deb
queen-beecon_0.1.7-PR1.1.1.tar.gz

Nice. Will be trying it out today.

No!No!No!Yes! 2010-05-21 23:00

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

Originally Posted by tissot (Post 669938)
Nice. Will be trying it out today.

Have a look also at the specific DBUS section of the WIKI for info on this new major update. Full changelog is in the WIKI

qwerty12 2010-05-21 23:03

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

Originally Posted by No!No!No!Yes! (Post 669925)
Only for the Braves...
Here's a PR1.1.1 compatible version of the 0.1.7 package
Install it at your own risk ... it is not even in extras-devel; so please just take your time to report BUGS or misbehaviours.
[MAXIMUM WARNING APPLIES]

Have a look also at the specific DBUS section of the WIKI for info on this new major update.

queen-beecon_0.1.7-PR1.1.1_armel.deb
queen-beecon_0.1.7-PR1.1.1.tar.gz

Feature request (no, not a D-Bus-related one this time :p): http://wiki.maemo.org/Documentation/...k-up_locations

Lake 2010-05-21 23:16

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
I suppose this is a feature request -

If possible, please could someone create a 'BeeCon' to display random images from Flickr's 'Most Interesting' pages? That would be great!

Best wishes

Tom

No!No!No!Yes! 2010-05-21 23:30

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

Originally Posted by Lake (Post 669985)
I suppose this is a feature request -

If possible, please could someone create a 'BeeCon' to display random images from Flickr's 'Most Interesting' pages? That would be great!

Best wishes

Tom

From here http://www.flickr.com/explore/interesting/7days/ or any other link?

Lake 2010-05-21 23:39

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

Originally Posted by No!No!No!Yes! (Post 669996)

Hi,

Yes I think so - I wanted it to work like the 'Yahoo' desktop widget which I think must draw from the same pool (not sure). Not sure how you would get it to change images though, time delays between changes etc etc.

I wish I could try, but I have absolutely no knowledge of commands or Linux and this widget, although having great potential, it a bit too complex for me to configure without support!

Best wishes

Tom

qwerty12 2010-05-21 23:59

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Actually, I do have a bug, too: The choice of Nokia Sans fonts are invalid as it's "Nokia Sans" and not "Nokia, Sans"; and, indeed, when selecting Nokia Sans, it looks like plain Sans.

I'd like to place in a request for replacing that font dialog with http://wiki.maemo.org/Hildon-Extras#HeFontDialog because I also like the Droid Fonts but I'm biased...

No!No!No!Yes! 2010-05-22 07:25

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

Originally Posted by Lake (Post 670000)
Hi,

Yes I think so - I wanted it to work like the 'Yahoo' desktop widget which I think must draw from the same pool (not sure). Not sure how you would get it to change images though, time delays between changes etc etc.

I wish I could try, but I have absolutely no knowledge of commands or Linux and this widget, although having great potential, it a bit too complex for me to configure without support!

Best wishes

Tom

Ok, request is on stack ...

No!No!No!Yes! 2010-05-22 07:27

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

Originally Posted by qwerty12 (Post 670012)
Actually, I do have a bug, too: The choice of Nokia Sans fonts are invalid as it's "Nokia Sans" and not "Nokia, Sans" and, indeed, when selecting Nokia Sans, it looks like plain Sans.

I'd like to place in a request for replacing that font dialog with http://wiki.maemo.org/Hildon-Extras#HeFontDialog because I also like the Droid Fonts but I'm biased...

ACK....... Ok, request is on stack ...

No!No!No!Yes! 2010-05-22 07:30

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

Originally Posted by qwerty12 (Post 669974)
Feature request (no, not a D-Bus-related one this time :p): http://wiki.maemo.org/Documentation/...k-up_locations

Ok, request is on stack ...

No!No!No!Yes! 2010-05-22 10:05

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

Originally Posted by Lake (Post 669985)
I suppose this is a feature request -

If possible, please could someone create a 'BeeCon' to display random images from Flickr's 'Most Interesting' pages? That would be great!

Best wishes

Tom

Quote:

Originally Posted by No!No!No!Yes! (Post 669996)

Quote:

Originally Posted by Lake (Post 670000)
Hi,

Yes I think so - I wanted it to work like the 'Yahoo' desktop widget which I think must draw from the same pool (not sure). Not sure how you would get it to change images though, time delays between changes etc etc.

I wish I could try, but I have absolutely no knowledge of commands or Linux and this widget, although having great potential, it a bit too complex for me to configure without support!

Best wishes

Tom

Customize Queen BeeCon Widget (>=v0.1.4) to display:
Random images from Flickr's 'Most Interesting' pages

The Beecon will display random photos/images from http://m.flickr.com. Change update policies as per your taste.

http://i48.tinypic.com/20fwyea.png
http://i47.tinypic.com/ncxbit.png
http://i48.tinypic.com/mcri2x.png

WARNING!!! wget package must be installed!

Updates on click or every 30mins. See if you like it!!!

Import this as per HERE
Code:

[queen-beecon-header]
version=1,000000
checksum=1478530
[queen-beecon-exported-instance]
widgetType=1
widgetVisible=1
operationalStatus=0
hideCanvas=true
snippetBgRGB=0
beecon_lt0_ImgZoom=0
beecon_lt0_BgRGB=2
beecon_lt0_ImgFilename=queen-beecon-syserr.png
beecon_eq0_ImgZoom=12
beecon_eq0_BgRGB=3
beecon_eq0_ImgFilename=queen-beecon-appok.png
beecon_eq1_ImgZoom=0
beecon_eq1_BgRGB=4
beecon_eq1_ImgFilename=queen-beecon-appwrn.png
beecon_ge2_ImgZoom=0
beecon_ge2_BgRGB=5
beecon_ge2_ImgFilename=queen-beecon-apperr.png
beecon_idxge2_ImgZoom=0
beecon_idxge2_BgRGB=11
beecon_idxge2_ImgFilename=queen-beecon-index.png
widWidth=302
widHeight=205
instanceTitle=flickr
instanceCmd=wget -t 1 -T 5 -q -U "Mozilla/5.0 (X11; U; Linux armv7l; en-US; rv:1.9.2a1pre) Gecko/20091127 Firefox/3.5 Maemo Browser 1.5.6 RX-51 N900" -O - "http://m.flickr.com"|awk 'BEGIN{FS="[\\"]+"}/<img src=.+alt="">/{r=system("wget -t 1 -T 5 -q -O /tmp/qbwflickr0.jpg \\""$2"\\"");}END{exit r}'
cmdImgFilename=queen-beecon.png
cmdImgZoom=0
cmdFgRGB=1
cmdVisibilityPosition=0
cmdImgVisibilityPosition=0
cmdJustify=0
cmdFontName=3
cmdFontSize=12
resImgFilename=/tmp/qbwflickr0.jpg
resImgZoom=13
resFgRGB=1
resVisibilityPosition=0
resImgVisibilityPosition=5
resJustify=0
resFontName=2
resFontSize=12
updOnStartup=false
updOnClick=true
updOnDesktop=false
delayIndex=4
updNeworkPolicy=0

P.S. for those of you wondering about QBW Naive Dice Poker ... it's working like charm with new 0.1.7 DBUS features
http://i48.tinypic.com/23kuhi9.gif

No!No!No!Yes! 2010-05-22 12:29

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

Originally Posted by qwerty12 (Post 670012)
Actually, I do have a bug, too: The choice of Nokia Sans fonts are invalid as it's "Nokia Sans" and not "Nokia, Sans" and, indeed, when selecting Nokia Sans, it looks like plain Sans.

I'd like to place in a request for replacing that font dialog with http://wiki.maemo.org/Hildon-Extras#HeFontDialog because I also like the Droid Fonts but I'm biased...

Have you tried Pango Markup Language as quickfix???

rolan900d 2010-05-22 12:48

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
How to save predefined queen widgets in case of format?

No!No!No!Yes! 2010-05-22 16:53

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

Originally Posted by rolan900d (Post 670414)
How to save predefined queen widgets in case of format?

While proper backup/restore developments are in the brewery you can have a look HERE

Lake 2010-05-22 17:29

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

I seem to be having a bit of a problem getting the Ebay Snippet to work correctly. I followed your instructions (very clear - many thanks) but I cannot seem to get a correct output, i.e. I edit the ebay item number and click "Save and Run" and I get the item title and picture, but no timer.

Having read your recent message about the Flickr snippet I installed "Wget" application but this doesn;t appear to have done the trick.

What might be useful is a suggested 'default' for layout, font etc to optimise the appearance of the widget maybe?

Many thanks

Tom

Lake 2010-05-22 17:45

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

Originally Posted by No!No!No!Yes! (Post 670290)
Customize Queen BeeCon Widget (>=v0.1.4) to display:
Random images from Flickr's 'Most Interesting' pages

The Beecon will display random photos/images from http://m.flickr.com. Change update policies as per your taste.

http://i48.tinypic.com/20fwyea.png
http://i47.tinypic.com/ncxbit.png
http://i48.tinypic.com/mcri2x.png

WARNING!!! wget package must be installed!

Updates on click or every 30mins. See if you like it!!!

Import this as per HERE
Code:

[queen-beecon-header]
version=1,000000
checksum=1478530
[queen-beecon-exported-instance]
widgetType=1
widgetVisible=1
operationalStatus=0
hideCanvas=true
snippetBgRGB=0
beecon_lt0_ImgZoom=0
beecon_lt0_BgRGB=2
beecon_lt0_ImgFilename=queen-beecon-syserr.png
beecon_eq0_ImgZoom=12
beecon_eq0_BgRGB=3
beecon_eq0_ImgFilename=queen-beecon-appok.png
beecon_eq1_ImgZoom=0
beecon_eq1_BgRGB=4
beecon_eq1_ImgFilename=queen-beecon-appwrn.png
beecon_ge2_ImgZoom=0
beecon_ge2_BgRGB=5
beecon_ge2_ImgFilename=queen-beecon-apperr.png
beecon_idxge2_ImgZoom=0
beecon_idxge2_BgRGB=11
beecon_idxge2_ImgFilename=queen-beecon-index.png
widWidth=302
widHeight=205
instanceTitle=flickr
instanceCmd=wget -t 1 -T 5 -q -U "Mozilla/5.0 (X11; U; Linux armv7l; en-US; rv:1.9.2a1pre) Gecko/20091127 Firefox/3.5 Maemo Browser 1.5.6 RX-51 N900" -O - "http://m.flickr.com"|awk 'BEGIN{FS="[\\"]+"}/<img src=.+alt="">/{r=system("wget -t 1 -T 5 -q -O /tmp/qbwflickr0.jpg \\""$2"\\"");}END{exit r}'
cmdImgFilename=queen-beecon.png
cmdImgZoom=0
cmdFgRGB=1
cmdVisibilityPosition=0
cmdImgVisibilityPosition=0
cmdJustify=0
cmdFontName=3
cmdFontSize=12
resImgFilename=/tmp/qbwflickr0.jpg
resImgZoom=13
resFgRGB=1
resVisibilityPosition=0
resImgVisibilityPosition=5
resJustify=0
resFontName=2
resFontSize=12
updOnStartup=false
updOnClick=true
updOnDesktop=false
delayIndex=4
updNeworkPolicy=0

P.S. for those of you wondering about QBW Naive Dice Poker ... it's working like charm with new 0.1.7 DBUS features
http://i48.tinypic.com/23kuhi9.gif

Hi - please is it possible to alter the script to point the snippet to here:

http://m.flickr.com/#/explore/interesting/

Think the other page is static - my fault, sorry!

No!No!No!Yes! 2010-05-22 18:44

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

Originally Posted by Lake (Post 670665)
Hi - please is it possible to alter the script to point the snippet to here:

http://m.flickr.com/#/explore/interesting/

Think the other page is static - my fault, sorry!

Uhm ... other page ain't static ... however fetching images from http://m.flickr.com/explore/interesting/ is no big deal ... just need some time to script't

gkuenning 2010-05-22 19:12

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
My widgets aren't auto-updating. I removed .queen_beecon, restarted the desktop, and recreated the MLB example (see following post for some improvements). It works fine when I click it, but doesn't update every 5 minutes. I did double-check the settings, and it's set correctly. Grepping .queen_beecon shows delayIndex=3.

Any thoughts as to why the timers aren't firing? If it's relevant, it was working earlier and then stopped; the clean restart was an attempt to get it to work properly.

gkuenning 2010-05-22 19:21

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
So MLBeeCon is truly wonderful; thanks, No!No!No!Yes!

But I follow more than one team. And of course some people care about seeing certain teams lose, e.g. during a pennant race. So here's a somewhat fancier script. Drop it someplace convenient (I put it in /home/user/bin) and make it executable (chmod +x script-name). Then invoke it as:

/home/user/bin/mlbeecon CWS CWC -STL

which says you want to cheer for the White Sox, the Cubs, and whoever is playing Saint Louis.

The icon smiles if more of your teams win than lose, frowns if losers outnumber winners, and is smug if everything is balanced.

Code:

#!/bin/bash
#
# Fetch MLB scores and colorize them for use with Queen BeeCon.
#
USAGE='Usage: mlbeecon [team] [team] [-team] ...'
#
# Each team is an abbreviation used on the m.mlb.com site.  A team preceded
# by a minus sign is a "team you love to hate;" the icon becomes happy if
# that team loses.  The icon is happy if more teams win than lose, angry
# if losing dominates, and smug if the losers equal the winners.  (Ties
# aren't considered in this calculation.)

# Since ESPN thinks the world runs on Eastern time, use that for the
# date/time display at the top.  That makes it easier to read the
# schedule.  Change this field to $TZ if you prefer using your own
# timezone.
DISPLAYZONE=US/Eastern
#DISPLAYZONE=$TZ

# When we fetch the scores, we use a time zone a few hours to the
# west; this ensures that games that are in progress after midnight
# EST will still be shown; the next day's schedule won't come up until
# about 6 AM EST.
GRABZONE=US/Hawaii

echo "<span foreground=\"green\"><big><i>[`TZ=$DISPLAYZONE date '+%m/%d/%Y %H:%M'`]</i></big></span>"
wget -t 1 -T 10 -q -O - http://m.mlb.com/scores/`TZ=$GRABZONE date +%Y%m%d`/ \
  | awk 'BEGIN \
        {
        ntm = split("'"$*"'", tm)
        w = 0
        l = 0
        t = 0
        inScoreboard = 0
        inGame = 0
        }
    /<div.*id="scoreboard_module".*>/ \
        {
        inScoreboard = 1
        next
        }
    /<a href/  &&  inScoreboard \
        {
        split($0, linkLine, ">")
        inGame = 1
        next
        }
    /<\/div/  &&  inScoreboard \
        {
        inScoreboard = 0
        inGame = 0
        next
        }
    inGame \
        {
        if ($1 == "-"  ||  $1 == "vs.")
            {
            vsLine = $1
            next
            }
        inGame = 0
        split(linkLine[2], visitor)
        home = $1
        ist = 0
        for (i = 1;  i <= ntm;  i++)
            {
            ct = tm[i]
            bad = 0
            if (ct ~ /^-/)
                {
                bad = 1
                ct = substr(ct, 2)
                }
            if (visitor[1] == ct  ||  home == ct)
                {
                ist = 1
                break
                }
            }
        if (!ist)
            {
            print linkLine[2], vsLine, $0
            next
            }
        print "<span foreground=\"cyan\"><b><big>" linkLine[2], \
          vsLine, $0 "</big></b></span>"
        if (vsLine == "vs."  ||  visitor[2] == $2)
            t++
        else if ((visitor[1] == ct  &&  visitor[2] > $2) \
          ||  ($1 == ct  &&  $2 > visitor[2]))
            {
            w += !bad
            l += bad
            }
        else
            {
            w += bad
            l += !bad
            }
        }
    END \
        {
        if (w + l + t == 0)
            {
            print "No\nMatch!\n"
            exit 1
            }
        else if (w > l)
            exit 0
        else if (w < l)
            exit 2
        else
            exit 1
        }'
exit

# Old code
wget -t 1 -T 10 -q -O - http://m.mlb.com/scores/`TZ=$GRABZONE date +%Y%m%d`/ \
  | awk 'BEGIN \
        {
        ntm = split("'"$*"'", tm)
        w = 0
        l = 0
        t = 0
        }
    /<td>.+<\/td>/ \
        {
        s = gensub(/<[^>]*>/, "", "g")
        s = gensub(/[\t ]+/, " ", "g", s)
        split(s, a)
        ist = 0
        for (i = 1;  i <= ntm;  i++)
            {
            ct = tm[i]
            bad = 0
            if (ct ~ /^-/)
                {
                bad = 1
                ct = substr(ct, 2)
                }
            if (a[1] == ct  ||  a[3] == ct  ||  a[4] == ct)
                {
                ist = 1
                break
                }
            }
        if (!ist)
            {
            print s
            next
            }
        print "<span foreground=\"cyan\"><b><big>" s "</big></b></span>"
        if (a[2] == "vs."  ||  a[5] == a[2])
            t++
        else if ((a[4] == ct  &&  a[5] > a[2]) \
          ||  (a[1] == ct  &&  a[2] > a[5]))
            {
            w += !bad
            l += bad
            }
        else
            {
            w += bad
            l += !bad
            }
        }
    END \
        {
        if (w + l + t == 0)
            {
            print "No\nMatch!\n"
            exit 1
            }
        else if (w > l)
            exit 0
        else if (w < l)
            exit 2
        else
            exit 1
        }'

EDIT 19-Aug-2010: one of the problems with screen scraping is that it breaks when the Web site changes its layout. ESPN just did that; this edit contains a rewritten version that works with the new ESPN site design.

rolan900d 2010-05-22 19:39

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

Originally Posted by No!No!No!Yes! (Post 670598)
While proper backup/restore developments are in the brewery you can have a look HERE

That made sense!

Cheers

No!No!No!Yes! 2010-05-22 19:51

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

Originally Posted by gkuenning (Post 670734)
So MLBeeCon is truly wonderful; thanks, No!No!No!Yes!

But I follow more than one team. And of course some people care about seeing certain teams lose, e.g. during a pennant race. So here's a somewhat fancier script. Drop it someplace convenient (I put it in /home/user/bin) and make it executable (chmod +x script-name). Then invoke it as:

/home/user/bin/mlbeecon CWS CWC -STL

which says you want to cheer for the White Sox, the Cubs, and whoever is playing Saint Louis.

The icon smiles if more of your teams win than lose, frowns if losers outnumber winners, and is smug if everything is balanced.

Code:

#!/bin/bash
#
# Fetch MLB scores and colorize them for use with Queen BeeCon.
#
USAGE='Usage: mlbeecon [team] [team] [-team] ...'
#
# Each team is an abbreviation used on the m.mlb.com site.  A team preceded
# by a minus sign is a "team you love to hate;" the icon becomes happy if
# that team loses.  The icon is happy if more teams win than lose, angry
# if losing dominates, and smug if the losers equal the winners.  (Ties
# aren't considered in thois calculation.)

echo "<span foreground=\"green\"><big><i>[`date '+%m/%d/%Y %H:%M'`]</i></big></span>"
wget -t 1 -T 10 -q -O - http://m.mlb.com/scores/`date +%Y%m%d`/ \
  | awk 'BEGIN \
        {
        ntm = split("'"$*"'", tm)
        w = 0
        l = 0
        t = 0
        }
    /<td>.+<\/td>/ \
        {
        s = gensub(/<[^>]*>/, "", "g")
        s = gensub(/[\t ]+/, " ", "g", s)
        split(s, a)
        ist = 0
        for (i = 1;  i <= ntm;  i++)
            {
            ct = tm[i]
            bad = 0
            if (ct ~ /^-/)
                {
                bad = 1
                ct = substr(ct, 2)
                }
            if (a[1] == ct  ||  a[3] == ct  ||  a[4] == ct)
                {
                ist = 1
                break
                }
            }
        if (!ist)
            {
            print s
            next
            }
        print "<span foreground=\"cyan\"><b><big>" s "</big></b></span>"
        if (a[2] == "vs."  ||  a[5] == a[2])
            t++
        else if ((a[4] == tm[i]  &&  a[5] > a[2]) \
          ||  (a[1] == tm[i]  &&  a[2] > a[5]))
            {
            w += !bad
            l += bad
            }
        else
            {
            w += bad
            l += !bad
            }
        }
    END \
        {
        if (w + l + t == 0)
            {
            print "No\nMatch!\n"
            exit 1
            }
        else if (w > l)
            exit 0
        else if (w < l)
            exit 2
        else
            exit 1
        }'


YOU ARE COMMUNITY!!! MAN! :D:D

I've stuck your contribution to relevant section of the WIKI ... feel free to amend it at your convenience!!!

No!No!No!Yes! 2010-05-22 19:54

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

Originally Posted by gkuenning (Post 670727)
My widgets aren't auto-updating. I removed .queen_beecon, restarted the desktop, and recreated the MLB example (see following post for some improvements). It works fine when I click it, but doesn't update every 5 minutes. I did double-check the settings, and it's set correctly. Grepping .queen_beecon shows delayIndex=3.

Any thoughts as to why the timers aren't firing? If it's relevant, it was working earlier and then stopped; the clean restart was an attempt to get it to work properly.

Uhm... have you upgraded any QBW release lately?

gkuenning 2010-05-22 20:12

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

Originally Posted by No!No!No!Yes! (Post 670777)
Uhm... have you upgraded any QBW release lately?

First, thanks for posting my script. I forgot to mention that I'd appreciate you doing that.

Based on timestamps in /var/lib/dpkg/info, it looks like I did an update about two days ago, at 08:55 Zulu on 2010-May-20. But the md5sums are from Mar 16, which I find odd. Surely you've done a release since then? How do I find out the version I'm running?

No!No!No!Yes! 2010-05-22 21:13

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

Originally Posted by Lake (Post 670665)
Hi - please is it possible to alter the script to point the snippet to here:

http://m.flickr.com/#/explore/interesting/

Think the other page is static - my fault, sorry!

There you go ... :D:cool:

No!No!No!Yes! 2010-05-22 21:15

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

Originally Posted by gkuenning (Post 670797)
First, thanks for posting my script. I forgot to mention that I'd appreciate you doing that.

Based on timestamps in /var/lib/dpkg/info, it looks like I did an update about two days ago, at 08:55 Zulu on 2010-May-20. But the md5sums are from Mar 16, which I find odd. Surely you've done a release since then? How do I find out the version I'm running?

Application Manager -> Uninstall ... Look in that list.

Lake 2010-05-22 21:45

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

Originally Posted by No!No!No!Yes! (Post 670860)

FABULOUS!!!! Just so much better than the Ovi Store offering!

Now I just need to get the Ebay one working ok - any ideas? ;-)

Ps do you have a donate button or something?

No!No!No!Yes! 2010-05-22 21:50

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
For people with TIMER issues ... could you please provide QBW Release you are using and any other info you believe pertinent like for example:
  • It was working and now it doesn't
  • I did this and that and now is not working
  • I installed <xxx>, <yyy>, ... and now ...
  • ...

No!No!No!Yes! 2010-05-22 22:16

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

Originally Posted by Lake (Post 670896)
Now I just need to get the Ebay one working ok - any ideas? ;-)

Please elaborate further...

Quote:

Originally Posted by Lake
I seem to be having a bit of a problem getting the Ebay Snippet to work correctly. I followed your instructions (very clear - many thanks) but I cannot seem to get a correct output, i.e. I edit the ebay item number and click "Save and Run" and I get the item title and picture, but no timer.

Is it just a timer issue you have here? What kind of output do you get?

Quote:

Originally Posted by Lake
Having read your recent message about the Flickr snippet I installed "Wget" application but this doesn;t appear to have done the trick.

wget is not supposed to cause timer issues...anything else to report here?

Quote:

Originally Posted by Lake
What might be useful is a suggested 'default' for layout, font etc to optimise the appearance of the widget maybe?

Please elaborate further...

Quote:

Originally Posted by Lake (Post 670896)
Ps do you have a donate button or something?

Uhm ... well ... don't ask twice!!!! :D:o:cool:


All times are GMT. The time now is 23:20.

vBulletin® Version 3.8.8