Tech Blog

Converting patrons data into Alma’s xml format

This is a manual “step-by-step” procedure that you can simplify or automate (i.e. with cron scripts) at various stages.

We receive the patron data from a system called S3 (or ESSE3) in excel file:

but you can use any equivalent SIS that permits to extract your desired data in xls or csv format. The fields of our xls are the following:

Italian nameTranslationPerl array variable inside the scripts
tipouser typevalue NOT used inside the script, it’s only useful to understand the pl script we should use
email uniudinstitutional email$Campi[0]
nomefirst name$Campi[1]
cognomelast name$Campi[2]
sessogender$Campi[3]
data nascitabirth date$Campi[4]
indirizzo residenzastay address$Campi[5]
numero residenzastay number$Campi[6]
comune residenzastay city$Campi[7]
provincia residenzastay country$Campi[8]
cap residenzastay PO box$Campi[9]
nazione residenzastay nation$Campi[10]
indirizzo domiciliodomestic address$Campi[11]
numero domiciliodomestic number$Campi[12]
comune domiciliodomestic city$Campi[13]
provincia domiciliodomestic country$Campi[14]
cap domiciliodomestic PO box$Campi[15]
nazione domiciliodomestic nation$Campi[16]
mail alternativaalternate mail$Campi[17]
tel residenzahome phone$Campi[18]
tel domiciliodomestic phone$Campi[19]
cellularemobile phone$Campi[20]
codice fiscalefiscal code$Campi[21]
matricolastudent/personal ID$Campi[22]
usernameusername for aouthentication$Campi[23]

We delete the first column (user type), the first line (the names of the fields), and save the data in UTF-8 csv format with TAB separator:
Than we use the following perl scripts in order to extract a valid xml for Alma:

Note:

  • The scripts are commented in Italian but the syntax is clear & simple.
  • The scripts use statistical categories according to our University’s setup, so obviously they should be personalized according to each institution’s needs.
  • In particular on the graduates script (laureati.pl) we set the expiry_date and the purge_date 366 days before the launch of the script, so we can use a very large “grace period” whn purging the patrons

3 Replies to “Converting patrons data into Alma’s xml format”

Leave a Reply