Wednesday, 28 January 2009

Using the EPrints Commandline Toolbox

The so-called "EPrints Toolbox" (bin/toolbox) allows the administrator to access/change data in EPrints from the command line. It is useful for people like myself who aren't Perl programmers (the shame!)

I haven't had chance to use it much, because it turns out I can often do what I want through the batch editor, but I found it very useful this morning to update some publication data.

The background is that I am helping run a conference (WebSci09), for which all the submissions have been handled by a web service called "EasyChair". I scraped all the submission data for the accepted papers and posters from the EasyChair web pages and turned them into an EP3 XML file which I then imported into an existing, subject-based EPrints repository. A few days after having done that, I realised that it would have been nice to import the affiliation and location data that EasyChair maintains for each of the authors. So I added "location" and "affiliation" text subfields to the creators compound field in the eprints dataset, ran "epadmin update_database_structure" to make the database tables sync with the updated config definitions, and then used the scraped data to run a sequence of commands like the following:
/opt/eprints3/bin/toolbox devel modifyEprint --eprint 106 << \EOF
<eprint>
<creators>
<item>
<name><given>Leslie</given><family>Carr</family></name>
<id>lac@gmail.com</id>
<affiliation>Department of Computer Science, Gadget University</affiliation>
<location>Japan</location>
</item>
</creators>
</eprint>
EOF

That works for me because I am a dyed-in-the-wool shell programmer, but you can invoke toolbox functionality from the web via CGI scripts - if you set up the appropriate security regime first (CGI toolbox is disabled by default because it is very dangerous to let all and sundry on the web have edit access to the database!)

I see that toolbox isn't documented in the wiki yet, and we've not had that much experience using it here at Southampton, but the range of facilities is shown below. Note that when you try to modify an eprint, the modification is happening field by field, so you don't need to add a full eprint record, but you do have to provide the entire contents of a field.
    toolbox *repository_id* [options] getEprint --eprint eprintid
toolbox *repository_id* [options] getEprintField --eprint eprintid --field fieldname
toolbox *repository_id* [options] createEprint < data
toolbox *repository_id* [options] modifyEprint --eprint eprintid < data
toolbox *repository_id* [options] removeEprint --eprint eprintid
toolbox *repository_id* [options] addDocument --eprint eprintid < data
toolbox *repository_id* [options] modifyDocument --document documentid < data
toolbox *repository_id* [options] removeDocument --document documentid
toolbox *repository_id* [options] getFile --document documentid --filename filename
toolbox *repository_id* [options] addFile --document documentid --filename filename < data
toolbox *repository_id* [options] removeFile --document documentid --filename filename
toolbox *repository_id* [options] idSearchEprints < data
toolbox *repository_id* [options] xmlSearchEprints < data

If you prefer to do this via the Web, I did successfully access the toolbox functionality in JavaScript (well, the jQuery library) like so:
jQuery.post("http://repository/cgi/toolbox",
{verb: "getEprint", username: "admin", password: "whatever", eprint: 358},
function(xml){ alert(xml); }
);

Tuesday, 27 January 2009

Repositories vs Learning Object Repositories

I got into a bit of an argument on the JISC-REPOSITORIES list yesterday, about whether general repositories (EPrints, DSpace, Fez etc) could take on the functions of a bespoke learning object repository (e.g. Intralibrary). My position is that a general repository is made to be adapted - you should be able to change the schema and the services to adapt to local requirements, but the contrary position is that a learning object repository is just too different and specialised.

We'll see. The EdSpace project at Southampton is running a learning resources repository based on EPrints, but they are experimenting with the nature of a learning object repository by introducing open access practices and sensibilities rather than keeping learning behind institutional firewalls. They are building something interesting (which shows signs of being effective as well) but they certainly wouldn't claim to be trying to replicate a learning object repository.

However, the discussion got me thinking about the limits of plasticity inherent in an open source repository such as EPrints (or DSpace etc).

The out-of-the-box, vanilla repository provides various services to support certain agendas (say open access, preservation and scholarly collections). However, it comes with lots of configuration options and customisation opportunities to extend that basic functionality. You can change the look and feel of the user interface, or the schema for the metadata or the services that are applied to the repository holdings. There are configuration options, APIs and plugins that you can use to adapt the repository to your local requirements, and every institution has its own list of extras that the repository just has to handle - whether it is journal workflow management, scientific data archiving or RAE evidence gathering. You can do any of these things as long as you have sufficient technical assistance to hand. And sufficient time. Otherwise, you just have to live with the generic experience. The diagram (above and to the left) makes it plain that the more you want to extend the boundary of your repository, the more effort you are going to have to put in.

