User Tools

Site Tools


quality_control-halpern

Halpern Photograph Quality Control

Procedure

When a group of photos has been finished, do the following:

  1. Run the image processor script in Photoshop to add LZW compression.
  2. Run the checkimages utility with your desired dpi and correct any issues with the images.
  3. Run the mods -c utility and correct any metadata issues.
  4. Run mods -Iwu to add item IDs and urls to MODS records.
  5. Move entire completed folder to the appropriate directory on oubliette via FTP. Change permissions of files after they load into oubliette.
  6. Delete box from the Y:\scans\mufs001 (halpern) directory.

Utilities

checkimages

Usage:

This script is used to quality control tiff images. To run the script type the following in the directory of images you would like to check:

checkimages 300 *.tif

If any images are not 300 dpi or compressed with LZW, their filenames will be printed out. This script checks the image's EXIF metadata. If for some reason the image EXIF cannot be read, the script will tell you and the image will have to be quality controlled manually. If an image is not compressed with LZW, it will copy the image to u:/image_sandbox/compress. This will allow you to run a Photoshop batch process to compress the files. For images that were not scanned at 24-bit color, it will copy the images to u:/image_sandbox/bitdepthissues. :!: Make sure you create these directories on your u drive before you run the script for the first time.

If you want to check against a different resolution, simply change the first argument:

checkimages 600 *.tif
checkimages 2300 *.tif

This script offers several other image qc features.

mods

Usage:

mods provides a variety of tools to quality control MODS records. Examples of the most common uses are:

The -c option checks all the MODS records in a given directory to see if there is missing text and then prints the element and filename for the suspect record. The final argument is the starting directory. This script will recursively go through all subdirectories of the starting directory.

mods -c .

The -Iwbu options automatically add the item ID, box numbers, and URLs to MODS records:

mods -Iwbu .

To make a global change to the text value of an element, use the -e option. You'll have to also use the -x option to specify an XPath expression for the element you want to edit. NB, the -w option will write over the original file with the edited version. Make sure you test your script well before set it loose on an entire set of records. You will need to use NetDrive to access the server to make changes. It's also a good idea to ask Aaron Addison to run a back-up of oubliette before you make a massive change:

mods -w -e "New element text" -x "/mods:mods/mods:accessCondition[@type='Use and reproduction']" .

You can also do a search and replace, editing only the text values that match your search:

mods -w -r "Du Bois" -S "DuBois" -x "//mods:namePart[@type='family']" .

This search and replace will look for every <namePart> with Willie's family name misspelled and replace it with the properly spaced version.

To add an element use the -a command. Create the element exactly as you want it to appear in the records. You don't need to add the mods prefix to the elements, that will be done automatically. Add the -w to overwrite the existing file at the beginning of the command. If you want to put the element somewhere specific in the record, you'll have to pass the element index to -i, otherwise it will insert the element at the bottom of the record. The index count probably starts at 0 so titleInfo would be 0, name would be 1, and so on. Make sure you test the script on a small amount of records before setting it loose on a bunch.

mods -w -a "<relatedItem><identifier>mums312-s01</identifier></relatedItem>" -i 16 .

There are more options as well but they get a little tricky so stick with the ones listed unless you feel like fearlessly exploring. You can type mods -h to get a full set of options.

quality_control-halpern.txt ยท Last modified: 2019/11/19 18:50 (external edit)