View Single Post
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#375
Originally Posted by Win7Mac View Post
Besides python, they utilize dbus which comes preinstalled, but without python-dbus, which is essential.
Is it really asked too much to note it? - I don't understand why such basic requirements are nowhere mentioned.
Again, thedead was kind enough to give me that enlightenment, but I really think that is not the way things should be.
So for everybody not getting the scripts to work:
run "apt-get install python-dbus".
Billboard doesn't require Python to function - that's why it doesn't depend on Python or python-dbus (if it were, people would complain about the "additional packages that need to be downloaded"). Scripts are an advanced feature, and scripts provided here just depend on Python or python-dbus because the script authors decided to use Python and its D-Bus bindings for the task. If someone were to use perl, ruby or any other language, they would similarly have to install the dependencies themselves. It's still also perfectly possible to implement shell scripts without the need for Python or python-dbus.

I agree that it would make sense to list the dependencies alongside the script code, but that's something that the script authors have to do. If you point me to any of my posts where I didn't do that, I'll gladly edit the posts and add that information.

Originally Posted by Win7Mac View Post
Fourth, in order to use more fancy characters (like for bluetooth, for network or for alarm) I like to see all UTF-8 characters displayable. Actually, Billboard itself can display some, python seems more limited, but also stock browser and firefox can not display all.
Unicode support depends on a few things:
  • Billboard's support for Unicode characters (there since the beginning)
  • A font that supports the desired character (the Nokia fonts don't have the Berkanan (ᛒ, a.k.a u'\u16d2' in Python) AFAIK)
  • Billboard's support for reading UTF-8 from a script (there since 1.0.7)

For a Python script, you have to make sure that:
  • You declare the encoding of the script ("# -*- coding: utf-8 -*-")
  • You save the script in the right encoding (in the one you declared it)
  • You output the text as UTF-8 (e.g. u'my string'.encode('utf-8'))

With Billboard 1.0.7, script output is interpreted as UTF-8, so if you make sure that your script outputs UTF-8, it will work. Everything that does not work is either an encoding issue (make sure your script really outputs UTF-8) or a font issue (make sure to use a font that supports the character, or it won't work).

But hey, who needs runic characters when you can have the real thing?

Code:
print '<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-bluetooth.png>>'
And yes, right now you can't mix-and-match images and text on the same line (see the Billboard website, "Known limiations" for 1.0.7). Might come in a future version, no promises.
 

The Following 2 Users Say Thank You to thp For This Useful Post: