home *** CD-ROM | disk | FTP | other *** search
- /* aminet.rexx - Generate an inputfile for loaddb from "Aminet" "Readme" file
- *
- * $Id: aminet-readme.rexx 1.1 1994/02/08 13:32:12 D_Lowrey Exp $
- *
- * syntax: cd AMINET_0692:AMINET
- * rx aminet-readme.rexx tempfile outfile
- *
- * Where: tmpfile = A temporary file that will contain all of the
- * '.README' file names.
- *
- * outfile = The file to contain the output
- *
- * This script took about 45 min. to run on my A2500 with a VERY slow
- * NEC CDR-25 CD-ROM drive.
- *
- * The database load from the output of this command took about an hour.
- *
- * NOTE: The README files for several of the programs are very long, and
- * cause LoadDB to hit maximum keywords for those records.
- * To fix this, you can either raise MAXKW to a very large number,
- * or edit the output file from this script to reduce the number of
- * lines in each of the offending records.
- *
- * In most cases, the records are long because the README file contains
- * an entire user manual for the product, so editing the file to
- * remove excess text is appropriate.
- *
- * You can also leave the input as-is. In this case, some keywords
- * may not match the long records.
- *
- * These are the offending records for the 06/93 Aminet CD-ROM:
- *
- * BIZ/DEMO/TSDEMO
- * DEV/C/CURSES_2_00
- * DEV/DEBUG/PV142
- * GAME/MISC/MINESWEEPER
- * GAME/THINK/AMIGAGNUCHESS
- * GAME/THINK/MADGIC41
- * GAME/THINK/UCHESS
- * GAME/THINK/UCHESS226
- * GAME/THINK/UCHESSPATCH
- * GAME/THINK/WBGAMES7
- * GFX/SHOW/MP01
- * MISC/EMU/QDOS4AMIGA
- * MUS/EDIT/AMISOX_WAV
- * OS20/CLI/LS_4_7LJR
- * PIX/ILLU/EMPLANTPICS
- * TEXT/SHOW/PPMORE20
- */
-
- parse arg listfile outfile
-
- say "Getting file names..."
- address command "list pat #?.README quick files all lformat=%s%s to="listfile
-
- if ~open('List', strip(listfile), "Read") then do
- say "Cant open listing file==>'"listfile"'"
- exit 20
- end
-
- if ~open('Output', strip(outfile), "Write") then do
- say "Cant open output file==>'"outfile"'"
- exit 20
- end
-
- infile = strip(readln('List'))
- do while ~eof('List')
-
- infile = strip(infile)
- if ~open('Input', infile, "Read") then do
- say "Cant open input file==>'"infile"'"
- exit 20
- end
-
- say infile
-
- filename = substr(infile,1,index(infile,".README")-1)
- temp = filename
- nodeline = "#K"
-
- do while index(temp,"/") ~= 0
- parse var temp node '/' temp
- nodeline = nodeline' 'strip(node)
- end
- call writeln('Output',"#R")
- call writeln('Output',"#H"filename)
- call writeln('Output',nodeline' 'temp)
-
- line = readln('Input')
- do while ~eof('Input')
- call writeln('Output',line)
- line = readln('Input')
- end
-
- call close('Input')
-
- infile = strip(readln('List'))
- end
-
- call close('Output')
-
- exit
-
-