# GENINFO BEGIN { TRUE = 1; FALSE = 0; NEW_RECORD = FALSE } { if (NR == 1) { if ($0 !~ /^INDEX/) { print "geninfo: ERROR: " $FILENAME " is not an index file." exit } else { composer = $0 gsub("^INDEX *","",composer) gsub(" *$","",composer) composer = $NF "," for (i=2; i<=NF-1; i++) { composer = composer " " $i } } next } if ($0 !~ /^ /) # Test for a new record. { # Print any existing record information if (filename != "") { print "!!!COM: " composer print "!!!OPR: " parent_title } # Now start processing the new record information. line = 1 filename = $1 gsub(" *$","",filename) next } else { line++ if (line == 2) # Identify the title. { parent_title = $0 } if (line == 4) # Identify the edition. { edition = $0 } } } #INDEX Johann Sebastian Bach # Format: # # The first line in the index file contains the word INDEX # starting in column 1. This word is followed by some space # and then the name of the composer. All lines following the # first line, up to the first index entry are a description of # the format of the index (plus other other comments which # might be added from time to time). # # All index entries start in column 1. Works are listed # by their file name. Following each entry in the index are # two data lines starting in colmun 2 and containing the # following information: # # 1. Formal title of the work # 2. Number of sources for the work # # For each source, there will be listed the name of the # source file directory starting in column 2, followed # by other information starting in column 3 # # Source file name (starting in column 2) # # 1. Formal name of the source # 2. Data stage: 0 = stage1 in progress # 1 = stage1 finished and/or stage2 in progress # 2 = stage2 finished and/or stage2 checking # in progress # 3 = stage2 checking finished and/or preparation # of release files in progress. (e.g. adding # tags, checking release files, etc.) # # Greater than 3, this number is a set of flags # 0x04 = MUSED release ready # 0x08 = MIDI0 release ready # 0x10 = MIDI1 release ready # 0x20 = MIDIP release ready # 0x40 = KERN release ready # 0x80 = DARMS release ready # 0x100 = SCORE release ready # # 3. Number of copies released # 4. Number of movements in this work (in this source) # 5. and up: names of the files containing these movements # Following the file names can be any other information # which helps identify the movement. In general, we will # not be releasing specific movements of works separately. # # Source file name (etc.) # # # The last line in the index file contains the word "END" beginning # in column one. # #0001 # Cantata No. 1: Wie Sch”n Leuchtet der Morgenstern # 1 source # BG/CANT # Bach Gesellschaft Edition i,1 # 0x30 MIDI1 and MIDIP releases ready # 0 # 6 Movements # 01 # 02 # 03 # 04 # 05 # 06 # #0002 # Cantata No. 2: Ach Gott, vom Himmel sich darein # 1 source # BG/CANT # Bach Gesellschaft Edition i,2 # 0x30 MIDI1 and MIDIP releases ready # 0 # 6 Movements # 01 # 02 # 03 # 04 # 05 # 06 #