FAQs: The Batch Photo Import Utility

What do I need to use the Batch Photo Import utility?

The Batch Photo Import Utility reads in input files which contain information that associates users with photos. You will need to create an input file with this information to use the utility.

What file types are acceptable as input for the utility?

The utility reads files in plain text format. Any file type that can be read in as plain text can be used as input.

What kinds of photos can I use in the input file?

Photos must meet the following criteria to be used as input for the Batch Photo Import utility.

Must be in a JPG, BMP, PNG, or GIF file format
Must be accessible via a local file path or a URL

The utility will convert the images to the JPG format, resize them (if necessary), and compress them to an appropriate size before saving them to the server.

SirsiDynix Symphony resizes user photos any larger than 100 pixels by 100 pixels to fit these dimensions. SirsiDynix Symphony resizes user signatures any larger than 240 pixels by 40 pixels to fit these dimensions.

It is highly recommended that user signature images are black and white to avoid compromising image quality.

What information needs to go in the input file and how should I format it?

Each line in the input file should contain the information necessary to associate a user with a photo as well as information the utility will use to retrieve the photo.

One line in the input file corresponds to one user. For loading photos, each line should have three fields, with each field separated by a pipe character (|); for loading signatures, each line should have four or five fields. The following information should go in each respective field.

The first field should contain the ID type you want to use to identify the user. You can use user IDs, alternate IDs, or Web Auth IDs. You can vary which ID types you use between users if you want. The following are the entries you should use for each ID type.
USER_ID for user IDs
USER_ALT_ID for alternate IDs
USER_WEBAUTH_ID for Web Auth IDs
The second field should contain the corresponding ID string for the user, depending on which ID type you use in the first field.
The third field should contain an absolute or relative local file path to an image file, or an image URL. The utility accepts images in the JPG, BMP, PNG, and GIF formats.
If you plan to load user signature images, the fourth field should contain the word SIGNATURE to indicate to SirsiDynix Symphony that the image is a signature and not a user photo. If you are not loading a particular image as a user signature, this field is not required.
If you plan to load user signature images, the fifth field can contain a custom time stamp value. SirsiDynix Symphony will draw and append the value of this field to the bottom of the image. The character limit for this field is 20; exceeding this limit may cause the image of the time stamp to appear cut off.

The following is an example of a line that can be used in the input file.

USER_ID|200000109928|C:\users\photos\photo1034.jpg

The following is an example showing contents of an input file. One line corresponds to one user.

USER_ID|200000109928|C:\users\photos\photo1034.jpg

USER_ALT_ID|100000101111|C:\users\photos\photo1011.jpg

USER_ID|200000109930|http://www.batchphoto.com/photo.jpg

USER_ID|200000109931|C:\users\photos\photo1111.png|SIGNATURE

USER_ID|200000109932|C:\users\photos\photo1122.png|SIGNATURE|30/10/2014

The Batch Photo Import utility treats lines beginning with a pound character (#) as comments and ignores them. The utility also ignores blank lines.

For lines specifying user photos, the utility also ignores any extra fields after the first three fields. For lines specifying user signatures, the utility ignores any extra fields after the fourth field or the fifth field, if it exists.

SirsiDynix recommends that you import no more than 10,000 photos or signatures per batch.

What information is included in the Batch Photo Import utility output file?

When the utility finishes loading a batch, a Batch Load Finished dialog box appears. This dialog contains information about the number of photos that were successfully loaded as well as the number of photos that failed to load.

If you want to view and save the output file generated by the utility in a text editor, click View Results. The output file lists the users whose photos or signatures were imported successfully as well as those that failed, along with a reason. Any lines that the utility did not read in from the input file are also listed.

WorkFlows saves all output files generated by the Batch Photo Import utility to \Workflows\tmp. This directory is cleared each time you exit the WorkFlows client, so if you wish to keep any of the output files, you should save them to another location.

The application WorkFlows uses to display the output file is determined by what is selected for the Application to View Reports Field in the Report Session Wizard. If the input for this field is invalid or blank, the View Results button does not appear.

The following is an example of an output file that is created by the Batch Photo Import utility.

# Batch Photo Load Tool Output

# 9 photo(s) imported successfully.

# USER_ID|FIRST|http://batchphoto.com/photo1.jpg

# USER_WEBAUTH_ID|SECOND|http://batchphoto.com/photo2.jpg

# USER_ID|2001|http://batchphoto.com/photo2001.jpg

# USER_ALT_ID|900|http://batchphoto.com/photo900.jpg

# USER_WEBAUTH_ID|100|http://batchphoto.com/photo100.jpg

# USER_ID|2001B|http://batchphoto.com/photo20012.jpg

# USER_WEBAUTH_ID|WEB|http://batchphoto.com/photo101.jpg

# 2 signature image(s) imported successfully.

# USER_WEBAUTH_ID|WEB2|http://batchphoto.com/photo1011.jpg|SIGNATURE

# USER_ID|2011|http://batchphoto.com/photo2011.jpg|SIGNATURE

# 2 line(s) failed to be read.

This line is malformed

USER_ID|TOO_FEW_FIELDS

# 2 line(s) did not contain a valid URL or file path to an image.

USER_ID|BADURL|batchphoto.com

USER_ID|BADFILE|BatchPhotoScript.txt

# 1 user(s) were not found.

USER_ID|BADUSERID|http://batchphoto.com/photo1000.jpg

The utility did not save some of my photos to the server. Can I run the utility again with the same input file?

Yes, you can use the same input file again to load photos that were not loaded previously.

You can also use an output file that the utility created for a previous batch load process. In addition to listing the users whose photos were imported successfully as well as those that failed, the output file also lists the lines that the utility did not read in from the input file. All of the lines in the output file except for any unread lines copied in from the input file are commented out with a pound character (#). The utility ignores lines that begin with a pound character, so you can use the output file as an input file to load the photos that the utility did not load previously. This can be a time-saving option if you had to interrupt the batch load process or correct lines in the input file that were not formatted correctly.

I have user photos located in the /Unicorn/Custom/Photos directory. What do I need to do to have the photos show in WorkFlows?

The movePatronPhotos script, which converts existing user photos located in the /Unicorn/Custom/Photos directory into the format used by WorkFlows, is delivered with SirsiDynix Symphony 3.7.1 and is executed along with the initial upgrade.

Note that existing photos must meet the following criteria in order for the script to properly modify the photos.

Must be in a JPG or GIF file format
Must be 8 KB in size or smaller

The movePatronPhotos script does not resize images, so it is recommended that user photo images be 100 pixels by 100 pixels or smaller for the best results.

If you have already performed the initial service pack upgrade but your existing photos were unaffected, it is because the photos did not meet the criteria listed above. If you want, you may edit your photos to meet the above criteria, then execute the script again. If you are interested in executing the movePatronPhotos script again for your site, contact SirsiDynix Customer Support.

Related topics