is there a mail app that does this?
John Voigt
jvoigt
Mon Jan 3 11:23:41 PST 2005
On 01/03/2005 10:48 AM, dep eloquently noted:
> quoth Matthew Carpenter:
>
> | I'm not sure exactly what you are asking about the program versus
> | text editor? I believe fortune's database is not text-editable (I
> | could be wrong) but do you want to do something that "$ fortune >
> | temp.file" doesn't get you?
The file(s) that fortune actually uses to generate output is/are not directly
editable, however, they are created from text-editable files (see below).
Fortune can take any of these ".dat" files as input - it doesn't necessarily
need to be one that came with fortune.
<snip>
> the fortune program apparently allows the random selection, though i
> gather that it is a pretty long distance between two points to do
> something like add a new quote to the list
Nah, it's pretty straightforward.
> -- apparently a script needs
> to be then run to tell the fortune program to include the new quote in
> the mix.
Yup. That's what strfile does. I have two files:
/home/jvoigt/misc/fortunes (actual name doesn't matter)
which is the text-editable file containing the fortunes I want to use, and the
second:
/home/jvoigt/misc/fortunes.dat
which is the data file that fortune itself uses. Any time I add a new quote to
the first file, I just run:
~> strfile -ir fortunes fortunes.dat
to recreate the data file so fortune will pick up the new quote(s) next time it
runs. To generate a random quote from fortunes.dat, I included:
/usr/bin/fortune /home/jvoigt/fortunes >> ~/.signature (without the .dat) at the
end of my .siggen script. The script actually generates two files .signature and
.signature2 as I use separate identities in Mozilla for two different accounts.
I hope this makes sense - I'm still on post-holiday recovery ;-)
HTH,
John V.
--
_/- John Voigt - K9GBO -----|- Registered Linux User #38558 --_/
_/- System Administrator ----|- IN Dept of Natural Resources -_/
_/- jvoigt at reclamation.dnr.state.in.us - (812)665-2207 -------_/
Churchill's Commentary on Man:
Man will occasionally stumble over the truth, but most of the
time he will pick himself up and continue on.
More information about the Linux-users
mailing list