new books list for your opac: shareware that’s worth every penny!

40
New Books List for your OPAC: Shareware that’s worth every penny! Debbie Morrow Automation Librarian Grand Valley State University GLUGM 2002, Fri. October 4 ISU, Terre Haute IN

Upload: ziarre

Post on 06-Jan-2016

30 views

Category:

Documents


0 download

DESCRIPTION

New Books List for your OPAC: Shareware that’s worth every penny!. Debbie Morrow Automation Librarian Grand Valley State University GLUGM 2002, Fri. October 4 ISU, Terre Haute IN. New Books List: The Concept. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: New Books List for your OPAC:  Shareware that’s worth every penny!

New Books Listfor your OPAC: Shareware that’s worth every penny!

Debbie MorrowAutomation LibrarianGrand Valley State University

GLUGM 2002, Fri. October 4ISU, Terre Haute IN

Page 2: New Books List for your OPAC:  Shareware that’s worth every penny!

New Books List:The Concept

Michael Doran’s “New Books List” is, in part, a bit of clever window dressing – what in French is called trompe l’oeil …

Page 3: New Books List for your OPAC:  Shareware that’s worth every penny!

… or “fools the eye”!

Page 4: New Books List for your OPAC:  Shareware that’s worth every penny!

New Books List:The Concept

It looks like part of Voyager, but it really isn’t … it’s just a little bit of extra programming that you can drop in place to dress up your Voyager catalog. And it doesn’t cost anything!

Page 5: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:A note about versions

GVSU has implemented the 4.0 version of the New Books List on our SUN Unix server. Since then, Michael Doran has released version 5.0, which primarily introduces a multilingual interface capability; and also a Windows server version.

We’ll be looking at the Unix installation, and focusing on those aspects which 5.0 has in common with 4.0.

Page 6: New Books List for your OPAC:  Shareware that’s worth every penny!

Adding ‘New Books List’requires …

• Michael Doran’s website

• newbooks.pl

• newbooks.cgi +

• opac.ini

• webvoy.htm

a little ingenuity!

newbooks.ini

newbooks.[language]

Page 7: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:Michael Doran’s website

The place to begin is:

rocky.uta.edu/doran/autolist/

Here you’ll find out about Michael Doran (Systems Librarian, University of Texas at Arlington), the current version of his program, how to download it to your server, installation tips, etc.

Page 8: New Books List for your OPAC:  Shareware that’s worth every penny!
Page 9: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:Getting the goodsFind the rocky.uta.edu/doran/autolist/INSTALL.unix.txt document on the website, and read it all the way through. All the basic information you need is included in

• Prerequisites• Installation scenarios• Installation steps• Testing and configuration steps• Free Advice• Mailing list• Bug reports• Support

Page 10: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:Getting the goods (cont.)

Using the ‘Download’ link, get the file

newbooks-5.0.tar.gz

onto your PC, then FTP it to your Voyager server – a directory such as /m1/incoming/newbooks/ is convenient.

Follow the directions to unzip and distribute the files on your server.

Page 11: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:Testing …

After you’ve followed the initial ‘Installation steps,’ you’re ready to get down to business:

Follow the directions in ‘Testing and configuration steps’ to:

• 1) Do a pre-configuration test, and

• 2) Generate your own data

Once you have newbooks.pl working, make it a Voyager cron job that runs once a day. –This was the only step where I needed the assistance of our Unix system administrator!

Page 12: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:… and configuration

Finally, the fun part!

Once you know that the “out of the box” version of the cgi script works on your server, and that the Perl script can successfully extract data from your Voyager database, you can get down to the real fun of doing your own customized Voyager New Books List trompe l’oeil …

Page 13: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:newbooks.pl

newbooks.pl (executable program)

• A Perl program that extracts "new books" data from your Voyager database and outputs a newbooks.txt file.

One of the wonderful features of Michael Doran’s add-on program is the care that he’s taken with internal documentation. Even a novice or non-programmer can read through his code and make some sense out of it. Let’s take a look at ‘newbooks.pl’ –

Page 14: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:newbooks.pl (cont.)

The INSTALL doc directs you to edit the configurable elements of newbooks.pl, selecting the desired options for your site.

Comments in the code, often quite detailed, provide hints and tips.

= gvsudb

Page 15: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:newbooks.pl (cont.)

Following the section with configuration options, there’s nothing else you must do here – and you may not want to try!

However, for the adventuresome …

Page 16: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:newbooks.pl (cont.)

GVSU wanted to offer intervals of a few weeks, up to 16 weeks or a full semester – not just a choice of some weeks or months.

Changing the number of days in the calculated interval for “weeks” accomplished this.

127

134

Page 17: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:newbooks.pl (cont.)

At GVSU, we store our 856 “Linked Resources” in our Bib records, rather than in our MFHDs as UTA has done.

In 5.0 there’s a configuration option to handle this; in 4.0 Michael Doran helped me with a change to the SQL query which selects new items from the local database.

