[alt.gourmand] alt.gourmand software

reid@decwrl.dec.com (Brian Reid) (01/01/88)

This is what you will receive if you send the archive server a message saying
"send program software.shar".  It is the software component of the
alt.gourmand software release.

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Unpack the file by typing "sh filename", where "filename" is the
#    name of your file. It will create these files in your current
#    directory:
#	 README2
#	 Makefile.bsd
#	 Makefile.sysv
#	 Novice
#	 Novice.install
#	 Novice.makefile
#	 Novice.start
#	 Novice.step1
#	 Novice.step2
#	 Novice.step3a
#	 Novice.step3b
#	 rcbook.t.X
#	 rcextract.X
#	 rcindex.X
#	 rcintro.X
#	 rckeep.X
#	 rckeepnew.X
#	 rcnew.t.X
#	 rcshow.X
#	 rctypeset.X
#	 configure.sh
#	 tmac.recip
 
echo extracting README2
cat > README2 << '16068!alt.gourmand!'
This is the distribution of programs that work with alt.gourmand files, to make
the USENET cookbook. There is a separate distribution of the documentation.
You must have both distributions before you can do the installation. They
are sent in two parts because the network often loses large articles.

-->	If you are not a programmer, but want to use this	<--
	software, and can't enlist the help of a
	programmer, please read the file "Novice". It
	contains simplified instructions, and can lead
	you through the installation procedure even if
	you have never installed software before.

	Ignore the rest of this README2 file if you decide to use
	the Novice instructions.

To install the recipe software at your site, copy either Makefile.bsd or
Makefile.sysv over to be named "Makefile", then edit it per the instructions
in the beginning. If you are running any non-BSD Unix, such as Sys III or
Venix, then you want to use Makefile.sysv even though you don't have sysv.

If you have the "less" program, you will probably want to use it instead of
"more".

You may find that the best version of troff at your site is called "ptroff"
or "dtroff" or "itroff" or "qtroff" or whatever--the first letter tends to
correspond to the manufacturer of the machine for which that troff is
targeted.

Once you have edited your Makefile, type
	make configure
This will produce configured executable versions of the cookbook software in
your current directory. Once you have satisfied yourself that it is not a
trojan horse, type
	make install
which will copy the executable programs to the directory you have chosen for
them (we put them in /usr/local/bin) and copy the manual pages to
/usr/man/man1 and /usr/man/man5. You needn't be root to install, you only
need to be a user who has write permission in the bin and man directories.

Once you've done that, go read the man pages, then go play with "rn" and have
fun printing cookbooks. This will also work with readnews; I don't know from
notesfiles, and I have never tried it with vnews or yarn or any of those
other programs.

Here are the program names and what they do:

rcbook.t	make a cookbook with troff
rcnew.t		make a cookbook update with troff
rcextract	extract a recipe from a news article (called by rctypeset)
rcindex		produce an index of saved recipes (called by rcbook)
rcintro		generate the introduction to the cookbook (called by rcbook)
rckeep		keep a recipe
rckeepnew	keep all new recipes (new since last rckeepnew run)
rcnroff		run one recipe through nroff
rcshow		show one recipe on the screen
rctypeset	run one recipe through troff
rcbook.n	nroff version of rcbook.t
rcnew.n		nroff version of rcnew.t

The troff and nroff macros use the manual macros /usr/lib/tmac/tmac.an as a
subroutine. If your site has changed those manual page macros significantly
from the original AT&T or Berkeley distribution, then things might not work.
In particular, the macros distributed by DEC with Ultrix 1.2 are not
compatible.

	Brian Reid
	DEC Western Research Laboratory
	Palo Alto, California
	{ucbvax,ihnp4,decvax}!decwrl!reid	-or-	reid@decwrl.DEC.COM
16068!alt.gourmand!
echo extracting Makefile.bsd
cat > Makefile.bsd << '16068!alt.gourmand!'
# alt.gourmand software Makefile for USG systems.
# To install, edit the following variables, then type "make install"
#
# Where are the object files for the recipe software kept?
OBJDIR=/usr/local/bin

# Where are the man pages to be put?
MAN1DIR=/usr/man/man1
MAN5DIR=/usr/man/man5

# Where is a temporary directory (e.g. /tmp or /usr/tmp) that will have
# enough space to hold the entire cookbook. It could require several
# megabytes someday.
TEMPDIR=/tmp

# Where is the news spooling directory? Note: if your system is running a
# version of news earlier than B2.10, or some software besides news, you will
# have to edit the file "rckeepnew.X" and tell it the name of the directory
# that holds alt.gourmand articles.
NEWSDIR=/usr/spool/news

# What is the default "keep" directory. If you want a per-person keep
# directory, put $$HOME/something; if you want a systemwide keep directory
# (to save disk space), then put an absolute pathname here.
DEFDIR=$$HOME/Recipes

# What PATH do you want used inside the shell scripts? At the very least,
# it must contain $OBJDIR
DEFPATH=:$(OBJDIR):/usr/ucb:/usr/bin:/bin:

# What version of TRoff works best at your site, and with what options does it
To: reid@decwrl
# do its best job on the Unix manual pages macros?
DEFTROFF=troff -man

# What is your favorite pager and what are its options?
DEFPAGER=more -s

# Do you want recipes to come out in Metric units (as opposed to English
# units)? If you think that tablespoons and cups are the right thing to have
# in recipes, then leave this set to "0". If you think that milliliters and
# grams are the right thing to have in recipes, then change to "1"
METRIC=0

##
##########################################################################

