* textviewer.sh

 This script is a text viewer designed to be used with Claws Mail actions
 Set up an action with the command line:  textviewer.sh %p |

 The script will try to detect file type automatically, and then
 invokes a relevant program to print the file in plain text to
 the standard output.

 From v 0.9.7claws7, Claws Mail sets the temporary file
 of a part to XXXXXX.mimetmp.[filename of attachment]
 This means we can use the extension of the filename for checking.
 Also use the program 'file' if that fails.

 To extend the script just follow the patterns that already exist, or
 contact the author if you have problems, Luke Plant <L.Plant.98@cantab.net>