In theory you can adapt your repository so far in the direction of any particular agenda that you could encompass all the needs and requirements of users concerned with that agenda. However, that may require an awful lot of effort - or just more understanding and insight than you have time to achieve. Bigger institutions will obviously be at an advantage here!

That may be where you turn to the open source community, so that others may help you to add the facilities that you want (see diagram to the left). But what has tended to happen in the repository community is that these out-sourced, open-source developments proceed independently of each other, so that it can be difficult to have a Basic Repository + Education module + Research Management module that work happily together.

It's hardly controversial to conclude that the facilities that you can add to a repository are always going to be constrained by the amount of technical resource available to you. This does put some constraints on the amount of the terrain (agendas and services) that your repository's perimeter can encompass. So perhaps a way forward is to cheat by redefining the problem in terms of something that the repository can already do. I've already mentioned that EdSpace are getting results by making the "educational resources" problem look more like "Open Access + preservation". This approach seems to be working in other areas as well - scientific data (eCrystals), archiving fine arts (KULTUR). Still, there remain interesting challenges for making a single repository "all things to all men" - whether they are physicists, chemists, engineers, social scientists or sculptors.

"Some things to all men" we can obviously do straight out of the box.

Sunday, 30 November 2008

More Repository Value for users - making PowerPoint files from RSS feeds

Executive Overview: I tried and failed to find some existing user desktop applications that could work with repository collections; in the end I had to write some simple programs to demonstrate the kind of thing that can be achieved with a repository, some content and Microsoft Office. The screendump on the left is an example. Scroll down for some more examples from EPrints and DSpace.

Since my previous posting about Repository Value, I have been very aware that all my examples were focused on the web, and that the services and widgets that I described were for web page authors to use on web pages. In fact, many of them might be better used by web admins and web developers than rather than academic users and researchers themselves.

Although we live in a Web-dominated world, most of my colleagues do not use the Web to originate material. Work is found on the web, but created on the desktop (or laptop), and consequently the tools and services that people are mainly familiar with are those of the desktop, rather than webtop. Cloud computing may be the way of the future, but currently services like Google Docs gain a lot of attention but few users according to a recent report by ClickStream Technologies.

So I particularly wanted to find some good old-fashioned desktop applications that could do useful work with material in repositories. Something that could take a collection of material from a repository and synthesise a useful overview document that describes it, or disply it in a slideshow. And most importantly, it had to be something that could be used by a highly educated but non-technical researcher. Or even an extremely clever but technically incompetent professor. Not a software developer!

I looked at different ways of using Microsoft Office, but it doesn't schlep material from the Web very well. Word can read in individual web pages, but collections are represented in a group of pages which are difficult to handle without programming. I had some previous experience with forcing Adobe Acrobat to create a slideshow from a repository, but that was too fiddly. I had some success playing around with the Firefox "Scrapbook" extension to grab all the linked pages from a collection as a single (humongous) web page, but I couldn't find a way of doing anything productive with that page.

The fundamental problem is that repository web pages (as displayed by DSpace, EPrints, Fedora, Digital Commons or anyone else) are too complex to interpret without creating a bespoke application that is tailored to datascraping each kind of repository (and each version of each kind of repository.) So to have any chance of broad-spectrum success, I needed to find a simpler format to work with that is supported by all repositories.

Luckily, RSS is just such a format. Repositories use it to describe lists of recent deposits, or lists of items in their collections. Previously I was investigating it for Web-based services, but now I want to use it for a desktop based-service. Which, to be honest, pretty much means Microsoft Office. Other productivity suites exist, but if you want to target as many repository users as possible then Microsoft Office is a pragmatic first step.

So, does Office have any built-in facility for reading RSS files? Unfortunately it doesn't. I seem to be out of luck with finding an off-the-shelf application that everyone has access to. I'm just going to have to make something myself.

But despite not having an RSS capability, Office has something almost as good - an open data format. I might not be able to get PowerPoint to make a slideshow directly from an RSS feed, but I can knock up an application to make the slideshow for me. And I don't even have to be a Microsoft developer to do it - because it's an open format I can just use whatever tools I am most familiar with. 

