Tech Blog

Database A-Z List

  • Description

Perl script to extract a list of database from Metalib and generate HTML files containing an A-Z list.  HTML files are generated for each index letter A-Z and an index page containing all of the databases.

  • Author: Matthew Robinson
  • Institution: Curtin University of Technology
  • Year: 2010
  • License: GNU General Public License v3
  • Short description: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  • Link to terms: http://www.gnu.org/licenses/gpl-3.0.txt
  • Skill required for using this code: Intermediate

State

Stable

Programming language

perl, SQL

Software requirements

perl, DBI, DBD::Oracle, HTML::Template

Author(s) homepage

http://library.curtin.edu.au

Download

dblist.tar.gz

Working example

The following shows the output of these scripts with the addition of Curtin University Library branding:

http://apps.library.curtin.edu.au/dblist/dblist_a.html

Changes

Version 1.0

This script has been used in production at Curtin University Library for several years without any issues.

Installation instructions

Extract the contents of the tar file and place the dblist.pl file on the server where you wish to generate the A-Z list HTML files.  You probably want to change the owner of the file.   Modify the constants at the top of the file to match your institutions Oracle connection details and to specify the output directory for the HTML files.

Add the script to your crontab so that it runs once a day (or whatever period you feel is appropriate).

The HTML layout is defined in the HTML template at the end of the file.  You can add your institutions branding to this template.

View the code here.

Leave a Reply