The current code allows to open the "Script Manager" window (screenshot) from the "Program" menu. When opening for the first time there should be no scripts registered. Everything should be empty.
The idea is that you select a scripting hook (the option menu at the top) and add one or more scripts that are to be called when the hook is triggered. Currently supported hooks are:
- Feed updated
- Feed selected
- Item selected
- Feed unselect
- Item unselect
A simple and useful example is shown in the screenshot. It addresses a feature I was asked for several times, but which was never implemented as an seperate preference. The feature is to mark all items of a feed as read once it is unselected.
To do this a script for the "feed unselect" hook is added. It uses the "liferea" LUA module which maps all functions from the includes mentioned above. So it simply calls feedlist_get_selected() to determine the node that is to be unselected and calls node_mark_all_read() for this node.
What do you think about scripting support? Would you use it? Ideas for other use cases?