OBJECTS=rcbook.t rcbook.n rcextract rcindex rckeep rcnroff rcshow rctypeset \
	rcintro rckeepnew rcnew.t rcnew.n

configure: Makefile 
	sh configure.sh BSD '$(OBJDIR)' '$(NEWSDIR)' '$(DEFDIR)' '$(DEFPATH)' \
		'$(DEFTROFF)' '$(DEFPAGER)' '$(METRIC)' '$(TEMPDIR)'

clean:
	rm -f $(OBJECTS) *.n.X rcnroff.X *.tmp

install:
	cp $(OBJECTS) $(OBJDIR)
	cp cookbook.1 $(MAN1DIR)
	cp recipes.5 $(MAN5DIR)
16068!alt.gourmand!
echo extracting Makefile.sysv
cat > Makefile.sysv << '16068!alt.gourmand!'
# alt.gourmand software Makefile for USG systems.
# To install, edit the following variables, then type "make install"
#
# Where are the object files for the recipe software kept?
OBJDIR=/usr/local/bin

# Where are the man pages to be put?
MAN1DIR=/usr/man/man1
MAN5DIR=/usr/man/man5

# Where is a temporary directory (e.g. /tmp or /usr/tmp) that will have
# enough space to hold the entire cookbook. It could require several
# megabytes someday.
TEMPDIR=/tmp

# Where is the news spooling directory? Note: if your system is running a
# version of news earlier than B2.10, or some software besides news, you will
# have to edit the file "rckeepnew.X" and tell it the name of the directory
# that holds alt.gourmand articles.
NEWSDIR=/usr/spool/news

# What is the default "keep" directory. If you want a per-person keep
# directory, put $$HOME/something; if you want a systemwide keep directory
# (to save disk space), then put an absolute pathname here.
DEFDIR=$$HOME/Recipes

# What PATH do you want used inside the shell scripts? At the very least,
# it must contain $OBJDIR
DEFPATH=:$(OBJDIR):/usr/bin:/bin:

# What version of TRoff works best at your site, and with what options does it
# do its best job on the Unix manual pages macros?
DEFTROFF=troff -man

# What is your favorite pager and what are its options?
DEFPAGER=pg

# Do you want recipes to come out in metric units (as opposed to English
# units)? If you think that tablespoons and cups are the right thing to have
# in recipes, then leave this set to "0". If you think that milliliters and
# grams are the right thing to have in recipes, then change to "1"
METRIC=0

############################################################################

OBJECTS=rcbook.t rcbook.n rcextract rcindex rckeep rcnroff rcshow rctypeset \
	rcintro rckeepnew rcnew.t rcnew.n

configure: Makefile 
	sh configure.sh USG '$(OBJDIR)' '$(NEWSDIR)' '$(DEFDIR)' '$(DEFPATH)' \
		'$(DEFTROFF)' '$(DEFPAGER)' '$(METRIC)' '$(TEMPDIR)'

clean:
	rm -f $(OBJECTS) *.n.X rcnroff.X *.tmp

install:
	cp $(OBJECTS) $(OBJDIR)
	cp cookbook.1 $(MAN1DIR)
	cp recipes.5 $(MAN5DIR)
16068!alt.gourmand!
echo extracting Novice
cat > Novice << '16068!alt.gourmand!'
This file is for people who know how to cook but who don't know how to
program, and who find that they are unable to get the help of a programmer in
getting the alt.gourmand software installed.

The novice installation is set up as a series of steps; at the end of each
you will be told what to do next.

To begin, type this command:
	Novice.start
Make sure you put the capital N at the beginning of it. If it doesn't work,
try typing this command:
	chmod 755 Novice.*
and then try
	Novice.start
a second time. If it still doesn't work, then you gotta get help.
16068!alt.gourmand!
echo extracting Novice.install
cat > Novice.install << '16068!alt.gourmand!'
#! /bin/sh
# This program is part of the novice alt.gourmand installation procedure.
# Please read the file "Novice".
trap "rm -f mod.rec.$$" 0 1 2 3 15
echo $$ > mod.rec.$$
if test -f $HOME/mod.rec.$$
then
    cat Novice.step3a
else
    echo Installing ...
    cp $*
    cat Novice.step3b
fi
16068!alt.gourmand!
echo extracting Novice.makefile
cat > Novice.makefile << '16068!alt.gourmand!'
### This file is used as part of the Novice installation procedure. Please
### read file "Novice".
##=
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# (1) Where is the news spooling directory? If you don't have any idea, then
# leave this line alone--this is the best guess. If you get this wrong,
# all of the programs will still work, though they may give strange error
# messages at times.

NEWSDIR=/usr/spool/news

# (2) What version of troff works best at your site? Change the word "troff" 
# to the name of your version, if it is different.
#
# If you don't know, then try one of these guesses:
# If you have an Apple LaserWriter, your best guess is "ptroff"
# If you have an Imagen printer, your best guess is "itroff"
# If you have a QMS or Talaris printer, your best guess is "qtroff"
# Otherwise try just "troff", or ask for help.
# If you get this wrong, you will be able to save recipes but you won't be
# able to typeset them or print them out.

MYTROFF=troff

# (3) What is your favorite pager and what are its options? If you don't have
# any idea, then leave this line alone. If you have a "pg" program, then edit
# the word "cat" into "pg" below. If you have a "more" program, then edit the
# word "cat" into "more". Even if you get this completely wrong, almost
# everything will still work.

DEFPAGER=cat

