HOWTO: create custom fortune cookies files
  Open your favourite editor and add the strings that you want to be shown
    when running "fortune" in terminal.

  (In THIS version of fortune.php line breaks in any fortune
   string will be replaced with html <br> elements.
   You may include your own <b>, <u>, <i>, elements, as well.)

  BE SURE to add a single line with the character '%' in it, 
    between every string, AND AFTER the very last fortune.
  Save this file to whatever file name you want; as an example: "yourlist".
  If this is the creation of a _new_ fortune file, run the command  
    "strfile -c % yourlist yourlist.dat".
  Otherwise, always run `forbuild.sh` to refresh the entire fortune directory.

  This will create a .dat file for your fortune file, which contains a header
    structure and a table of file offsets for each group of lines.
  This allows random access of the strings.
  Run "fortune yourlist" to eat the fruit of your work. That's it!
  Oh, and one more thing: if you change anything in "yourfile",
    you will need to repeat the "strfile -c % yourlist yourlist.dat".

=======================================================================
SCRIPTS

fordupes.sh
	I wrote a script to locate duplicate fortunes in the fortune 
	files.  It contains "bashisms", in case you insist on
	using a different shell.  The rework required is on you.
	The script expects to run in the fortune file directory.

forspell.sh
	This script will run through all the fortune files -- checking 
	  spelling with `aspell`. 
	Of course you'll find lots of "mis-spellings".  There are personal 
	  names, and on-purpose mis-spelling and made-up words.
	  You'll hit 'i' a lot. 
	Note: I tend to put the on-purpose mis-spellings in at the end of
	 "humor" and most of the other fortunes.
	The script expects to run in the fortune file directory.

forgrep.sh "text string" fortune_file
	This script will list all the fortunes in a given fortune file
	  containing the text string of interest.
	The primary use is to try to run down very close, duplicate fortunes
	  and/or compile a set of fortunes covering a single topic
	  (e.g. "brother-in-law").
	READ the comments at the top of the script.
	The script expects to run in the fortune file directory.

forbuild.sh
	This script is used to rebuild all the fortunes 
	The '%' is used to separate fortunes in the file.  But, if like me,
	you are prone to Fat Finger the keyboard when adding new fortunes,
	the script will locate and flag all single character lines that are
        NOT the intended '%'.
	The script expects to run in the fortune file directory.

All the scripts can be run when in the fortune directory with ./
I.e. $ ./forspell.sh
You need not copy them into $HOME/bin/ unless you want to.
=======================================================================

This HOWTO was completely rewritten in November, 2024.

PLEASE, errors or suggestions will be appreciated: W3DHJ@jonz.net

===========================================================