A Microsoft Office 2007 file (or Office 2008 if you are on a Mac) is actually a Zip file containing a collection of XML files. Like a "web page" some of those files are content files (each slide in a PowerPoint slideshow is a separate XML file) and some are stylesheets (each slide layout is a separate XML file) and some are media files (images and videos). I wrote two shell scripts to create the appropriate XML and media files to (a) create a new slideshow with just a title slide and (b) add a new slide onto the end of a slideshow. I then wrote some XSLT to turn an RSS feed into a shell script that successively calls those two commands. Each slide in the slideshow has a title, description and image taken from the corresponding item in the RSS feed. The slideshows are created with no styling, but opening them in PowerPoint allows a theme to be chosen for them with a single click.

The following examples show some of the slideshows I have made from repository material.


These are my latest papers and posters from the ECS EPrints repository at Southampton University. Note that this example (like the ones below, but unlike the example at the head of this post) has had a "Theme" applied by PowerPoint.

These are recent items deposited in the JISC KULTUR project repository.

This is from a photo collection at Demetrius, the DSpace repository at the Australian National University.

These items aren't from repository at all - they are from the ECS Press Release feed. After all, there's more to the web than repositories, and there's also more to lecturers' sources!


This is some partial success - I have had to write some programs rather than use readily-available applications. On the other hand, these rough-and-ready demos could be turned into a web service quite easily - go to a web form, paste in the RSS feed URL and download a PPTX file. (Of course, I'd have to debug them first. And re-implement them in a rather more robust environment.)

But there's a lot more that could be done. For an example of the sort of well-thought-out service that operates in this space, have a look at the New England Journal of Medicine's Image Library service. You provide some query terms, and it returns all the figures from recent NEJM articles that match your query. You then choose the relevant ones, press a button and it turns them into a PowerPoint slideshow for you, with all the necessary citation information (and licenses) attached. Imagine if OAIster could provide that for you, based on all the articles on any subject in all the repositories in the world...

Here are a few other ideas off the top of my head.
  • Most powerpoint presentations that are created are variants on a previous presentation. Gradually a presenter's message evolves over time, and their presentations reflect that. A repository not only allows the author to keep track of his/her previous presentations, it could track all the variants of each slide and allow the author to recombine them in new ways. It's very common for me to search through a dozen PowerPoint files on my laptop, to find a particular version of a particular slide that explained a point with just the right emphasis to a particular audience. Let the repository find all the individual slides that mention a particular phrase and allow me to choose le slide juste.

  • Or let the repository ingest process extract all the images in a presentation and determine the source and verify the rights clearance.

  • Or the next time I have to do a presentation to potential students, or potential funders, let the repository copy my basic set of core slides, and update it with new slides from the latest research repository feeds and the latest press release feeds.
Watch this space!

Thursday, 20 November 2008

Addendum to Repository Rats and other wildlife

Another thing that characterises me is that I'm located in a single department and deal with only a pair of focal disciplines - Electronic Engineering and Computer Science. Most repository managers cover an entire institution, or in the case of a subject repository, the whole world. By contrast I'm very parochial and limited in scope. (I'm thinking of herds of majestic wildebeest sweeping across the Serengeti vs territorial animals like bears and robins.)

GlobalGeneral
ECS

SotonxX
arXivX
WisconsinxX

Repository Rats and Other Wildlife

Dorothea (cavlec) is well-known for coining the term "repository rat", and documenting the frustrations that go with that role. Kudos to her for identifying and speaking out about the experiences of the role, and for further characterising the activities and limitations of a repository manager in her blog piece Meet Ulysses Acqua.

I don't think that Dorothea's intention was to impose a one-size-fits-all characterization of all repository-workers - rather to see a fair representation of her own experience when others seemed to be ignoring it. I don't feel as if I am a repository rat exactly because my activities seem to have few rat-like characteristics, and many of my repository colleagues don't seem to be rats either. But my colleagues aren't exactly like me either. I seem to occupy a particular niche in the repository ecology, and they too are adapted to their own environments. So on the plane back from SPARC DR2008 I started to wonder about the different characteristics of that ecology, and the kinds of animals - rat and non-rat - that had evolved within it.

Solitary or socialSome animals hunt in packs, co-ordinating their activities (lions, raptors), where others operate by themselves (rats, squirrels).Do you work with a teams of subject librarians, or are you left to work by yourself?
Wild or domesticatedSome animals fit into and contribute to human organisations (dogs, horses), whereas others operate on the edge (cats) or totally outside the structure (foxes, wolves).Are you involved in institutional committees, consulted by management and is your repository a core service?
Hunter or scavengerSome animals actively search out sources of food for the kill, whereas others eat whatever is left around, or whatever is offered to them.Do you search out material that is suitable for deposit by looking through Web of Science or by interviewing faculty?
Preener or sloven?Some animals preen themselves (birds) or others (chimpanzees) obsessively.Do you have strict QA standards that you apply to depositors' material?
Valued or verminMany animals are known as hoarders or collectors of food. Some are pampered (hamster), persecuted (rat) or tolerated (squirrel).How do you feel about your role? This is more about professional esteem, than observable traits.

(I don't claim that this is a comprehensive view of the repository world - to be more general I could have started out with the essential question "Do you have a backbone?" )

How do I fit in this taxonomy? I operate alone with no assistance in managing the repository content or policies. Thanks to our de facto mandate I don't need to actively chase material, I just wait for it to be deposited into the repository. Up to this point I haven't done much QA, I have let our library colleagues do this for the important records. I am involved in the departmental infrastructure. So that makes me solitary/scavenger/domesticated/sloven. My colleagues in the library who run the institutional repository are social/hunter/domesticated/preeners - perhaps? And Dorothea - well, I think that she is social (she works with a team of librarians on different campuses) / hunter / preener / wild*. Expressed in tabular form, this looks as follows (I have thrown arXiv in for good measure):


SolitaryWildHunterPreener
ECSX---
Soton--XX
arXivXX-x
Wisconsin-XXX

I will leave others to come up with animals with the appropriate characteristics. The lesson that I want to draw out is that there is variety in the repository kingdom. Even in the four repositories above we have all possible combinations of solitary/wild. The hunter vs preener columns look more correlated - perhaps you don't go to the effort of hunting for material and then not bother doing QA on it. And conversely, if you wait for material to drop into your lap you are less likely to care about its condition. (arxiv scores a 'half' on the preener scale because SPIRES provides a feed of "corrected" references for published material.)

So in conferences and community activities, messages that go down well with repository managers who have ticked the 'domesticated' box are going to irritate the 'wild' ones and vice versa. Those giving authoritative conference messages need to realise that they aren't speaking to a monoculture! That may be a lot to ask at the moment - they are still coming to terms with the existence and possibilities of repositories and the role of repository managers. A finely nuanced appreciation of the variation of the species is some way off yet.

So I hope Dorothea will forgive me for avoiding the "rat" identity - it is not out of a lack of solidarity with her difficult position or an appreciation of the hard work that she does. I'm just a manager in a different set of circumstances. 

And the real reason that I avoided matching animals to the different repository roles? The only domesticated, non-social, non-hunting, non-preening animal I could think of while on the plane was a rabbit. And I just can't abide the thought of being known as a "repository bunny".

Tuesday, 18 November 2008

The Value that Repositories Add

One of the things I failed to do during the Evidence of Researcher Engagement meeting was to give a presentation that I had been working on for over a week. The discussion just ran away with me! So I have been persuaded to post it to the Web to try and get the message "out there".

A repository should be able to provide lots of benefits to its users. In particular, it should make things more valuable when they are deposits than when they are just files on a laptop or on a web server. This presentation is written to inform researchers of the kinds of things that should be able to do with their material in repositories. It starts off with the basic functions that are provided FOR THEM (wide access, persistence, backups, bibliography pages, administrative reports etc) and then tackles the kinds of ways that researchers can take advantage of the material FOR THEMSELVES.

This is not a complete list - I would love to have lots more suggestions and examples - and in some ways it is a bit optimistic. No repository will do all the things that I have listed - but it shouldn't be too hard for any repository to provide some of these services.



The other thing that I failed to do was to attract many visitors to the EPrints table during the sponsored breakfast. I was convinced that my brilliant marketing idea of a platter of Apple and Raisin fritters would get people lining up to read my leaflets, but unfortunately the quality of the rest of the breakfast buffet was just so great that I couldn't compete. Oh well, onwards and upwards!

Evidence of Researcher Engagement - stories, narratives and anecdotes

On the evening before the SPARC Digital Repositories conference I hosted a meeting to discuss the evidence of researcher engagement from individual testimonials and anecdotes. That seems to have been a bit of a theme throughout the conference: Jennifer Campbell-Meier spoke about gathering stories about repositories as a means of advocacy in the new horizons panel and Bob Witeck spoke about the importance of stories in marketing open access to faculty and management. I hope that we're going to be able to start up a central place for collecting personal testimonials about repository benefits under SPARC's auspices. The idea is that a repository manager or subject librarian can have somewhere to go and look for success stories as told by faculty and researchers from particular disciplines. (Do you wake up in the morning, dreading an advocacy meeting with the Chemistry Department? Why not download a couple of repository testimonials from the chemistry page on repositoryluv.com!) More on this later!