Access Keys:
Skip to content (Access Key - 0)
My Area (Access Key - 2)


Toggle Sidebar
Your Rating: Results: PatheticBadOKGoodOutstanding! 0 rates

Labels

aleph aleph Delete
photos photos Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Linking patron photographs named with additional ID numbers

Tags: ,
Last Updated: Jul 16, 2010 12:47


  • Description

    Patron photographs in Aleph have to reside in the ADMLIB/bor_pics directory and are named after the Aleph internal patron ID. Often there is a need to import photographs from another system. This script searches for photographs whose names are based on alternative IDs held on the Aleph patron records, and creates symbolic links in bor_pics to make them available in Aleph.


  • Author: Matthew Phillips
  • Additional author(s):
  • Institution: University of Dundee
  • Year: 2010
  • License: GNU Public General Licence
  • Skill required for using this code:
    intermediate

State

Stable.

Programming language

Perl.

Software requirements

None.

Download

Please download the attached zip file.

Installation instructions

Instructions are in comments in the script itself. The script will need a little customisation for use elsewhere than at University of Dundee, but I have tried to keep this to a minimum.

A bit of background as to how we use it at Dundee might be of help in deciding whether this script will be of use to you. In our patron records we store additional IDs (type 02) which can be a matriculation number (a nine-digit ID assigned to students) or a staff ID (an alphanumeric code). We have a directory containing all the student pictures mounted via NFS on our Aleph server. The filenames are of the form nnnnnnnnn.jpg where nnnnnnnnn is a student matriculation number.

The script searches for all the Aleph patrons and reads their additional IDs. It looks in the NFS-mounted directory to see if there is a photo for the patron. For example Aleph patron ID345 might have matriculation number 100023456. If there is a photo called 100023456.jpg then the script creates a symbolic link in Aleph's bor_pics directory. The link file is called ID345.jpg and points at 100023456.jpg in the NFS mount. Thus the photo appears on Aleph.

The script cleans up links for patrons who have been deleted, and links which no longer resolve. Various reports can be produced of faulty additional IDs and patrons where no photo can be found.

We run the script daily in the job list.


Comments

Text...

Page Attachments

File NameCommentSizeNumber of Downloads
Photos.zipZip file containing Perl script19 kB9

Added by Matthew Phillips on Jul 16, 2010 12:39, last edited by Matthew Phillips on Jul 16, 2010 12:47

Adaptavist Theme Builder Powered by Atlassian Confluence