$! $! @(#)genidx.com 6.21 04/01/14 $! $! Generate xmcd Local Discography per-category index files. This is the $! equivalent of genidx.sh for use on the OpenVMS platform. $! OpenVMS versions: 6.0 and later, tested with 7.2 and 7.3 on VAX(tm) machines $! and 7.2-1 as well as 7.3-1 on Alpha(tm) machines $! $! xmcd - Motif(R) CD Audio Player/Ripper $! cda - Command-line CD Audio Player/Ripper $! libdi - CD Audio Device Interface Library $! $! Copyright (C) 1993-2004 Ti Kan $! E-mail: xmcd@amb.org $! Contributing author: Michael Monscheuer $! E-mail: M.Monscheuer@t-online.de $! $! This program is free software; you can redistribute it and/or modify $! it under the terms of the GNU General Public License as published by $! the Free Software Foundation; either version 2 of the License, or $! (at your option) any later version. $! $! This program is distributed in the hope that it will be useful, $! but WITHOUT ANY WARRANTY; without even the implied warranty of $! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the $! GNU General Public License for more details. $! $! You should have received a copy of the GNU General Public License $! along with this program; if not, write to the Free Software $! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. $! $! ------------------------------------------------------------------- $! $! First off, some definitions for output formatting, then check out $! the existance of the logical name $DISCOGDIR which should point $! at xmcd's [.discog] directory. In case the logical does not exist $! inform the user and exit. $! $ CR[0,8]=13 $ LF[0,8]=10 $ BELL[0,8]=7 $ IF F$VERIFY() $ THEN $ CR = "" $ LF = "" $ BELL = "^G" $ ENDIF $ IF F$TRNLNM("$DISCOGDIR") .EQS. "" $ THEN $ WRITE SYS$OUTPUT "''BELL'''CR'''LF'%GIX-F-NLNM, no logical name match, logical $DISCOGDIR not defined." $ EXIT $ ENDIF $! $! Setup symbol DISCOGDIR for this procedure's internal use derived $! from the logical name $DISCOGDIR. Set default to this directory $! and start looking for what is to be processed. $! $ IF P2 .NES. "RUN_SILENT" THEN WRITE SYS$OUTPUT "''CR'''LF'%GIX-I-GENIDX, generating xmcd Local Discography category index." $ ENVI = F$ENVIRONMENT("DEFAULT") $ IF F$LOCATE("<",ENVI) .NE. F$LENGTH(ENVI) THEN SET DEFAULT [] $ ENVI = F$ENVIRONMENT("DEFAULT") $ IDENT = F$ENVIRONMENT("PROCEDURE") $ IDENT = IDENT - F$PARSE(IDENT,,,"VERSION") + ";0" $ SET DEFAULT $DISCOGDIR:[000000] $ DISCOGDIR = F$TRNLNM("$DISCOGDIR") $ DISK = F$ELEMENT(0,":",DISCOGDIR) $ DISCOGDIR = DISCOGDIR - "''DISK':[" - "]" $ DIR = "" $ GETDIR: $ NAM = F$ELEMENT(0,".",DISCOGDIR) $ IF NAM .EQS. "" THEN GOTO GOTDIR $ DIR = DIR + "/''NAM'" $ DISCOGDIR = DISCOGDIR - "''NAM'." $ GOTO GETDIR $ GOTDIR: $ DISCOGDIR = "''DISK'''DIR'" $! $! Delete existing main index file and create a new one, then start $! looking for meta- and subgenre directories. If P1 is not present, $! create all index files, otherwise only create main index file and $! subgenre index file as specified in P1. $! $ IF F$SEARCH("INDEX.HTML") .NES. "" THEN DELETE/NOCONFIRM INDEX.HTML;* $ IF P2 .NES. "RUN_SILENT" THEN WRITE SYS$OUTPUT "''CR'''LF'%GIX-S-IDXMAI, generating xmcd Local Discography main index." $ OPEN/WRITE 1 INDEX.HTML $ WRITE 1 "" $ WRITE 1 "" $ WRITE 1 "" $ WRITE 1 "" $ WRITE 1 "xmcd: Local Discographies Main Index" $ WRITE 1 "" $ WRITE 1 "" $ WRITE 1 "
" $ WRITE 1 "" $ WRITE 1 "" $ WRITE 1 "

Local Discographies: Main Index

" $ WRITE 1 "
" $ WRITE 1 "

" $ WRITE 1 "

" $ WRITE 1 "

Local Discography

" $ WRITE 1 "

" $ WRITE 1 "

" $ WRITE 1 "

" $ WRITE 1 "

Man pages

" $ WRITE 1 "" $ WRITE 1 "
" $ WRITE 1 "Generated on ''F$TIME()' by ''IDENT'" $ WRITE 1 "" $ WRITE 1 "" $ CLOSE 1 $ SET DEFAULT 'ENVI' $ $! $! Index processing and generation complete.