Add index terms to master files
Adding index terms to the master files
TEI documents have a header section that holds metadata about the document contents. We need to create new elements in the header to hold the index terms by running a specialized Python script to populate the header of each file with the index terms.
-
Run addMetaData.py.
- Provide the edition number (1 or 2 digits) when requested.
- Provide the letter name when requested.
-
Review the input and output directory names and confirm
y if correct. The script uses the edition/letter
information to locate the TEI files in the entry and csv files in the
metadata directories. When finished, it will output a new
version of the TEI file to the corresponding location in the
master directory.
input folder is: outputs/entry/eb03/A metadata folder is: outputs/metadata/eb03/A output folder is: outputs/master/eb03/A - The script adds the data in the HIVE2 output files (kp*_md.csv) to the TEI Header of the corresponding XML file in the entry directory and saves the modified file in the master directory. It appends an m to the base filename to indicate that the file includes subject metadata.