One of the new features implemented in the 3.4 release is the ability to use the 856$u field to store a URI that points to an image file, and display the image rather than standard or optional link text (see bug 5738). This feature is turned on by a system preference, but is also controlled at the record level by the contents of the corresponding 856$q field. If the 856$q field is empty or does not have a valid MIME type entered in it the corresponding 856$u field will not be displayed as an image regardless of the system preference setting. A script is needed that will read the contents of each of the 856$u fields looking for one of the valid MIME type extensions at the end of the file name (bmp, cod, gif, ief, jpe, jpeg, jpg, jfif, png, svg, tif, tiff, ras, cmx, ico, pnm, pbm, pgm, ppm, rgb, xbm, xpm, xwd), check to see if there is a corresponding 856$q field, and populate it accordingly or create a new 856$q field if one doesn’t exist. Options passed to the script should allow for the 856$q field to be left unchanged if it is not empty, or to be overwritten regardless of content if a valid MIME extension is found in the corresponding 856$u field. I have been working on this script but find myself out of my depth, and have other commitments I must turn my attention to. If any of you experienced Koha perl coders is willing to do this I will be happy to do the testing and sign off work. Thanks - Doug
Wondering if this would be useful as a catalouging plugin/value builder too.