With version 0.7, newsbeuter will contain a plugin-based bookmarking system. In the latest SVN revision, this is implemented as follows:
When a user bookmarks a link (possible in the article list, in the article view, and in the URL view), he is asked for the URL to bookmark (already preset with the URL of the current selection), the bookmark title (in most cases preset with the title of the current selection) and the bookmark description. After the question for the description, an external program, configured via the configuration command “bookmark-cmd”, is executed with 3 commandline parameters. The plugin itself implements the actual bookmark saving (e.g. writing the bookmark to an external file, or storing it to a del.icio.us account). When everything went OK, the plugin simply exits. In case something goes wrong while saving the bookmark (e.g. disk is full, or del.icio.us is currently unreachable due to a network error), the plugin writes out an error message as a single line. This error message is then presented to the user from within newsbeuter.
A simple example that demonstrates how a plugin can be implemented is shown in this shell script:
#!/bin/sh
url="$1"
title="$2"
description="$3"
echo -e "${url}\t${title}\t${description}" >> ~/bookmarks.txt
Update: newsbeuter 0.7 will even ship with a bookmarking plugin for del.icio.us. Joy!
Posted by Andreas Krennmair 