Presentation is loading. Please wait.

Presentation is loading. Please wait.

Featured Item Lists for the Non-Programmer Bob Duncan Lafayette College.

Similar presentations


Presentation on theme: "Featured Item Lists for the Non-Programmer Bob Duncan Lafayette College."— Presentation transcript:

1 Featured Item Lists for the Non-Programmer Bob Duncan Lafayette College

2 Featured Item Lists for the Non-Programmer …how to look like an expert without really being one…

3 http://www.lafayette.edu/ ~library/bd/iugdc All scripts and instructions are available from the above site. Expect a redirect to a different address sometime prior to September 2008.

4 4 NOTICE: My PowerPoint presentations are not intended to stand alone absent my commentary and occasional witty banter:  Some slides may not make sense.  Some slides may be totally meaningless.  Some slides won’t make sense in printed form. Feel free to email me for clarification on any of the information herein.

5 5 Example of script Web page output

6 6 Example of script feed output

7 7 Example of feed source code

8 8 Example of feed in FeedReader

9 9 Using III feed token to group feeds

10 10 Using III feed token to include feed

11 11 III feed token in source

12 12 History Acq.pl  Yuan Yao and Xiaowen Huang – 1999 (?)  III review file → items listed by subject heading Can be nasty looking Loss of context (“Brain” far from “Neuropsychology”) Acq.pl a la Bob  III review file → Word macro → items grouped by requesting department/program  III review file → items for a location, type, etc.  III review file → items listed by call number

13 13 Current NewAcq.pl  Based on Acq.pl  Perl regular expressions replace Word macros  III review file → items grouped by subject RSS feeds by subject  Extensible Easily customized No Perl knowledge required

14 14 External script vs. III “Featured Lists” Advantages  You decide: what to present how to present it  Free up lists (use one list for multiple subjects/feeds)  Retain historical lists (if desired)  RSS feeds (if desired) Disadvantages  File management  Need to remember to do things

15 15 Basic Requirements Perl “distribution”  ActiveState.com – ActivePerl Web Server to display results  Non-III preferred Separate directory for feeds  III will suffice Call numbers that indicate something Someone working in Cataloging

16 16 Handy tools Create Lists familiarity Email access  III review file “listed” to email Good text editor  Notepad++ Good FTP client  FileZilla Techno freedom

17 17 Component activities III-based activities  Generate the review file  List the data Local activities  Get the data  Run the script Edit once  Proofread the results  Serve the results

18 18 III-based activities Generate the review file (Lafayette specific) LINKED REC exists to ITEM BCODE3 equal to “-” PUBLISHER not equal to “” TITLE At Least one Field doesn't have “electronic resource” MARC Tag 035 All Fields don't have “ssj” Above criteria saved as Saved Search CAT DATE between “ - - “ and “ - - “ Range of records: ~70,000 (Lafayette specific) Sort by title

19 19 III-based activities, cont. List the data Call # TITLE PUBLISHER Call # RECORD # 2 blank lines between Do not number records Each field on new line Display labels No uppercase titles

20 20 CALL # = PS3569.L695 A64 2000. TITLE = Abe : a novel / Richard Slotkin. PUBLISHER = New York : H. Holt and Co., c2000. CALL # = PS3569.L695 A64 2000. RECORD # = b17244067. CALL # = N72.H63 G63 2007. TITLE = Abstraction and the Holocaust / Mark Godfrey. PUBLISHER = New Haven [Conn.] ; London : Yale University Press, c2007. CALL # = N72.H63 G63 2007. RECORD # = b17240657. Script depends on this format: If your field labels are different, the script or the input file will need to be edited!!! At least two lines between records is required!

21 21 III-based activities, cont. “Print” to email  Consider diacritics issue Script will convert III {diacritics} to HTML character entity references No print to email?  Export solution in the works Nothing else to say on a slide?  Just add a bullet point …or two  …or three

22 22 Local activities Customize the Perl script(s)  Should be one time deal Receive the email  Save as text file Run the Perl script Proofread the output FTP the file(s) Look like a genius

