NanoNote: selecting of PDF file for viewing

There is one problem with the NanoNote: the PDF viewer (nupdf), the video player (mplayer) and several other programs have no easy tool for browsing and opening of files.

It is not a problem for most current user because the file to be opened can always be specified from the command line. But non-geek usually want to have something more “user friendly”.

So I have started to search a simple file browser (yes, there is at leat the Midnight Commander but it is too powerfull for such task). T Jlime has a very nice file picker ( a SDL-based fileselector). I have spent some time when attempting to make it work under the OpenWRT but without success, yet (it might be my fault).

The I have started to make a simple script which utilises the dialog program for actual file picking. It’s not that cool, it’s even somewhat ugly but it works (well, at least it works for me).

Simple list of files for NanoNote

I have had to make two files. The first one is the actual script (/usr/bin/pick-pdf):


#! /bin/bash

export CMD=nupdf
export EXT=pdf

export i=0

echo " "
echo "Searching for *.$EXT files. It may take a while..."
echo " "

rm -f /tmp/fsel.tmp 2>/dev/null
touch /tmp/fsel.tmp
for aa in `find . -name "*.$EXT" -print` ;do i=`expr $i + 1` ; echo $i $aa >>/tmp/fsel.tmp ;done
export B=`cat /tmp/fsel.tmp`
export A=`dialog --menu "Select a File" 0 50 20 $B --stdout`

if test $A > 0
then
export C=`grep "^$A" /tmp/fsel.tmp`
export D=`echo $C | cut -d' ' -f2 -`
$CMD $D
else
echo "No file selected!"
fi

And the second one is a starter for the Gmenu2x (/usr/share/gmenu2x/sections/applications/pickpdf):


title=PDF
icon=skin:icons/generic.png
exec=/usr/bin/pick-pdf
params=/root/

And that is all. There are many things to improve, of course. But it is also possible to modify the script for other programs and file types.

NanoNote: selecting of PDF file for viewing

Bard Storyteller text reader

There is another new and nice piece of software for our Ben NanoNotes – the Bard Storyteller e-book reader.

Bard Storyteller text reader on NanoNote

At the moment it can only read plain text files but a support for XHTML and ePub is planned. And it supports the voice synthesis CMU Flite software so it can also read the texts for you. I have been using the Bard with the default Flite wersion which is shipped with the OpenWRT. It is not recommended (a more recent Flite should be used instead) but it works very well for me.

The version 0.6 of the Bard allows to configure text and background colors for all windows. It has to be done inside the ~/.bard_config file but it is easy to do. For example, I have changed background color from white to light gray which is better for my eyes. As you can judge from the screenshot, font sizes can be easily changed at run-time.

Bard Storyteller text reader