Website Provider: Outflux.net
URL: http://jnocook.net/geek/oak.htm

Oak is Fancy Pine

[] (Last Modified 30 Nov 97, April 99) This FREEWARE utility rewrites the .signature file which you normally use to automatically add a signature to outgoing email with Pine, by substituting a definition from the on-line Jargon file instead, together with a header and footer file of your own making. Every piece of email goes out with a different definition. Download instructions far below. Description follows.

If you need to see the Jargon file first, go [see it] at this location: http://www.catb.org/~esr/jargon [8/03]

This utility is distributed under GNU General Public Licence (see below). Copyright notice below.


It is called "FancyPine" and is offered for free to anyone who will participate in the Gamma testing. For those of you who do not know what Gamma Testing is, please pay attention: Gamma Testing is the public distribution of Don't Bother Me Ware. It is, so to speak, well beyond the Beta version. It works, and if it doesn't work for you -- well, too bad. In particular, we do not want to hear about any bugs, mishaps, systems closing down, phone lines melting, etc. Just use Fancy Pine, and don't complain about the lack of elegance or dangerous sharp corners. We won't even tell you who wrote this. We are sure it is safe, and don't tell us if it ain't. You can rewrite the fifo file if you can handle Perl. Then send us a copy.

However, anyone interested in obtaining an absolutely elegant, foolproof, self installing version, may request the programming from us. Rates are $95 per hour (early '96), with a 16 hour minimum. Please include the $1520 retainer with your request, to: Fancy Pine Agent, Jno at Blight (dot) com.

FancyPine File List

The following files are bundled in the download as fancy.zip ...

Archive:  fancy.zip,  432,198 bytes (varies some)

 Length     Name       Description
 ------   -------     -----------------------------------------------
    221   .header     Header file identifying the Jargon file extract
    184   .footer     Footer file, may be edited
   7956   fancy.txt   This text file, mostly, or some version of it.
    182   oak         Script to run pine and shuffle
    113   fixoak      Script to fix a certain bug
   2991   shuffle     The signature substitution Perl script
 426851   jar.Z       Unix compressed one meg edited extract of the
                      on-line Jargon file, version 3.0.0 (1997)

Some notes . . .

Getting Started

You will start with un-zipping the file fancy.zip with ...
unzip fancy.zip

You now have the following seven files in your home directory ...
fancy.txt .footer .header oak fixoak shuffle jar.Z

Make sure you have a .signature file in your home directory. You can check to see if it exists, with ...
ls .signature

Otherwise make a .signature file.

Copy the .signature file to .cone with ...
cp .signature .cone

In your home directory, make oak executable, with ...
chmod u+x oak

You need to make a subdirectory called fifo, with ...
mkdir fifo

Move the file shuffle to fifo, with ...
mv shuffle ./fifo/

Copy the file jar.Z to fifo , with ...
cp jar.Z ./fifo/

Change to the fifo directory, with ...
cd fifo

Uncompress the jar.Z file, with ...
compress -d jar.Z

Make shuffle executable, with ...
chmod u+x shuffle

Find out where Perl is located. We assume /usr/bin, and this is written as the first line of the shuffle file. Do the command...
which perl

observe the result. If it is /bla/blabla then edit the first line of the shuffle file to list the correct directory. Note that the initial hatch mark and bang are required for Perl scripts.

Change back to your user directory with ...

You are done with the setup. When you want to use Pine, type oak instead (you may need to type ./oak if your home directory is not on the PATH). That's all there is to it. At any time you can decide to *not* use oak -- simply type pine.

On the other hand, you might also alias pine to oak in you .login file. Then to use pine type 'pine' instead.


What FancyPine does is to create a .signature file which is made up of
  • the .header file,
  • a quotation from the jar file, and
  • the .footer file.

All of this is accomplished with the executable file "oak" What "oak" does is the following ...
  • removes .signature
  • make a pipe named .signature
  • start shuffle up, looking for the files
    .header .footer fifo/jar .signature
  • start up pine
  • start another shuffle which stops the previous process
  • removes the pipe .signature
  • copies .cone to .signature

When you type oak from the prompt, the following will appear on the screen:
  • fifo/shuffle [13364]: reading .header...
  • fifo/shuffle [13364]: reading .footer...
  • fifo/shuffle [13364]: started 13365...

[the process numbers will vary] At this point the Pine menu appears, and you do whatever you do in Pine. When you quit out of Pine you will get ....
  • Pine finished
  • fifo/shuffle [13366]: id 13365 stopping...
  • fifo/shuffle [13365]: writing fifo/jar...
  • [prompt] %
  • fifo/shuffle [13365]: stopped

Automatic rescue
Even if there are errors, shuffle will rescue itself. Open processes will kill on exit from the machine you are on. If you get lost, and don't want to log off to rescue the situation, type ps from the command line to find what processes are active. Kill them with kill -9 PID where PID is the process number.

The Jar goes empty
The jar file in fifo will slowly diminish in size with every email you send. Don't worry, there is a meg's worth of definitions. You will notice the end is in sight when your definitions all start with Z's.

refilling the Jar
When the jar file in fifo goes empty, you can copy the original (full) jar.Z file from your home directory to the fifo directory, and decompress it. Simple?

known bugs

Oak fails to return the prompt when it finishes execution. You have to send a CR (an "enter") to get the prompt back (or don't bother).

Shuffle may fail to generate a .signature file (of any kind) on a "reply" to a received message selected from a "sent-mail" or "saved-mail" folder, and on lesser occasions to a reply generated from the "In-Box" of Pine. As a solution, have some file in your home directory which you can use as a signature, and add it to the end of email with "Cont-R; file_name; enter."

If you have to log out suddenly while in the middle of oak/pine (like by slamming down the phone), shuffle will leave .signature as a piped file in your home directory. This will make Pine lock up if you attempt to do anything which requires the .signature file - like Compose and Forward. Oak, when started up, however, will delete this file if it exist, and later copy .cone into .signature. To make doubly sure things will always work with a logon, add the following two statements to the .profile or the .login file in your directory at a location before the shell is started...

rm .signature
cp .cone .signature

Alternately, make sure that you have made fixoak executable (with chmod u+x fixoak), and just type ./fixoak to make the rescue.

Lastly, you may have problems with any of the script files on a Unix system because some of the files were originally generated on a DOS system. Thus they include the 013,010 carriage return and line feed characters. This might be corrected by simply opening each file with an editor, making one small change (like, add a blank line) and close it again. The rewrite by the editor should change the 013,010 codes to 010.

Credits and Contacts

Send money to: Jno at Blight (dot) com. Don't send Bug-Reports or Complaints. Please note that there is *NO* later version. And won't be.

The on-line Jargon file is credited to Eric Raymond, and many others. The material in the jar.Z file is an extract from the on-line Jargon File, version 3.0.0 (1997), deleting all of the introduction, the appendixes, a few complex C code notations, and all one line and two line definitions (most of which pointed elsewhere in the text). Additional input to the on-line Jargon File should be directed to jargon at thyrsus.com or to the maintainer, Eric S. Raymond at esr at snark.thyrsus.com

We at FancyPine Headquarters have nothing to do with the Jargon People.


Ok, you have to click on this [] .

Your browser will reply with "can't view; download?" And you indicate, "Yes." The file is named fancy.zip and is 432,198 bytes, so it might take a minute. Sorry, no public FTP at this site.

If you are connected from a Windows machine or a Mac box, or something similar, don't get the files: they are Unix Perl code, and Unix zipped and archived. You need an account at a Unix (or Linux) box somewhere.

After you get the zip file you need to execute unzip fancy.zip to get the files unbundled. If unzip is not available, try gunzip fancy.zip or try uncompress fancy.zip. The file jar.Z will remain compressed. Now go to the top of this document and follow directions.


Copyright (C) 1997 Kees Cook cook (at) outflux (dot) net,
design: Jno Cook, Aesthetic Investigation, Chicago
jno (at) blight (dot) com


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. http://www.gnu.org/copyleft/gpl.html