# (4) Do you want the recipes to come out in metric units or English units?
# If you think that recipes should use teaspoons and cups, then leave the
# METRIC=0 line alone. If you think that recipes should use grams and
# milliliters, then edit this line to say METRIC=1

METRIC=0

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
# You should not have to change anything below this line, but you are
# welcome to make changes if you think you know what you are doing.

TEMPDIR=/tmp
DEFTROFF=$(MYTROFF) -man
DEFDIR=$$HOME/Recipes
OBJDIR=$$HOME
DEFPATH=:$(OBJDIR):XXDEFPATH
OBJECTS=rcbook.t rcbook.n rcextract rcindex rckeep rcnroff rcshow rctypeset \
	rcintro

configure: Makefile 
	@sh configure.sh XXX '$(OBJDIR)' '$(NEWSDIR)' '$(DEFDIR)' \
	 	'$(DEFPATH)' '$(DEFTROFF)' '$(DEFPAGER)' '$(METRIC)' \
		'$(TEMPDIR)'
	@cat Novice.step2

install:
	@Novice.install $(OBJECTS) $(OBJDIR)
16068!alt.gourmand!
echo extracting Novice.start
cat > Novice.start << '16068!alt.gourmand!'
#! /bin/sh
# This script is used to begin the Novice installation procedure. Please read
# file "Novice" for instructions. Pay no attention to the man behind the
# curtain.
#
###########################################################################
sed -e "s|XXDEFPATH|$PATH|" \
    -e "/###/d" \
    -e '/##=/a\
# This version of the alt.gourmand Makefile is for people who are not really\
# programmers, and who cannot get other help. Edit the file to answer the 4\
# questions  below, and then type "make configure".\
' -e '/##=/d' Novice.makefile > Makefile
cat Novice.step1
16068!alt.gourmand!
echo extracting Novice.step1
cat > Novice.step1 << '16068!alt.gourmand!'

OK, your Makefile is now created. Using your favorite text editor, edit it to
try to answer the 4 questions at the beginning. If you can't answer them,
don't give up--the system will still work to a certain extent without the
answers.

Once you have finished editing the Makefile, type this:

	make configure
16068!alt.gourmand!
echo extracting Novice.step2
cat > Novice.step2 << '16068!alt.gourmand!'

OK, the mod.recipe software and documentation are now all "configured". That
means that they have been updated to reflect the details of your installation.
What you need to do next is to "install" them, which means to copy them to
your home directory where you can execute them while reading news. To do
that, type this:

	make install
16068!alt.gourmand!
echo extracting Novice.step3a
cat > Novice.step3a << '16068!alt.gourmand!'

Because you have been working in your home directory, the software is already
installed there. We're done! Go read the files "cookbook.doc" and
"recipes.doc" for further instructions on how to use alt.gourmand (They are
now in your home directory)

		-- Brian Reid
16068!alt.gourmand!
echo extracting Novice.step3b
cat > Novice.step3b << '16068!alt.gourmand!'

You're done. The programs are all installed. Go read the files "cookbook.doc"
and "recipes.doc" for instructions. Happy recipe collecting!

		-- Brian Reid
16068!alt.gourmand!
echo extracting rcbook.t.X
cat > rcbook.t.X << '16068!alt.gourmand!'
#! /bin/sh
# rcbook.t - make a cookbook with nroff or the typesetter
#   linked to rcbook.n
#
# Brian Reid, November 1985
# Copyright (C) USENET Community Trust
#
# Modified by:  David Messer, Febuary 1987
#
TROFF="nroff -man"
FRACTIONS=0
RCINDEX="-w 56"
case $0 in
	*.t)	TROFF="DEFTROFF"
		FRACTIONS=1
		RCINDEX=-t
		;;
	esac
PATH=DEFPATH
export PATH
TMAC=TEMPDIR/tmac.$$
INDEX=TEMPDIR/Index.$$
ENDEX=TEMPDIR/Endex.$$
RECIPES=TEMPDIR/Recipes.$$
trap "rm -f TEMPDIR/*.$$; exit" 0 1 2 3 15
TFLAG=
FRACTIONS=1
METFLAG="-rMMETRIC"
KEEPDIR=DEFDIR
while [ $# -gt 0 ];
do
    case $1 in
	    -t) TFLAG="$1";;
	    -m) METFLAG="-rM1";;
	    -M) METFLAG="-rM0";;
	    -f) FRACTIONS=0;;
	    -*) echo $0: Unknown option $1 1>&2 ; exit 1;;
	    "") KEEPDIR=DEFDIR;;
	    *) KEEPDIR=$1;;
    esac
    shift
done
if [ ! -d $KEEPDIR ]; then
	echo Your keep directory $KEEPDIR does not seem to exist. 1>&2
	exit 1
