maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Support thread] Billboard Standby Screen (https://talk.maemo.org/showthread.php?t=84507)

thp 2013-01-05 11:57

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by slarti (Post 1310872)
Thanks, that works. I guess something changed in the way this works with 1.7?

It's always been that way ;)

{propertyname?abc} is "output abc if propertyname is not empty"
{propertyname!abc} is "output abc if propertyname is empty"

The "not empty" part is also why {wazapp-status?abc} doesn't do what you expect - it won't be empty when you are offline (it will evaluate to "offline" instead).

The reason why the "?" doesn't output the property name is that you can do something like this:

Code:

{song?Now playing: }{song}{song?
}


thp 2013-01-05 11:57

Re: [Support thread] Billboard Standby Screen
 
Thanks, the Bluetooth status icon scripts have been merged. I wonder if we should also (in a subdirectory) include scripts such as resetting the data counters, forcing the update by re-setting the text, etc.. in the "billboard-scripts" repository, even if some of them don't really depend on Billboard - what do you think?

slarti 2013-01-05 16:24

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by coderus (Post 1311078)
can be done by Timed script

[offtopic]

Coderus, do you know how to set an event to the timed daemon using a shell or python script? I know that on the system bus there is:

Code:

com.nokia.time /com/nokia/time com.nokia.time.add_event(QDBus
RawType::(iuuuuus(a{ss} x)

but I have no idea how to use this. Do you?

[/offtopic]

slarti 2013-01-05 16:25

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by thp (Post 1311120)
Thanks, the Bluetooth status icon scripts have been merged. I wonder if we should also (in a subdirectory) include scripts such as resetting the data counters, forcing the update by re-setting the text, etc.. in the "billboard-scripts" repository, even if some of them don't really depend on Billboard - what do you think?

Probably a good idea. There is some demand for these and some sort of a repo for them can't hurt.

Edit: I just remembered there is one more script that has to do with Billboard in the ProfileMatic thread.

Sir_Krokofant 2013-01-07 11:49

Re: [Support thread] Billboard Standby Screen
 
Hi !
I would like a 'nameday' (swedish) script, it would be nice to show it on the Billboard screen.
Has anyone the knowledge to do that ? ( I can't).

thp 2013-01-08 13:15

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by Sir_Krokofant (Post 1311852)
I would like a 'nameday' (swedish) script, it would be nice to show it on the Billboard screen.

If by "nameday" you mean something like this:

http://stjarnhimlen.se/ndag/ndag2001.html

Then you could start by transforming that page into a text file (one day per line) in a way that you can parse by a script and then write a small shell script that greps the right day out of it, e.g.:

Code:

~ $ cat nameday.txt
01.01. Nyårsdagen
02.01. Svea
...
08.01. Erland
...
~ $ awk "/^$(date +%d.%m.)/ { print "'$2'" }" nameday.txt
Erland

So the "nameday.txt" contains the names on each line (DD.MM. NAME), and the awk command gets today's name based on that. I've added a script to billboard-scripts, but you will have to write (copy'n'paste or process) your nameday.txt yourself :)

coderus 2013-01-08 13:35

Re: [Support thread] Billboard Standby Screen
 
@slarti i only used Timed in C++. not sure about python module for timed.

slarti 2013-01-08 16:04

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by coderus (Post 1312305)
@slarti i only used Timed in C++. not sure about python module for timed.

Well, I haven't found one... I'm guessing it's a struct of some kind you have to feed it but I'm completely clueless as to what the syntax is. Oh well, I guess I'll manage with ProfileMatic and it's timing rules.

Boxeri 2013-01-08 18:38

Re: [Support thread] Billboard Standby Screen
 
Hi

I would like to use the "color-battery-bar" property in such a way, that it would change color when battery level goes below 30%. I have tried to find it out myself, but as I know absolutely nothing about coding this is not easy.

I tried with http://docs.python.org/2/tutorial/ and came up with idea of using an IF-statement. But I can't make it to work, maybe somebody could help me? I am way too lost here...

if [ {color-battery-bar} {battery} >30 ]
then
echo {{green}}"%"
else
echo {{red}}"%"

Sir_Krokofant 2013-01-08 18:47

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by thp (Post 1312300)
If by "nameday" you mean something like this:

http://stjarnhimlen.se/ndag/ndag2001.html

Then you could start by transforming that page into a text file (one day per line) in a way that you can parse by a script and then write a small shell script that greps the right day out of it, e.g.:

Code:

~ $ cat nameday.txt
01.01. Nyårsdagen
02.01. Svea
...
08.01. Erland
...
~ $ awk "/^$(date +%d.%m.)/ { print "'$2'" }" nameday.txt
Erland

So the "nameday.txt" contains the names on each line (DD.MM. NAME), and the awk command gets today's name based on that. I've added a script to billboard-scripts, but you will have to write (copy'n'paste or process) your nameday.txt yourself :)

Looks nice and simple, will try it, thanks !


All times are GMT. The time now is 21:31.

vBulletin® Version 3.8.8