DevCSI Library Software/Reading List Hacking Workshop
DevCSI (Developer Community Supporting Innovation) organised a two day event (22nd and 23rd July, 2010) investigating the interoperability between reading list software and other software systems. The event was free to attend and was hosted at the Møller Centre within Churchill College, Cambridge.
I and Alena Ptak-Danchak attended on behalf of Bodleian Libraries, University of Oxford. The event was organised in a unique way where it was very hands on and had a 60-40 ratio of library software developers and library reader services staff. Attendees were given the option to work on ideas they feel strongly about and groups were made focusing on specific tasks.
Groups chose to work on different aspects and challenges of reading lists. E.g. Mahendra Mahey identified some key challenges of reading lists and provided an insight into how some of these can be solved. Ben Charlton was showing how easy it is to add a new metatron to list8D which essentially means to add a new data source within the architecture of the reading list software list8D. His examples included kitten war metatron (which was absolutely hilarious) and EPrints metatron. Ben O’Steen was showing how collective data from Talis API can be used to determine whether every book loaned out has six degrees of harry potter relationship (More details can be read here). Owen Stephens talked about integration of run-time availability from library catalogue with acquisitions module of a reading list. Jason talked about how different citation styles can be made part of a reading list software where students don’t have to worry about what citation style they have to write their report/thesis in, as the software does it automatically for them at runtime. I was part of the llikes (list likes) group which worked on the popularity of a given item in a reading list based on metrics from Open Library, PLoS, Talis, Mendeley, and others. This way, a reading list can reorganise itself on the basis of popularity into different categories of importance. It can also be used to create a reading list from scratch on the basis of popularity. Ian Mulvany, Chris Clarke and I presented different aspects of the llikes.
Along with the group projects, there were some very useful presentations on Telstar project by Owen Stephens, List8D project by Ben Charlton, Collective Intelligence using Talis Aspire API by Chris Clarke, Mendeley by Ian Mulvany, Peer reviewed reading lists by Emerald and linking reading lists to acquisitions by Dawsons UK.
Some of the ideas that have been gained out of this event are directly applicable to reading list solutions in University of Oxford. Some of the features can also be integrated directly within Primo, for which I am very excited about. E.g. Using EXLTA (Ex Libris Tab API), adding a new tab when we have item-level metrics of popularity and/or inclusion statistics in reading lists. Another idea could be to assist students with reading lists by adding a runtime citation style generator (e.g. using CSL). The boundaries are pretty much unlimited.
Small bash script to read data from a file into an array
I was asked to write a small shell script which can read the difference of two files (which extracts filenames) and pass the extracted filenames to another shell script. It is not too complicated but posting it for other people’s benefit.
Here is a quick explanation.
Line 5 takes a difference of files file1.txt and file2.txt, cuts the output from characters 3 to 13, and writes it into a file.
Line 7 opens temporarylist.txt as file descriptor 3 for reading.
Line 9 runs a loop till there is nothing further to read from file descriptor 3.
Line 11 passes the read data to a different shell script (named othershellscript in this case).
Line 15 closes the file descriptor 3.
#!/bin/bash cd /home/masud diff file1.txt file2.txt | cut -c3-13 > temporarylist.txt exec 3< “temporarylist.txt” || exit 1 while read i <&3; do scripts/othershellscript $i done exec 3<&-
The Flock Browser
In break time at work today, I was going through different desktop twitter clients. At the same time I realised that I need to check facebook on a regular basis and I would like a better blogging tool as well. In all and all, I would like to keep in touch with everything, but most importantly with facebook, twitter, my gmail, and my blog. Flock web broswer is the best answer.
It looks very nice, has superb support for facebook, twitter, self hosted WordPress blogs (such as mine) and gmail. I have used it only for 10 minutes and I am very impressed.
I am posting this from the flock browser. The only thing you need to do in your WordPress is to enable remote publishing through xmlrpc and that’s it.
Validating an XML file against a Schema in Java
If you are working with XML and Java, chances are good that there would come a time when you would want to validate a given XML file against a schema file. Here is a small piece of code which will let you do exactly this task.
The following code is based on the Java XML Validation API which uses three classes to validate an XML document, i.e. Schema, SchemaFactory and Validator.
In this example, I am using the W3C schema language, but you can also use other schema languages as defined by the javax.xml.XMLConstants class, e.g. RELAX NG (XMLConstants.RELAXNG_NS_URI).
import java.io.*;
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.*;
import javax.xml.XMLConstants;
import org.xml.sax.SAXException;
public class CheckSchema {
/**
* @param args
*/
public static void main(String[] args) throws SAXException, IOException {
// Entry point to validation API. The XML constant sets the schema language to W3C XML Schema 1.0
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
//Read the Schema.
File sLocation = new File("summary.xsd");
//Create a Schema Object. This represents the schema grammar passed in above statement.
Schema schema = factory.newSchema(sLocation);
//Either use the newValidator() method or newValidatorHandler() method. Former for high-level validation and latter to run on top of SAX.
Validator validator = schema.newValidator();
//Read the source XML file
Source src = new StreamSource("summary.xml");
try{
//Run the validator.
validator.validate(src);
System.out.println("The XML File is valid against the Schema");
}
catch(SAXException e){
System.out.println("The XML File is not valid against the Schema. The exception is: ");
System.out.print(e.getMessage());
}
}
}
Hope this is useful.
Thing 23
And so we are finally here. The last thing of the 23 things Oxford journey. When I started, I thought it would be a breeze but now I realise it was a lengthy though exciting experience. I definitely had fun but there were certain times when I questioned the usefulness of a particular tool and/or technology.
Some of the things stood out. E.g. I certainly liked the use of delicious for social bookmarking. I couldn’t think of much usefulness for podcasts in libraries. I also think start pages can be really useful if used in the right environment. Twitter and facebook can be used in very creative ways to connect to a library’s readers. LinkedIn is quite good as a platform but once again I am not sure about its usefulness in a library environment.
I think the idea of these 23 things was really good. The implementation was very well done. This has given a very strong and basic platform for all the staff in Bodleian libraries to work on web 2.0 related technologies. Hopefully, the staff would now build up on these technologies and implement creative and innovative solutions for their readers.
Things 21 and 22
For a description of thing 21, read here. For a description of thing 22, read here.
Thing 21 is about widgets focussing on blogger widgets. As I am not using blogger but WordPress, I will talk about widgets in relationship to WordPress. There are many types of widgets available, some come by default and for some you need separate installation. However, the total number of widgets and plugins available for WordPress is astonishing. There are many Flickr plugins and widgets available, the one that I use is mainly for the posting (admin) side. It gives me direct access to my Flickr photos from the post screen in WordPress. This allows me to quickly add photos to my posts. The plugin also comes with a widget that you can use to display your recent photostream. However, I chose not to use that as I and Henna have a separate website for this very purpose. WordPress, like blogger, comes with a drag n drop interface to rearrange widgets on different areas of your blog depending on which theme are you running. Other widgets and plugins exist for popular online photos storage sites such as Google’s Picasa and Photobucket.
Thing 22 is about adding a delicious widget in your iGoogle page. This was not too difficult as I have already added delicious widget on the sidebar of my blog which displays the most recent five bookmarks. These widgets require your username and the number of bookmarks to show and are typically based on the RSS stream of the delicious account. If you know the RSS address of the bookmarks, you can read the related bookmarks by using a typical RSS reader.
Small bash script to read data from a file into an array
I was asked to write a small shell script which can read the difference of two files...