fi;
echo Typesetting cookbook from files in $KEEPDIR 1>&2
rcindex $RCINDEX $KEEPDIR
cat > $TMAC << 'tmac.recip'
TMAC.RECIP
tmac.recip
set `date`
#  Thu Mar 27 22:56:49 PST 1986
YEAR="$6"
YR=`expr $YEAR - 1900`
TODAY="$3 $2 $YR"
sed -e "s/DATE/$TODAY/g" -e "s/YEAR/$YEAR/g" > $INDEX << 'Index'
.RH MOD.RECIPES-SOURCE INDEX Recipes "DATE" YEAR
.ll 6.5i
.nf
.br
.de XX
.tr ~ 
.ta 2.4iR 2.6i 5.3i
.ie !"\\$2""	\\$1~~~~~\\$2	\\$3~~~~~~\\$4	\\$5
.el	\\$1	\\$3~~~~~~\\$4	\\$5
..
.ps 8
.vs 10p
Index
cat > $ENDEX << 'Endex'
.vs
Endex
rcintro > Introduction
(
	cd $KEEPDIR
	case $FRACTIONS in
	  1) cat [a-z]* > $RECIPES;;
	  *) cat [a-z]* |\
		 sed -e 's/\([0-9a-zA-Z]\)\(\\([1-3]\)/\1 \2/g' \
			 -e 's|\\(12|1/2|' -e 's|\\(14|1/4|' -e 's|\\(34|3/4|' \
			 -e 's|``|"|'     -e "s|''|\"|" > $RECIPES;;
	esac
)
cat $TMAC Introduction $INDEX INDEX $ENDEX $RECIPES | $TROFF $METFLAG $TFLAG - >Cookbook
echo Cookbook created 1>&2
16068!alt.gourmand!
echo extracting rcextract.X
cat > rcextract.X << '16068!alt.gourmand!'
#! /bin/sh
# rcextract - extract article from alt.gourmand
#
# This shell script extracts the portion of an alt.gourmand
# article that is supposed to be fed into xroff. It strips off the
# article header and any signature, and sends the resulting text to stdout.
#
# Brian Reid, November 1985
# Paul Pomes, March 1986: updated to work with notesfiles
#
# Copyright (C) 1986, USENET Community Trust

PATH=DEFPATH
export PATH
TMPFILE=/tmp/xart.$$
trap "rm -f $TMPFILE; exit" 0 1 2 3 15
cat > $TMPFILE << 'extractor.awk'
BEGIN {Seen = 0}
/^\.RH MOD\.RECIPES/ {Seen = 1}
/^-- *$/ {Seen = 0}
/^\/\* End of text from/ {Seen = 0}
Seen == 1 {print $0}
extractor.awk
awk -f $TMPFILE
16068!alt.gourmand!
echo extracting rcindex.X
cat > rcindex.X << '16068!alt.gourmand!'
#! /bin/sh
# rcindex - produce index of recipes
#
# usage:
#   rcindex  [ -options ] [ keepdir ]
#
# This shell script produces an index of all recipes in a keep directory.
# That index is an nroff/troff document that will be used as a part
# of the book produced from that directory.
#
# If you don't specify a keep directory, it will use DEFDIR, which
# is as good a place as any.
#
# Brian Reid, November 1985
#	v2, June 1986
# Copyright (C) 1986, USENET Community Trust
#
PATH=DEFPATH
export PATH
BADWDS=TEMPDIR/rcindex.$$
PUNCHR=TEMPDIR/rcipunc.$$
trap "rm -f TEMPDIR/*.$$; exit" 0 1 2 3 15
while [ $# -gt 1 ];
do
    case $1 in
	    -*) OPTIONS="$OPTIONS $1";;
	    *) OPTIONS="$OPTIONS $1";;
    esac
    shift
done
case $1 in
	"") KEEPDIR=DEFDIR;;
	*) KEEPDIR=$1;;
esac
if [ ! -d $KEEPDIR ]; then
	echo rcindex: Your keep directory $KEEPDIR does not seem to exist.
	exit 1
fi;
cat > $PUNCHR << 'endflag'
()/.,
endflag
tr ' ' '\12' << 'endflag' | sort -u > $BADWDS
& - a about addictive after against all also amazingly an and
another any are as at back basic be because been before being best-ever
between both but by came can center classic cloying come con cook
cooked cooking could countries day decadent delicate delicious did
dinner dish dishes do down each earthy easy-to-make even extremely fattening
filling first flavor flavorful food for from get go good great had has have
he hearty her here him his hot how i if in incredible into intoxicating is
it its just know large last life light like little long luscious made
make makes man many may me men might more most mr much must my never
new no not now of off old on one only or other our out over own people
picture-perfect prizewinning recipe recipes refreshing rich right said
same see she should since smothered so some state still succulent such
take than that the their them then there these they thick this those
three through time to too two ultimate under universe up us used very
was way we well were what when where which while who will with
wonderful work world would year years you your
endflag
DIR=`pwd`
cd $KEEPDIR
grep \^.RZ [a-z]* |\
  sed -e 's/\: *.RZ //' |\
  awk -F\" '{print $1,$4}' |\
  ptx -f -r -i $BADWDS -b $PUNCHR $OPTIONS |\
  sed -e 's/^\.xx/.XX/' > $DIR/INDEX
