$Id: README,v 2.4 1998/03/17 15:56:37 joi Exp joi $

List of files:

  1. README (this file)
  2. Makefile
  3. splitter.p (a perl utility)
  4. makeindex.p (a perl utility)
  5. gettitle.p (another perl utility)
  6. newsformat (a perl utility) (Modified from Myrddin's original) Original available at http://www.best.com/~merlin/mushcode.html
  7. txt2html (Not included, but required for creation of html files. Available at http://www.cs.wustl.edu/~seth/txt2html/.)

This makefile and perl script set automates creating a news.txt file for a tinymush. With a few appropriate edits in the Makefile, you could also use it for a help file. The scripts all assume everything is in the current directory, so don't try mixing your news and your help in the same directory! Use separate directories for each.

Unpack the this tar file into an empty directory. Edit the Makefile to change the MUSH variable to point to the directory where you want news.txt and news.indx placed. You must have write permissions to these files.

Change the SPELLCHK variable to point to your preferred spell checker. If you don't have one, you can make this a unix comment, 'true', or something. makeindex.p refers to it so you can't just delete it.

Change the TXT2HTML variable to point to where your copy of txt2html lives.

Edit the perl scripts to point to your host's perl.

If you wish to start with a pre-existing news.txt or help.txt file, run splitter.p against that file to break it into individual text files, one per topic. Splitter.p is smart enough to concatenate multi-page topics into one file, but only if those pages are found as a sequential set within the original file.

Create multiple small textfiles, each containing a single news topic. Each can be multiple pages long. Newsformat will split the text file into 18-line pages surrounded by framing lines, a title line, and the required "& topic" separator.

Name each file such that the name is the same as the topic, with spaces replaced by periods, and ending with ".txt" IE topic "& Role Play" is created from a file named "Role.Play.txt". Do not capitalize the ".txt".

Run 'make'. The makefile will run makeindex.p to create the topic index that will be presented by default at the top of the news file. This topic contains an alphabetical list of all topics in the news file, with the date the source .txt file was last modified. Makeindex.p will also create cat.sh, Makefile.inc and Makefile.inc2, along with 01index.txt. Then, newsformat will be used to create .news files from all .txt files. cat.sh is used to create the master news.all text file. If you use a different shell than BASH, you may want to change the SHELL-related macros in the Makefile to something suitable.

Run "make install" to copy news.all to news.txt in the MUSH directory. You must have write permissions to news.txt and news.indx in the MUSH directory. It will run mkindex to update the index file automatically. If mkindx isn't in that directory, edit the line to include the path to mkindx explicitly.

Optional Step:
Run "make clean" to remove all of the auto-generated files. This will leave the basic scripts and your .txt files alone. Do this if your make gets confused for some reason, or you want to free some disk space. Make will get temporarily confused if you delete a .txt file because the Makefile.inc* include files explicity refer to the corresponding news file, and make won't know how to rebuild the referenced news file. You can either edit the Makefile.inc file manually to remove the .txt file you deleted, or you can just "make clean; make" to let make handle it.

It saves time to NOT run "make clean" every time you make a change. I never do unless I'm deleting topics and feel lazy.