There is another special field for entries (actually 2 special fields). These are the File field and the URL field. Using these two fields you can tell sixpack where copies of the article are stored. Once these fields are defined for an entry you can easily invoke an external viewer on the file (or URL) by pressing alt-v, or by clicking on the 'view' button, or by selecting 'Transfer->view file externally' from the menu.
If you invoke an external viewer, Sixpack will first try to launch a viewer for the 'File' field. If that field is empty, then Sixpack will launch a viewer for the URL field. (and if that field is empty, too, then nothing will be done.) To launch an external viewer for the URL field when the 'File' field isn;t empty, select 'Transfer->view URL externally' from the menu.
The file field has the following form:
1999/new_indiv.pdf |
it contains the name of the file (possibly in a subdirectory, which in this case is 1999) on which the external viewer should be launched. This file is assumed to be in the directory defined by the PAPERS variable in the configuration file. The default is the following:
PAPERS = ~/papers |
Which means that all papers are stored in the subdirectory papers in the home directory of the user. Then in the previous example, the external viewer would be launched on the file
~/papers/1999/new_indiv.pdf |
Which external view to launch is defined by the extension of the filename. In this case it is pdf, so an external viewer for viewing pdf files will be invoked. To define which viewer is launched for which extension, again use the configuration file: you add a variable of the form EXTHANDLE.ext to define the external viewer for the extension '.ext'. Here are some examples:
EXTHANDLE.pdf = acroread EXTHANDLE.ps = gv -antialias EXTHANDLE.ps.gz = zcat %s | gv - EXTHANDLE.tar.gz = view_article EXTHANDLE.dvi = xdvi EXTHANDLE.html = netscape-remote -remote "openFILE(%s)" |
The special code '%s' stands for the filename. (Entries can span lines using backslash.)
One last external viewer one needs to define is the viewer to handle the URL field. This is defined with the variable URLHANDLE, for example:
URLHANDLE = netscape-remote -remote "openURLNewWindow(%s)" |
Use this feature, use it often! This was my main reason for working on sixpack: I wanted to convert to storing articles electronically, and for that a database that contains where each file is stored was necessary.