Better use of RSS reader on NanoNote

As you probably know you can download and read RSS feeds on your Ben NanoNote. The SnowNews reader is great for this (the NanoNote package is here).

But you probably will prefer to read thhe news when off-line (lets say in bus or in train). How to save a link an interesting article that you want to read later?

Snownews on Ben Nanonote - specific feed

The solution is simple: the “SnowNews” can start a web browser (it´s the “o” keyboard shortcut) and you can replace the browser command with a custom shell script which will save the link for you.
It would be ideal if after the “o” key you will get a dialog with options to save the link, open it in the browser or download it to the disk.

It may look as a complicated task but you may use the program shown below.

Dialog software on Ben NanoNote

To to thinks work you have to do this:

  • Save the code below as a file /usr/bin/br-wrapper
  • make it executable:
    chmod +x /usr/bin/br-wrapper
  • edit the file .snownews/browser in your home directory (most probably it is a /root/.snownews/browser file) so it will include this:
    br-wrapper %s
  • try it

The br-wrapper file can look like this:

#! /bin/ash

export DOWNDIR=/tmp
export LINKFILE="/root/links.html"
export TERM=vt100

export A=`dialog --backtitle "RSS feed options" --menu "Select action"  10 30 8 1 "Download" 2 "Open in Browser" 3 "Save Link" --stdout`

if test $A = 1
		mkdir $DOWNDIR
		cd $DOWNDIR && wget $1
		exit 0
	elif test $A = 2
			links $1
			exit 0
		echo ''$1'
' >>$LINKFILE exit 0 fi

Some notes: downloaded files will be saved in the /tmp directory which is erased on every shutdown or restart. So you probably will want to use differen directory (say /root/downloads). So create the directory and change its name in the script.

Also please note that only the Save link option work when you are off-line.

If you have found the line export TERM=vt100 to be unnecessary you are right. I only put it here to get more consistent look: the “SnowNews” is mostly black and white so the dialog should be in those colors, too. And setting the terminal type to an old good black and white VT100 is the easiest way how to do it.

Better use of RSS reader on NanoNote

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s