#################################### ConstructSQL##################################### This routine returns an SQL query according to which# option was selected in the configuration section.

sub ConstructSQL { my ($sql_pass) = @_; # The SQL option "choice" is an artifact of previous # versions. This SQL query's embedded logic as to # "what constitutes a new item" should be adequate # for all sites. If it isn't, you may create your # own; however, it must output the same fields in # order for the newbooks.cgi to utilize it. -mdd # 2/27/02 Two lines modified in SQL pass 2 per MDD # in order to find e-links in BIB, not MFHD -dmo my $date_condition_one = &SetInterval("one"); my $date_condition_two = &SetInterval("two"); if ($sql_pass eq "1") {

return ("select distinct $db_name.bib_text.isbn, $db_name.bib_text.author, $db_name.bib_text.title, …

Page 18: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:newbooks.cgi, etc.Once you have the newbooks.pl program working and customized, the next step is setting up the configuration files and customizing the newbooks.cgi script that controls the interface your users see on the screen …

Page 19: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:newbooks.cgi, etc. (cont.)

newbooks.cgi (executable program)• A CGI/Perl program that displays the initial New

Books search form, and then displays the results pages from user searches.

+ newbooks.ini (configuration file)• This file (new in 5.0) contains configuration variables

that are used to customize the newbooks.cgi program.

+ newbooks.English/other lang. (language modules)

• These files (new in 5.0) provide the language of the user interface. Only one language module is required, but all modules can be utilized if desired.

Page 20: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:newbooks.cgi

# * * * * * * * * Edit below to customize * * * * * * # * * * * * * * * for your site. * * * * * * # * * * * * * * * * * * * * * ################################################################ Editorial: Version 4.0 offers many new options for customization. # The original idea for the New Books List was that it be a rather# minimalist solution. However, I've discovered that minimalism is# not a universal preference. I hope that people who install this# program keep in mind usability for library patrons when deciding# how many of the extra "bells and whistles" to use. Simplicity (and# restraint) can often be a virtue. :-)

# * * * * * * * * No editing required! * * * * * * * *# * * * * * * * * * * * * * * * * ############################################## The New Books List can be customized by editing newbooks.ini and # the appropriate language module(s). There shouldn't be any need # to edit this program.## However, if you are a Perl programmer or just adventuresome, then # by all means have a go. Commenting is minimal - if you don't# understand what the code does, chances are you don't want to mess # with it. :-)

.cgi

Version 4.0

.cgi

Version 5.0

In version 5.0 basic configuration is done in the .ini file and the language file(s) …

Page 21: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:newbooks.ini

The .ini file includes most of the configuration choices that you can make. Again, the choices are thoroughly documented, including interactions with the .pl file.

Page 22: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:newbooks.ini (cont.)

$body_background = "/images/ivory.jpg";

The ‘Colors’ stanza in newbooks.ini is what makes the “New Books” search screen look just like part of your WebVoyáge – spend some time getting this right!

GVSU’s OPAC includes a background JPEG, ivory.jpg, which is added in here.

Page 23: New Books List for your OPAC:  Shareware that’s worth every penny!

The language configuration files, newbooks.English, etc., allow you to customize all the values for any textual labels, etc.

For example, the $short_blurb text value

is customized at GVSU to read as follows:

‘New Books List’:newbooks.[language]

$short_blurb = "Books, Internet resources,<br />etc. recently added to<br />the GVSU Local Catalog.";

Page 24: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:newbooks.cgi (reprise)

For the adventuresome, more serious customizing may involve studying and changing code in newbooks.cgi – cautiously!

A big part of the .cgi program is HTML code defining the appearance of the search and results screens. We wanted to make some minor changes:

• At GVSU, we wanted to search by intervals of 2 weeks, 4 weeks, 2 months (8 weeks), or 4 months (16 weeks).

• And we wanted to add some elements to the display of the “hit list” resulting from a search.

Page 25: New Books List for your OPAC:  Shareware that’s worth every penny!

################## NewSearchForm #################--code omitted--<td valign="top" width="30%">

<font color="$active_font_color"><b>&nbsp;&nbsp;$display_interval_label</b></font><br /> &nbsp;&nbsp;<select name="week" size="4"> <option selected="selected" value="1">$last_text $interval</option> <option value="2">$last_text 2 $interval_plural</option> <option value="3">$last_text 3 $interval_plural</option> <option value="4">$last_text 4 $interval_plural</option> </select> </td>

Changing the search intervals menu

# Intervals of weeks or months ###################### This value is set in newbooks.ini.if ($interval eq "month") { $interval = "month"; $interval_plural = "months";} else { $interval = "week"; $interval_plural = "weeks";}# This goes in the period box of the form$last_text = "last";

# English interface # Form labels $select_location_label = "Select Location:"; $display_interval_label = “Display:"; $sort_by_label = "Sort by:"; $search_for_label = "Search for: (optional)";

Values encoded in the .cgi are defined in the .ini and .[language] files, and control the screen display.

.cgi

.english

.english

Page 26: New Books List for your OPAC:  Shareware that’s worth every penny!

################## NewSearchForm #################--code omitted--<td valign="top" width="30%">

<font color="$active_font_color"><b>&nbsp;&nbsp;$display_interval_label</b></font><br /> &nbsp;&nbsp;<select name="week" size="4"> <option selected="selected" value=“2">2 weeks</option> <option value=“4">4 weeks</option> <option value=“8">2 months</option> <option value=“16">4 months</option> </select> </td>

Changing the search intervals menu

Changed to “20%”, to size the menu properly after deciding text

# Intervals of weeks or months ####################### This value is set in newbooks.ini.if ($interval eq "month") { $interval = "month"; $interval_plural = "months";} else { $interval = "week"; $interval_plural = "weeks";}# This goes in the period box of the form$last_text = "last";

For our purposes, the variables didn’t work, so we substituted fixed text.

Page 27: New Books List for your OPAC:  Shareware that’s worth every penny!

# NewSearchForm #################--code omitted--<td valign="top" width=“20%">

<font color="$active_font_color"><b>&nbsp;&nbsp;$display_interval_label</b></font><br /> &nbsp;&nbsp;<select name="week" size="4"> <option selected="selected" value=“2">2 weeks</option> <option value=“4">4 weeks</option> <option value=“8">2 months</option> <option value=“16">4 months</option> </select> </td>

Changing the search intervals menu (cont.)

Earlier on in the script the variable $date_range is associated with an HTML ‘form’ tag “name=” element:

my $date_range = $formdata{'week'};

A “value=” element combined with name=“week” in this HTML ‘select’ tag is submitted when the user searches. Later in the .cgi, in the ReturnList section, records of the right age are selected:

if ( $week <= $date_range )

Page 28: New Books List for your OPAC:  Shareware that’s worth every penny!

Changing the search results list

Page 29: New Books List for your OPAC:  Shareware that’s worth every penny!

Changing the search results list (cont.)

While implementing the New Books List, I looked at many of the other Voyager OPACs where it had been added, and collected ideas here and there.

Adding the .gif with the key to the Amazon and Barnes & Noble buttons was easy, after borrowing newbna3.gif from University of Rochester’s New Books screen.

Page 30: New Books List for your OPAC:  Shareware that’s worth every penny!

But to add the buttons and links to each line with an ISBN that could be searched on, I contacted University of Rochester and asked if they’d be willing to share their code.

Once I had a copy of Rochester’s .cgi, it wasn’t too hard to figure out what section to copy into our own – and learn a few more HTML tricks!

Page 31: New Books List for your OPAC:  Shareware that’s worth every penny!

The additional code looks at each entry retrieved from newbooks.txt. If there’s an ISBN, it displays a .gif (src=/images/newbna2.gif) in the box with the line number. Clickable areas in newbna2.gif are mapped to links which do ISBN searches in the BNA and Amazon databases, so that users can get to reviews and excerpts of the new titles.

http://search.barnesandnoble.com

Page 32: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:opac.ini (Voyager)opac.ini (configuration file)

This Voyager file contains configuration variables that are used to customize your library’s WebVoyáge.… In a nutshell, you just need to do the following edit in opac.ini to tack the additional tab on after the Course Reserve tab on your search screens, inserting your OPAC’s colors:

[Course_Reserve_Search_Page]

–-lines omitted–-

Tab_Text=Course Reserve</a>&nbsp;</font>&nbsp;</th></tr></table></td>

<td>&nbsp;&nbsp;</td><td><table border="0" cellspacing="0" cellpadding="0">

<tr><th nowrap bgcolor="#336699">&nbsp;<font color="#ccffff">&nbsp;<a style="color:#ccffff" href="/cgi-bin/newbooks.cgi">New Items</a>

Page 33: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’ at GVSU – Voyager … Before:

Page 34: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’ at GVSU – Voyager … After! :

Page 35: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:webvoy.htm (Voyager)

webvoy.htm (HTML file)

This HTML file is the “front page” to your library’s WebVoyáge, and can be entirely customized.

Chances are, your Voyager site has in some way customized or completely recreated this page already. At GVSU, we just added another section to our webvoy.htm page, with a ‘New Items’ link

Page 36: New Books List for your OPAC:  Shareware that’s worth every penny!
Page 37: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:Examples from other libraries

Looking for ideas and code to borrow is easy – Michael Doran asks new sites to send him links to add to this list of NBL users.

Page 38: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:Examples from other libraries

• Put links to your New Books List (and your OPAC) in other places, like on your library’s main web page:

Page 39: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:Examples from other libraries

• Put links to your New Books List (and your OPAC) in other places, like on your library’s main web page:

Page 40: New Books List for your OPAC:  Shareware that’s worth every penny!

‘New Books List’:Examples from other libraries

• Put links to your New Books List (and your OPAC) in other places, like on your library’s main web page: