11 April 2007

Liferea & AWN

Do you use AWN (Avant Window Navigator)? Want to display the number of unread or new items in Liferea with AWN instead of using the system tray? Liferea user tsukasa has created an AWN plugin using the LUA scripting support to do exactly this!


JonathanC said...

I have downloaded the python code that sends the DBUS messages. It works fine from the command line.

However I can't get the LUA script working from Liferea. The os object, used in the os.execute is 'nil' within Liferea. In the LUA command line environment I can access the os object and I can call the python script correctly.

Am I missing something? I am using Liferea 1.2.10.

Lars said...

As far as I know the OS module is loaded per default and cannot be loaded explicitely. Therefore if it is not available in your environment could it be that there it could be disabled in your LUA installation for security reasons?

Which distro do you use? I tried Debian Sarge (LUA 5.0) and can use "os.execute".

Anonymous said...

Thanks for the quick reply! :)

I use Gentoo and LUA 5.1.2-r1.
I'll try downgrading to LUA-5.0.2 (there's no 5.0 in portage anymore).

The thing that bothers me is that if I go to the LUA command line shell it works fine:
> lua
Lua 5.1.2 Copyright (C) 1994-2007 Lua.org, PUC-Rio
> print(os)
table: 0x804f4b8
> res = os.execute("/[...]/liferea-awn-plugin.py 0")
> print(res)

JonathanC said...

Downgrading LUA and recompiling Liferea fixed it! Thanks! :)

Tsukasa said...

As a quick note: I haven't created the plugin but helped the author to make it work with Liferea and thought it would be worth describing the approach a little (as an example how to utilize Liferea's LUA capabilities).

The python script the LUA code calls was written by tristil and the whole package can be found on the AWN Wiki.

Mac said...

I have compiled Liferea 1.5.4 succesfully with lua support, but this is not working.

Anybody help me please.