So a while back I posted code which added peer reviewed indicators to a Serial Solutions E-Journal list. Never being quite satisfied with how stuff works and wanting to make things better I’d rewritten and expanded the script. Now it adds Peer Reviewed indicators to Serial Solutions and an Innovative catalog full record display screen. It also adds links to display the most current table of contents for a given journal if it exists (in both the Serial Solutions and Innovative UI).
Adding Peer Review indicators
- Grab the ISSN from the page (Innovative, Serial Solutions)
- Send ISSN to xISSN service and retrieve whether or not the journal is peer reviewed
- Add Peer Reviewed indicator to the page
The hardest part of this script involve obtaining the ISSN. Serial Solutions luckily tags this in a span. Innovative puts it in a table structure so using JQuery I can use the following
$(“#fullSection td.bibInfoLabel:contains(‘ISSN’)”).next().text()
what this does is find the td with the text ISSN in it and then gets the text in the next tag.
Adding the Peer Reviewed indicator is a matter of finding the place in the HTML structure you want to add the new code and appending it. For simplicity sake in Innovative I’m just adding a new row to the table which contains the bibliographic data.
Adding a link to the table of contents
- Grab the ISSN from the page (Innovative, Serial Solutions)
- Send ISSN to xISSN service and retrieve whether or not the journal is has a table of contents RSS feed available
- If ISSN has an RSS feed available, add a link which say See Latest Table of Contents and executes the TOC script
This script build on what the Peer Review section of the script does and in addition to requesting the peer review field also gets the rssurl field from xISSN. If there is an rssurl field then a link is created and added to the page.
The tricky part of this script is the portion which brings up the Table of Contents in a popup window. What is tricky about this is the fact that the RSS feed exists on a different server and that its XML that needs to be manipulated. It isn’t the fact that data is XML part that creates the difficulty, JQuery is capable handling XML. However, we don’t really know the form (RSS 1.0, RSS 2.0 or Atom) that the feed is which makes it much more difficult. Additionally, because the data being retrieved isn’t JSON we can’t get it without creating a cross-site scripting issue. Two resolve both these issues, I’ve created a PHP script which retrieves the feed and parses it into JSON which I can access. I’m using the SimplePie library to parse the feed which saves me lots of time because it takes care of the multiple types of feeds issue.
This is my 2.0 solution to the problem. My initial solution used a PHP script that just built the popup HTML content and then configured Apache to proxy the PHP script to avoid the cross site scripting issue. I gave up on this solution because it is predicated on the person installing the Javascript being able to configure Apache on the server with the Javascript to act as a proxy. This makes the solution more complicated to configure which was unacceptable. If you want to explore the code in more depth feel free to view the full javascript and the PHP code.
This post is a hold over from before I started working for OCLC which I didn’t get published until now. I’m posting it here so that folks who saw the original content can follow-up. Future posts on OCLC Web Services will be at the OCLC DevNet Blog.
So as I previously mentioned I created a script that crosslists print books and ebooks in Serial Solutions and our library catalog. The mechanics behind this script are pretty simple.
- Screenscrape the ISBN from the web page using JQuery
- Send the ISBN to a PHP page which queries the WorldCat Search API for that ISBN and holdings at the UH Library or Send ISBN to PHP page which queries Serial Solutions to see if UH has electronic holdings for that item
- PHP script returns a JSON object with the OCLC Number
- Use JQuery to Parse the JSON retrieve the OCLC Number and build a link to be inserted into the desired spot on the web page.
The steps are the same for both Serial Solutions and the catalog. The big differences in the code? The code which grabs the ISBN and the code which inserts the link in the right place. This is because the UIs are different so it take different JQuery code to get the ISBN and then insert the link.
Here is the Javascript which works to insert crosslinking into an Innovative catalog and Serial Solutions. I’ve commented it so you can see which part corresponds to each.
In addition, to make this work you have to have the PHP scripts on your server. There is one for WorldCat and one for Serial Solutions. I created these to solve the cross server scripting problem and get the data into JSON format which is easier to manipulate as well. I’ve made these available for download as well as examples (Serial Solutions / WorldCat). It isn’t as abstracted as much as I like. For example, if I had the time I would have coded it so that the PHP builds the link back to the catalog based on the OCLC Symbol submitted. I can do this if I tap the OCLC Registry but I was in a rush and didn’t take the time to code it this way on the first round.
This post is a hold over from before I started working for OCLC which I didn’t get published until now. I’m posting it here so that folks who saw the original content can follow-up. Future posts on OCLC Web Services will be at the OCLC DevNet Blog.
My first purchase I hadn’t intended on making. I wasn’t until I worked for week at home that I realized how wonderful it was to have dual monitors at work. Over the last 4+ years I’ve become accustom to using dual monitors when I work. It is particularly helpful when working on code. But honestly its just as important when you are working virtually and want to have your communication tools and what you are working on visible simultaneous. After a week without them I was at my wits end. So I went looking for another monitor. In the end, I sort of splurged with the monitor because I watch a lot of Hulu and have a limited amount of desk space. As a result, my main screen is now a new Samsung 23″ wide screen LED monitor.
My second purchase revolved around the fact that I have to be able to scan and fax stuff easily for the new job. So I’ve acquired a HP Office Jet Pro 8500 to scan/fax/print/copy. I was skeptical about the HP but was convinced by the ease of with which folks were able to setup the printer’s wireless capabilities (at least according to reviews/comments). Getting the basic setup done was pretty easy. The only road bump I hit involved the scan to email functionality which refused to connect to my Gmail account to send the info. A quick search of the HP user forums located the answer though. One thing I like about the HP is the built in web-based configuration tool. I found this WAY easier to use than the HP Setup Wizard software which seemed lame and crippled by comparison.Hey I’m a geek I want to tweak network masks, etc.
The third addition wasn’t really a necessity but rather my birthday gift. My husband knows me all too well. Realizing that I was going to be working from home, that an important part of that is being able to focus and that I use music to focus, he purchased me Bose speakers for my computer system. The new speakers make for a much improved listening experience when I work, write, code. Much easier to tune out the NASA T-1 trainers as they zoom overhead.
All and all I’m pretty happy which the additions and should have everything for my home office now. The only other thing I’m getting is an iPhone earphone/mic. One of my colleagues says that they work fine with a Mac Air. So I’ll be getting those to use when I’m on the road. Still have to deal with cell phone upgrades, but I’m waiting on those for a variety of reasons.
Since Apple announced its iPad the web has been consumed with discussion about the device. My husband, knowing I’m a Mac lover, sent me a link and though I swore I wasn’t going to get drawn into looking at it couldn’t help but take a peek.
From my perspective there are lots of thing to like about the iPad, screen size for one. The fact it runs iWorks is another.
My biggest question involve how to input stuff into the device. Looking at the pics it seems like this might be a little more like using a laptop. Since I write a lot when I’m on the road, this is important to me. The other question is how good will its ebook reader capabilities be. Several friends have various devices to read ebooks on from Kindle to iPod Touch. What I didn’t like about reading on the iPod Touch was the screen size, the iPad overcomes that issue but issues have been raised about how the screen technology would be on the eyes. Another issue for me is that I have to use VPN to get into any resources at my new job. I’ve got no idea how I would do this with the iPad. (Which is annoying and sad because after carrying my laptop around the office to meetings for week, I really sort of would have liked a tablet)
Ultimately, I’m on the fence about my desire to have an iPad. I have a Mac Air, which I LOVE beyond words. It was worth the extra money over netbook. However, I’m not sure how I feel about replacing it with and iPad. Particularly since I’m not sure how I’d VPN to the network at work. Which means I’d end up with yet another device to carry around. I’ve been looking at smart phones and ereaders. I’m likely to get a smart phone which means that the iPad would end up being a suped up ereader for me. Considering the price tag, I’m not sold. If anyone gets one and figures out how to VPN on them, let me know. I’d seriously be interested.
That being said, if I didn’t have my Mac Air, I’d be very likely to buy it.
I was looking at the Apple Earphones with Remote & Mic (http://www.amazon.com/Apple-Earphones-with-Remote-Mic/dp/B001NABJ56) wondering if they would work with my Mac Air. I often travel with my Air and would like to be able to easily make phone calls using Skype. Typically I use my headphones and the Air’s internal mic. However, it would be nice to be able to have a headset that was very small and portable that didn’t pick up ambient noise.
So I’m wondering if anyone knows if the iPhone headphone/mic combo would work if I plugged it into my Air? If not does anyone have another suggestion of a very small headset I could use for this purpose?
It seems like much of my life has been about being in the right place at the right time. Back in September I made the decision to leave UH and set out on a journey to figure out how I could get paid to do the things I loved the most- code, teach, write, problem-solve, experiment, and work with developers. My solution was to go solo and pick up a variety of work which interested me: from web development to teaching and consulting. Something about the best laid plans and me always results in the unexpected.
The unexpected came in the form of a full-time job. In November OCLC advertised for a Product Manager for the Developer Network. It shouldn’t be a surprise given my work over the last year, that I applied. As of January 19th I’m officially the Product Manager for the OCLC Developer Network. To say I’m excited is beyond an understatement. In the last year and a half I’ve been exploring OCLC web services and finding new and interesting ways of using them. As a result, I’ve had the opportunity to collaborate with a variety of folks at OCLC. Never a shrinking violet, I’ve both offered constructive criticism and complemented. What I realized over time was that I bring a different perspective to the table because I’m both a librarian and a developer who participates in developer communities, and works extensively with developers. I can see the power and potential in the current set of web services and also potential new web services. But I also understand the realities of smaller libraries and the concerns of library open source evangelists (being an OSS geek myself) and developers. What I want most is for libraries (of all sizes) and others to be able to leverage this data to facilitate better user access to library resources and an overall better user library experience.
Ultimately, I’m joining OCLC because I believe that growing DevNet can substantially impact libraries and move libraries back into the foreground as a source for easily accessible, reliable, quality information. It’s simple math. More libraries collaborating, contributing + more data to work with = better solutions to problems and better user experiences. Without each library having to reinvent the wheel or some libraries potentially being left out in the cold.
For me OCLC is a nexus that can facilitate this in a way no other library entity can. I don’t see another organization with the necessary leverage or the ability to deal with the sheer scope of some of the problems at hand. But making DevNet shine is going to take participation from developers and librarians. DevNet is a relatively new entity in OCLC, what it is and will be is likely to be shaped by those who participate in it. Participation means sharing, critiquing, collaborating, discussing, teaching, and learning.
If you have a question/concern/issue whatever, contact me (don’t have OCLC email setup yet), I’ll do my very best respond and/or answer the question. I’m looking forward to hearing from you.
A number of things have gotten me thinking about digital video again of late. My thoughts re: streaming cropped up while traveling. I was sitting in SFO waiting to board the plane and annoyed that I couldn’t continue to watch the rest what I had been watching on Hulu while I was waiting once I got on the plane and in the air. For me the lack of an offline viewing mode without acquiring the thing for good is one of my biggest problems with streaming media. I love Hulu and I love Netflix on demand but I can’t get them unless I have wi-fi. (the fact I can’t get them on an Android phone yet also makes me grumpy) I sort of like the model which Apple uses where you can “rent” stuff but I’m not a fan of the fact that I have to have an iPhone/iPod Touch to watch said content.
Which led me to my second thought which I had over the holidays which was why doesn’t everyone make a digital copy part of the purchase of a DVD? I got the new Star Trek for Christmas and was excited to see it came with a digital copy for my use. Yay! Only problem was that to get the digital copy one has to put the DVD in the computer, fire up iTunes and enter the code provided with the DVD to download the digital version. Pretty cool, except I had my Mac Air with me so no DVD drive. It wouldn’t been nice to just be able to go to iTunes and input the code without the DVD.
More and more I’m discovering that I want to access things where and when I want without having to be wedded to a specific device. Sometimes, like with my music, this is possible. Other times like with video it isn’t. It sort of makes me scratch my head. Back in October at LITA forum in October I was talking to some colleagues about digital media and nearly all of us agreed that we were willing to pay to acquire media. At the same time, nearly everyone had gotten content via other means. Why? Well the two biggest reasons seemed to be: format availability issues (won’t play on or isn’t available for my X) and not available digitally period. I recently read a post from Mashable which a colleague had starred that talked about a new format for digital video. Seems like lots of companies are on board: except Apple. Big sigh. I love my Mac but I don’t love having to have a iPhone/iPod Touch to play my media. I’d probably buy more digital video if it weren’t for this.
Honestly I feel the same way about ebooks, I don’t want a Kindle because I don’t think its fair to have a format that locks people into a particular device. I know the device and the ebooks themselves are separate but every other ereader is using a different digital book standard which seems to inter-operate on all those devices. But I digress. My point is that we’ve been through this with music and it turned out that people wanted a single DRM-free format that played on all devices. I don’t think that the format has to be DRM free for video and ebooks but I do think it needs to be device independent. Until my personal digital video and ebook consumption is going to be stunted.
A while back I decided that I really wanted a smart phone, and I’ve been saving my pennies. My biggest problem was that I’m a Verizon customer who doesn’t want to switch to AT&T. While I love the idea of an iPhone I hate the idea of leaving Verizon. I like the fact I’ve only been one place I couldn’t get a signal with Verizon, and it wasn’t at my parents house in Maine. This is a plus which overcomes my lust for an iPhone. I’ve been hearing lots of good things about the Motorola Droid and also had read up on the HTC Droid Eris and decided to go the Verizon store to check them both out in person. I wanted to be able to use them to see what I thought. My initial perceptions from the reviews I read was that the Motorola product was superior that combined with its slide out keyboard made me think this would be the better choice.
In person experiences proved somewhat different. First, reviews said that the screen quality on the Eris wasn’t as good as the Droid. To test this out I went to YouTube and watched a couple of videos, including one of my favorite series – Simon’s Cat. I was astounded that the YouTube videos looked pretty crummy on the Droid while the Eris made them look quite nice. Being an experimentalist at heart I thought it might be the fact that the Droid phone I was playing with was messed up due to use/abuse at the Verizon store. So I tried it on two other display models, same result. Going to the store I also thought that the slide-out keyboard would be a plus. However, upon testing it out at the store, I realized that it wasn’t all that a big plus IMHO. Really typing on the screen v. typing on the keyboard pretty similar. Three other points that have tipped things in the Eris’ favor: the Eris let’s you zoom in and out by touch like an iPhone. The Eris seemed more responsive than the Droid which was laggy. (This seems to be due the newer version of the Android OS). I also like the fact that the Eris has buttons for the basic phone functions. This is something that I’ve always wondered about with the iPhone. How the heck do people easily use it as a phone? Obviously it isn’t a problem for my friends with iPhones but I’m wondering if they found it at all disconcerting at first.
A couple other questions kicking around in my head?
- I’ve read that the Eris as an older version of the Android OS on it but is likely to get an upgrade in the first 1/4 of 2010. Will this only apply to new phone or it something that I can get if I buy an Eris now?
- Can put a video file on and Android phone to watch? Streaming video from Hulu and Netflix doesn’t seem to be a possibility yet.
- Battery life? – Many reviews say this is an issue, but I’ve got no way to test. If anyone has an Eris and would like to comment I’d appreciate.
So I’m back to mulling and perhaps waiting to see what new tech comes out in the next month.
Javascript has always been an area which was lacking for me in terms of skills. Ironically some of the project I’ve been working on of late require Javascript and in a quantity I haven’t written before. So I’ve been digging in and learning more of it. Mostly I’ve been working with JQuery and my love for it has been growing by the moment. Its works terrific with JSON and PHP pages for AJAX actions and has a way of selecting things that reminds me of Xpath.
However, one reason I wanted to use JQuery was its XML support. The problem is that I haven’t had any luck using JQuery with XML. I can’t seem to bring XML back. I don’t know if the problem is a result of either my lack of knowledge or the structure of the XML I’m dealing with. Many web tutorials have been consulted and I’m still stuck.
Rather than continue to bang my head against that wall infinitely, I’ve decided to take a different approach to get the job done. I’ve written PHP that takes my XML and turns it into JSON. JSON + JQuery is truly heaven. Its not what I wanted but it works and sometimes having something done is better than doing it perfectly. When I have a little perspective I’ll return to JQuery and XML and maybe the problem will be clearer.
Using JQuery I’ve been able to build many of the scripts for my 2010 code4lib presentation. This includes a set of crosslist scripts which crosslist print and electronic books and journals. I decided to write these script because its isn’t always clear when a library such as UH has both the print and electronic version of a book or a journal. So I have created a prototype script which adds links for print books to the ebooks in our Serial Solutions list.

I also created a prototype script which adds a Also Available as … link to the full record screen in our library catalog. For e-books it uses the ISBN to search the WorldCat Search API and see if we have that book. If it does it builds a link to the print copy of that book in our catalog.

For print books the script takes the ISBN and sends it to Serial Solutions OpenURL XML API. If it returns a match then it builds a direct link to the ebook.
Also I wrote a script which adds the Peer Reviewed indicator to journals within our library catalog interface.

None of these scripts are in production yet. But I’m hopeful that they will be able to be implemented shortly after my departure. These are just one of a suite of scripts I’ll be showing off at code4lib. All of them use OCLC Web Services. Some have extra special sauce (read other APIs) worked in, some don’t. All of them make library UIs richer and I can’t wait to show them off as a group. I’ll post more details and code on each of them individual a bit later.
One of the most common things that my technology colleagues grumble about is the fact that they can’t get to status/item information from their catalogs. This is often because the ILS vendors don’t provide an API to this data. The result is that this information has to be screenscraped. Nearly every NextGen resource discovery tool does this, whether its Blacklight, VuFind, WorldCat Local, or Summon. There are two problems with this. One is that this code is application specific. Two creating this kind of code is not for the faint of heart. Yes one could look at the code and steal the screenscraping bits. I think that it would be much easier and better if this stuff was available as an API/Web Service.
You all nod and say “yes Karen I’d like to have a dragon to guard my house too but I don’t live in fantasy land”. Okay, I know. Who knows, when or if all library vendors will provide an API to this data. But if we’re going to go to the trouble of writing screenscraping code why don’t we write code which is modularized, acts like a RESTful web service, scrapes the data and presents it in an API form instead of coupling the code to a specific tool or kind of tools? That way when ILS vendor XYZ decides they are going to change their interface we only have to fix this in ONE PLACE not across multiple systems/platforms/tools. One could then focus on fixing the problem in a generalized sense not in a particular context. Plus you have more collective eyes potentially on the problem. By doing this we also make the data usable in lots of different ways, some of which we probably haven’t thought of yet. Moreover the data is also available to developers and geeks who aren’t in libraries and may find some nifty not thought of way to use it. Lastly, libraries that don’t have the coder talent to create their own screenscaping can use the service to get at this information from their catalog.
So folks? What do you think? Can we just make a Item Information web service please that works with all ILSs? Then everyone can just use it to provide this info instead of writing/maintaining their own screenscraping code.