16068!alt.gourmand!
echo extracting rcintro.X
cat > rcintro.X << '16068!alt.gourmand!'
#! /bin/sh
# Copyright (C) 1985,1986,1987 USENET Community Trust
#
cat << 'YumYumEatemup'
.if '\n(mo'1' .ds MM January
.if '\n(mo'2' .ds MM February
.if '\n(mo'3' .ds MM March
.if '\n(mo'4' .ds MM April
.if '\n(mo'5' .ds MM May
.if '\n(mo'6' .ds MM June
.if '\n(mo'7' .ds MM July
.if '\n(mo'8' .ds MM August
.if '\n(mo'9' .ds MM September
.if '\n(mo'10' .ds MM October
.if '\n(mo'11' .ds MM November
.if '\n(mo'12' .ds MM December
.nr SV \n(.v
.nr SP \n(.s
.nr SL \n(.l
.nr SI \n(.i
.sp 2i
.ps 24
.vs 30p
.ft B
.ce 2
THE USENET COOKBOOK
(Recipes and food lore from the global village)
.sp 0.5i
.ps 16
.vs 18p
.ft R
.ie t .in +1.5i
.el .in 6
.if t .ll -1.5i
A collection by the readers of
USENET, from the newsgroup \fIalt.gourmand\fR.
.br
.sp 0.5i
.ps 10
.vs 11p
.ce 3
Edited by Brian K. Reid
Palo Alto, California, U.S.A.
ihnp4!decwrl!reid   reid@decwrl.dec.com
.sp 1i
.ps 12
.vs 14p
.ce 2
Printed \n(dy \*(MM 19\n(yr
.sp 1i
.ie n Copyright (C) 19\n(yr USENET Community Trust
.el Copyright \(co 19\n(yr USENET Community Trust
.sp 12p
Permission to copy without fee all or part of this material is granted
provided that the copies are not made or distributed for direct commercial
advantage, the USENET copyright notice, title, and publication
date appear, and notice is given that copying is by permission of
the USENET Community Trust.
.vs \n(SVu
.ps \n(SPu
.ll \n(SLu
.in \n(SIu
.RH MOD.RECIPES-SOURCE INTRODUCTION M "27 Jun 1986" 1986
\fIThe new electronic interdependence recreates the world in the image of a
global village.\fR
.ti 2i
\(emMarshall McLuhan, 1967
.br
.SH INTRODUCTION
This is a community cookbook, from an invisible worldwide electronic
community. Like all community cookbooks, it has the favorite recipes
of the members of the community, suitably edited and organized. \fIThe USENET
Cookbook\fR is a collection of the favorite recipes of USENET readers
worldwide.
.SH USENET
USENET is the network by which Unix computer users talk to each other. It is
a worldwide net, made from computer-to-computer telephone links, linking some
200,000 people at 7,000 sites in 30 countries. Besides serving an obvious
technical and scientific purpose, USENET is also a medium for linking
worldwide social groups of people who share common interests. 
As an experiment
in interactive electronic publication, the members of USENET decided
in 1985 to make a cookbook of favorites from their ``global village''. 
Brian Reid of DEC Western Research in Palo Alto, California, organized the
venture and wrote much of the requisite software.
.PP
.ie t \{The \fIUSENET Cookbook\fR is a database and not just a book.
The paper copy that you
are holding was printed from a copy of the online database at some USENET
site, but even as you are reading it, new recipes are being added to that
database. \}
.el \{The \fIUSENET Cookbook\fR is an online database distributed with the
intention that it be published as a book. \}
The \fIUSENET Cookbook\fR is distributed with software that enables every user to
make his own customized edition of it, leaving out the recipes that
he has no interest in, and perhaps adding a few of his own that he hasn't
yet submitted to the network. There will be many different versions and
editions of it, all with the same title, and all copyrighted. Every user can
choose whether to print the recipes in imperial units (cups and
spoons) or in metric units.
.SH DISTRIBUTION
The \fIUSENET Cookbook\fR is distributed in the newsgroup named \fIalt.gourmand\fR.
It is a ``moderated'' newsgroup, which means that everything published in it
must be approved by the moderator (editor). Readers submit recipes
electronically by mailing them to the editor. He edits for style, form, and
content, and performs conversion to or from metric units if necessary. The
finished recipes are published in weekly batches, which are sent from Palo
Alto every Thursday.
.SH PROCEDURE
To participate, you will need to get \alt.gourmand\fR at your site. A
package of software for using it is posted from time to time into
\falt.gourmand\fR. Get that software and install it on your machine; it will
enable you to save recipes easily and to print cookbooks from them.
.PP
To submit a recipe to the \fIUSENET Cookbook\fR, mail its text to the
newsgroup moderator, \FI{sun,pyramid,ihnp4,ucbvax,decvax,allegra}!decwrl!recipes\fR (uucp) or
\fIrecipes@decwrl.DEC.COM\fR (internet). The news software at most
sites will do this automatically if you try to post to \fIalt.gourmand\fR.
.PP
It's important that you tell us where you got the recipe from. It's ok if you
cribbed it from a book or magazine or newspaper, but if you copy the words
that you found there, you have probably violated a copyright. Copyright law
is complex, and only a lawyer can reliably advise you on whether or not you
are violating it, but in general if you rewrite a recipe, in your own words,
even if you don't change the formula, then you are not infringing the
copyright by submitting that recipe to the network. The copyright is on the
words that explain the recipe, and not the recipe itself.
.SH COPYRIGHT
The entire \fIUSENET Cookbook\fR is copyright by the USENET Community Trust, which
is a California organization formed for the purpose of holding the copyright.
The purpose of this copyright is to prevent commercialization of the
Cookbook. Read the copyright notice on the title page.
YumYumEatemup
16068!alt.gourmand!
echo extracting rckeep.X
cat > rckeep.X << '16068!alt.gourmand!'
#! /bin/sh
# rckeep - keep a recipe by adding it to a keep directory
#
# usage:
#   rckeep [ keepdir ]  [ filename ]
#
# This program lets you snatch recipes out of newsgroups and store them in
# a "keep" directory. They are stored in a file name that matches the 
# recipe id, which is found in the .RH command in the recipe.
#
# If you don't specify a keep directory, it will use DEFDIR which
# is as good a place as any. You can use ~/ to stand for $HOME/ if you want.
#
# Brian Reid, November 1985
# Copyright (C) 1986, USENET Community Trust
#
PATH=DEFPATH
export PATH
TEMPFILE=/tmp/rckeep.$$
case $1 in
	"") KEEPDIR=DEFDIR;;
	~/*) KEEPDIR=$HOME/`expr $1 : '~/\(.*\)'`;;
	~*) echo Sorry, I cannot process ~ notation, except for ~/...;
	       exit 1;;
	*) KEEPDIR=$1;;
esac
if [ ! -d $KEEPDIR ]; then
	echo Creating new keep directory $KEEPDIR;
	mkdir $KEEPDIR;
fi;
case $2 in
	"") rcextract > $TEMPFILE;;
	*) rcextract < $2 > $TEMPFILE;;
esac
# the [A-Z] in tr arg below is for compatibility with SysV
IDLINE=`awk '{print $2,$3; exit;}' < $TEMPFILE | tr "[A-Z]" "[a-z]" `
case $IDLINE in
    "") echo This is not an alt.gourmand datafile. I do not know what to do with it.
	exit 1;;
esac
set $IDLINE
KEEPNAME=$2
FILETYPE=$1
case $FILETYPE in
    mod.recipes-source) if [ -f $KEEPDIR/$KEEPNAME ]; then
	echo Overwriting previous version of `basename $KEEPNAME`:
	ls -l $KEEPDIR/$KEEPNAME
	fi
	mv $TEMPFILE $KEEPDIR/$KEEPNAME
	echo Saving $KEEPDIR/$KEEPNAME;;
    *) echo This is not an alt.gourmand datafile. I do not know what to do with it.;
       exit 1;;
esac
16068!alt.gourmand!
echo extracting rckeepnew.X
cat > rckeepnew.X << '16068!alt.gourmand!'
#! /bin/sh
# rckeepnew - keep all recipes that arrived since the last time this
#	      program was run.
#
# usage:
#   rckeepnew [ keepdir ]
#
# This program looks in the USENET spooling directory and finds all files
# that contain recipes and that were created since the last time it was run.
# For each such file, it runs the program "rckeep". The record of the last
# time the program was run is kept as the creation date of the file
# ".keepnew" in your keep directory.
#
# Brian Reid, March 1986
# Copyright (C) 1986, USENET Community Trust
#
PATH=DEFPATH
export PATH

# if you are not running B news, you will need to edit the following line to
# tell it the name of the directory in which alt.gourmand articles are stored.
RECIPEDIR=NEWSDIR/alt/gourmand
export RECIPEDIR

KEEPDIR=${1-DEFDIR}
if [ ! -d $RECIPEDIR ]
then
    echo rckeepnew: Cannot find ${RECIPEDIR}. 
    exit 1
fi
cd $RECIPEDIR
if [ ! -d $KEEPDIR ]
then
    echo rckeepnew: Directory $KEEPDIR does not exist. I will try to create it.
    echo mkdir $KEEPDIR
    if mkdir $KEEPDIR
    then
	echo rckeepnew: mkdir succeeded. Continuing.
    else
	echo rckeepnew: mkdir failed. Cannot continue.
	exit 1
    fi
fi

# Find the files that have changed 
for j in `if test -f $KEEPDIR/.keepnew
then
    find . -newer $KEEPDIR/.keepnew -exec grep -l "^Subject: RECIPE:" {} \;
else
    grep -l "^Subject: RECIPE:" *
fi`
# run rckeep on each of the changed files
do
    rckeep $KEEPDIR < $j
done
# update the date-time flag
touch $KEEPDIR/.keepnew
echo Date-and-time flag in $KEEPDIR updated.
16068!alt.gourmand!
echo extracting rcnew.t.X
cat > rcnew.t.X << '16068!alt.gourmand!'
#! /bin/sh
# rcnew.t - make new cookbook pages with nroff or the typesetter
#   linked to rcnew.n
#
# Spencer Thomas, January 1986
# after rcbook.t by Brian Reid, November 1985
#
# Modifed by:  David Messer, Febuary 1987
#
TROFF="nroff -man"
FRACTIONS=0
RCINDEX="-w 56"
case $0 in
	*.t)	TROFF="DEFTROFF"
		FRACTIONS=1
		RCINDEX=-t
		;;
	esac
PATH=DEFPATH
export PATH
TMAC=TEMPDIR/tmac.$$
INDEX=TEMPDIR/Index.$$
ENDEX=TEMPDIR/Endex.$$
RECIPES=TEMPDIR/Recipes.$$
trap "rm -f TEMPDIR/*.$$; exit" 0 1 2 3 15
TFLAG=
FRACTIONS=1
METFLAG="-rMMETRIC"
KEEPDIR=DEFDIR
while [ $# -gt 0 ];
do
    case $1 in
	    -t) TFLAG="$1";;
	    -m) METFLAG="-rM1";;
	    -M) METFLAG="-rM0";;
	    -f) FRACTIONS=0;;
	    -*) echo $0: Unknown option $1 1>&2 ; exit;;
	    "") KEEPDIR=DEFDIR;;
	    *) KEEPDIR=$1;;
    esac
    shift
done
if [ ! -d $KEEPDIR ]; then
	echo rcnew: Your keep directory $KEEPDIR does not seem to exist. 1>&2
	exit 1
fi;
# if Index.keep exists, then a previous rcnew bombed.  Use the old one.
if [ ! -f Index.keep ]; then
	mv INDEX Index.keep
fi;
echo Typesetting cookbook update 1>&2
echo from files newer than \
    `ls -l Index.keep | awk '/./ {printf("%s %s %s", $5, $6, $7);}'` 1>&2
echo in $KEEPDIR 1>&2
rcindex $RCINDEX $KEEPDIR
cat > $TMAC << 'tmac.recip'
TMAC.RECIP
tmac.recip
set `date`
#  Thu Mar 27 22:56:49 PST 1986
YEAR="$6"
YR=`expr $YEAR - 1900`
TODAY="$3 $2 $YR"
sed -e "s/DATE/$TODAY/g" -e "s/YEAR/$YEAR/g" > $INDEX << 'Index'
.RH MOD.RECIPES-SOURCE INDEX Recipes "DATE" YEAR
.ll 6.5i
.nf
.br
.de XX
.tr ~ 
.ta 2.4iR 2.6i 5.3i
.ie !"\\$2""	\\$1~~~~~\\$2	\\$3 \\$4	\\$5
.el	\\$1	\\$3 \\$4	\\$5
..
.ps 8
.vs 10p
Index
cat > $ENDEX << 'Endex'
.vs
Endex
# This next kludge (using file $RECIPES) is because some versions of troff
# can take only a very small number of argument files.
cat `find $KEEPDIR -name '[a-z]*' -newer Index.keep -print | grep '^./[^/]*$' | sort` > $RECIPES
case $FRACTIONS in
  1) cat $INDEX INDEX $ENDEX $RECIPES;;
  *) cat $INDEX INDEX $ENDEX $RECIPES |\
	 sed -e 's/\([0-9a-zA-Z]\)\(\\([1-3]\)/\1 \2/g' \
	     -e 's|\\(12|1/2|' -e 's|\\(14|1/4|' -e 's|\\(34|3/4|' \
	     -e 's|``|"|'     -e "s|''|\"|" ;;
esac | \
$TROFF $METFLAG $TFLAG $TMAC - > Update
echo Update created 2>&1
rm Index.keep
16068!alt.gourmand!
echo extracting rcshow.X
cat > rcshow.X << '16068!alt.gourmand!'
#! /bin/sh
# rcshow - show a recipe
#
# This shell script extracts a recipe from an alt.gourmand netnews article and 
# nroffs it for display on the screen. This differs slightly from "rcnroff"
# in that it is not page-oriented. Actually, this program is almost too slow
# to use, because it has to run nroff every time.
#
# Brian Reid, November 1985
# Copyright (C) 1986, USENET Community Trust
#
# If you don't have "less", you will want to 
# add "ul" to the pipeline to get the underlines right.

TROFF="nroff -man"
PAGER="DEFPAGER"

PATH=DEFPATH
export PATH
TMPFILE=/tmp/xart.$$
TMAC=/tmp/tmac.$$
trap "rm -f $TMPFILE $TMAC; exit" 0 1 2 3 15
METFLAG="-rMMETRIC"

cat > $TMPFILE << 'extractor.awk'
BEGIN {Seen = 0}
/^\.RH MOD\.RECIPES/ {Seen = 1}
/^-- *$/ {Seen = 0}
Seen == 1 {print $0}
extractor.awk
cat > $TMAC << 'tmac.recip'
TMAC.RECIP
tmac.recip
awk -f $TMPFILE |\
  sed -e 's/\([0-9a-zA-Z]\)\(\\([1-3]\)/\1 \2/g' \
	 -e 's|\\(12|1/2|' -e 's|\\(14|1/4|' -e 's|\\(34|3/4|' \
	 -e 's|``|"|'      -e "s|''|\"|" |\
  $TROFF $METFLAG  $TMAC - | $PAGER
# if you don't have "less", you will probably want to change the above line
# into $TROFF $TMAC - | ul | $PAGER
16068!alt.gourmand!
echo extracting rctypeset.X
cat > rctypeset.X << '16068!alt.gourmand!'
#! /bin/sh
# rctypeset - typeset a recipe
#
# This shell script extracts a recipe from an alt.gourmand netnews article and 
# typesets it with troff. It first strips all communication headers
# (such as netnews or mail or notesfile headers) from the front and back
# of the recipe.
#
# Brian Reid, November 1985
# Copyright (C) 1986, USENET Community Trust
#
TROFF="DEFTROFF"
PATH=DEFPATH
export PATH
TMPFILE=/tmp/xart.$$
FRACTIONS=1
TMAC=/tmp/tmac.$$
METFLAG="-rMMETRIC"
VERBATIM=0

trap "rm -f $TMPFILE $TMAC; exit" 0 1 2 3 15
while [ $# -gt 0 ];
do
    case $1 in
	    -t) TFLAG="$1";;
	    -v) VERBATIM=1;;
	    -m) METFLAG="-rM1";;
	    -M) METFLAG="-rM0";;
	    -f) FRACTIONS=0;;
	    -*) echo $0: Unknown option $1 1>&2 ; exit;;
    esac
    shift
done

cat > $TMPFILE << 'extractor.awk'
BEGIN {Seen = 0}
/^\.RH MOD\.RECIPES/ {Seen = 1}
/^-- *$/ {Seen = 0}
/^\/\* End of text from/ {Seen = 0}
Seen == 1 {print $0}
extractor.awk

cat > $TMAC << 'tmac.recip'
TMAC.RECIP
tmac.recip
case $FRACTIONS in
  1) cat ;;
  *) sed -e 's/\([0-9a-zA-Z]\)\(\\([1-3]\)/\1 \2/g' \
	 -e 's|\\(12|1/2|' -e 's|\\(14|1/4|' -e 's|\\(34|3/4|' \
	 -e 's|``|"|'      -e "s|''|\"|" ;;
esac |
  case $VERBATIM in
      0) awk -f $TMPFILE;;
      1) awk '{print}';;
  esac |\
  $TROFF $TFLAG $METFLAG $TMAC -
16068!alt.gourmand!
echo extracting configure.sh
cat > configure.sh << '16068!alt.gourmand!'
#! /bin/sh 
# Script to configure and install the other shell scripts for alt.gourmand
#	Brian Reid, December 1985
#	v2	    April 1986
#	v3	    June  1986
#	v3.1	    Oct   1987
#
SYSTYPE="$1"
OBJDIR="$2"
NEWSDIR="$3"
DEFDIR="$4"
DEFPATH="$5"
DEFTROFF="$6"
DEFPAGER="$7"
METRIC="$8"
TEMPDIR="$9"

case $SYSTYPE in
    XXX) if [ -d /usr/ucb ]
	 then
	     SYSTYPE="BSD"
	 else
	     SYSTYPE="USG"
	 fi;;
esac;


# make rcnroff.X from rctypeset.X
sed -e "s+DEFTROFF+nroff -man+" \
    -e "s+typesets it with troff+formats it with nroff+" \
    -e 's+^FRACTIONS=1$+FRACTIONS=0+' \
    -e "/-t)/d" \
    -e '/^\$TROFF/s+$+ > Update.nr+' \
    -e 's/$TFLAG//g' \
    < rctypeset.X > rcnroff.X

# Make a tmac file tuned to rthe type of system we are on, and strip comments.
sed -e "/^@@@$SYSTYPE/s/^@@@$SYSTYPE//" \
    -e '/^@@@/d' \
    < tmac.recip | grep -v '^\.\\"' > tmac.tmp

# now configure the executable programs
for i in *.X
do
    j=`basename $i .X`
    echo Processing $i into $j
    sed -e "s+OBJDIR+$OBJDIR+g" \
        -e "s+NEWSDIR+$NEWSDIR+g" \
        -e "s+TEMPDIR+$TEMPDIR+g" \
	-e "s+DEFDIR+$DEFDIR+g" \
	-e "s+DEFPATH+$DEFPATH+g" \
	-e "s+DEFPAGER+$DEFPAGER+g" \
	-e "s+METRIC+$METRIC+g" \
	-e '/^TMAC.RECIP$/r tmac.tmp' \
	-e '/^TMAC.RECIP$/d' \
	-e "s+DEFTROFF+$DEFTROFF+g" < $i > $j
    chmod 755 $j
done
rm -f rcbook.n; ln rcbook.t rcbook.n
rm -f rcnew.n; ln rcnew.t rcnew.n
16068!alt.gourmand!
echo extracting tmac.recip
cat > tmac.recip << '16068!alt.gourmand!'
.\" Macro package Copyright (C) 1986 USENET Community Trust
.\" tmac.recip version 3, June 1986
.\"
.\"	# Recipe Heading
.de RH
.ie '\\$5'' .ds YR 1985
.el .ds YR \\$5
.ie n .ds YC Copyright \\*(YR USENET
.el .ds YC Copyright \(co \\*(YR USENET Community Trust
@@@USG.ie n .TH \\$2 "\\$3" "\\$4" "USENET Cookbook"
@@@USG.el .TH \\$2 "\\$3" "alt.gourmand \\$4" "USENET Cookbook"
@@@BSD.ie n .TH \\$2 "\\$3" "\\$4" " " "USENET Cookbook"
@@@BSD.el .TH \\$2 "\\$3" "alt.gourmand \\$4" " " "USENET Cookbook"
.ds ]H \\$2
..
.de RZ
.SH \\s14\\$1
.rs
.ie n .sp 1
.el   .sp 6p
\\*(]H \- \\$2
.fi
.PP
..
.\"	# Ingredient
.de IG
.ds =1 \\$1
.ds =2 \\$2
.if \\n(.$>2 .if  \\nM .ds =1 \\$3
.TP 10
\&\\*(=1
.I \\*(=2
..
.\"	# Step
.de SK
.IP "(\\$1)" 5n
..
.\"	# Ingredient header
.de IH
.ds =1 \\$1
.if \\n(.$>1 .if \\nM .ds =1 \\$2
.SH INGREDIENTS (\\*(=1)
.fi
.PD 0
..
.\"	# Procedure header
.de PH
.PD
.ie '\\$1'' .SH PROCEDURE
.el .SH PROCEDURE \\$1
.RS 5
..
.\"	# Temperature value
.de TE
.ds =2
.if \\n($>2 .ds =2 \\$3
.ie n .ds =1 \\$1 deg. F
.el .ds =1 \\$1\(deF
.ie n .if \\n(.$>1 .if \\nM .ds =1 \\$2 deg. C
.el .if \\n(.$>1 .if \\nM .ds =1 \\$2\(deC
\\*(=1\\*(=2
..
.\"	# inline value selector
.de AB
.ds =1 \\$1
.if \\nM .ds =1 \\$2
.ds =2
.if \\n($>2 .ds =2 \\$3
\\*(=1\\*(=2
..
.\"	# Notes
.de NX
.PD
.SH NOTES
..
.\"	# Wrapup
.de WR
.RE 5
.PD
.SH CONTRIBUTOR
.nf
..
.\" these CS macros courtesy of Bernie Cosell and Matt Bishop
.de CS  \" do the fancy "go into cs mode right" guy
.   ie \\n(.z .cs \\$1 \\$2 \\$3
.   el              \!.CS \\$1 \\$2 \\$3
..
.de FW \" Go into fixed-width mode: put both italic and bold fonts in it
.   CS B 21 \\(.s
.   CS I 21 \\(.s
.   ss 24
.   lg 0
..
.de Fw \" Leave fixed-width mode
.   CS B
.   CS I
.   ss 12
.   lg 1
..
16068!alt.gourmand!