23 23 Local activities – customize script(s) NewAcq_container.pl  Code for top / bottom of Web page List of items appears between NewAcq_call2subject.pl  Converts call numbers to subjects Edit only if more than DDC and/or LC NewAcq.pl  The big enchilada Library-specific variables

24 24 Local activities – customize script(s) NewAcq_container.pl  Code for top / bottom of Web page Perl subroutines are called by the main script  Content appears in element between the header code and the footer code sub insert_header { print OUT < { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/14/4221877/slides/slide_24.jpg", "name": "24 Local activities – customize script(s) NewAcq_container.pl  Code for top / bottom of Web page Perl subroutines are called by the main script  Content appears in element between the header code and the footer code sub insert_header { print OUT <

25 25 NewAcq_container.pl subroutine for footer sub insert_footer { print OUT < { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/14/4221877/slides/slide_25.jpg", "name": "25 NewAcq_container.pl subroutine for footer sub insert_footer { print OUT <

26 26 Local activities – customize script(s) NewAcq_call2subject.pl  Converts call numbers to subjects Perl subroutines are called by the main script  Edit only if you have call numbers in addition to DDC and/or LC, e.g., “Fiction” or “Juvenile”  Basic regular expression syntax: s/ find this / replace with this /g; Literal strings and wildcards s/\n\nCALL # = AV:.*\n/SUBJECT = Videos/g; s/\n\nCALL # = FICTION.*\n/SUBJECT = Fiction/g;

27 27 NewAcq_call2subject.pl subroutine for special call numbers

28 28 Local activities – customize script(s) NewAcq.pl  The big enchilada Library-specific variables  Basic syntax: $VariableName = “TextString” ; $VariableName = Numeral ;  Examples: $inputfile = "newacq_LC.txt" ; $catlink = "Full Catalog Record." ; $displaycallno = 0 ;

29 29 NewAcq.pl Library-specific variables

30 30 Library-specific variables – FILES $inputfile  Path/name of text file from III $outputfile  Path/name of the Web page that will be created $pagetitle  Title of the Web page $localfeedsdir  Path to the folder on the local computer where the feed files should be created

31 31 Library-specific variables – FEEDS $wantfeeds  Do you want to create feeds? $feedserver  Where the feeds will live $feedlinks  Do you want to see links to the feeds from the Web page? $rssimage  Path/name of image file for link to feeds

32 32 Library-specific variables – OPAC LINKS $serverbase  Your III server URL (for links to catalog records) $catlink  Text for the links to catalog records $newwindow  Do you want the links to catalog records in a new window?

33 33 Library-specific variables – DISPLAY $displaynavlinks  Do you want internal navigation links? $navlinksform  Format for the internal nav links to take $displaycallno  Do you want to see the call # on the Web page? $displaypub  Do you want to see the publisher on the Web page?

34 34 Library-specific variables – CALL #s $lcc  Do you have Library of Congress call numbers? $ddc  Do you have Dewey call numbers? $ddclevel  What level of granularity for Dewey do you want? $specialcall  Do you have call numbers other than LC or DDC?

35 35 Local activities – receive the email Mail client (Eudora, Outlook, etc.)  Save message as text Web mail  Save as above (if possible) OR  Copy/paste list of records File name = value of $inputfile variable Make sure:  No headers in text file  File starts with at least two blank lines  Each field starts on a new line

36 36 Local activities – run the script Run the script  Make sure: Input file is where it should be Local directory for feeds exists  Double-click  Command line U:\acq pl>perl NewAcq.pl  Turn on warning: U:\acq pl>perl –w NewAcq.pl

37 37 Local activities – the rest… Proofread the output  Occasional “odd” subject  Adjust links to other pages? FTP the files  File management issues More scripting? Look like a genius  The gift that keeps on giving…

38 Feel free to contact me with questions… Bob Duncan duncanr@lafayette.edu


Download ppt "Featured Item Lists for the Non-Programmer Bob Duncan Lafayette College."

Similar presentations


Ads by Google