Library Catalog Field

I have been working on adding Zotero support to my website using by using un-API to serve up MODS xml. Everything is working perfectly, except that anything imported into Zotero from my site fills in the Library Catalog field as "unAPI".

I would like to change this to something more along the lines of "library.case.edu" or something like that that makes more sense to the user. Is there a way to change that field for the items on my site without writing my own translator?
  • bump anyone? I did find a site that uses unAPI and zotero puts something else in the catalog field, so it seems possible, but I still have no idea how to do it.
  • Could you provide a URL for the site that does override the Library Catalog field? We ought to be able to reverse engineer that one, unless a solution from within Zotero is forthcoming.
  • edited March 17, 2010
    http://ualweb.library.ualberta.ca/uhtbin/cgisirsi/x/0/0/57/5?user_id=WUAARCHIVE&searchdata1=1565847547%7B020%7D
    There is the specific example. I combed through the source, and i didn't see what makes it work, but I'm new to this whole unAPI/zotero stuff.
  • Judging from the source, the UAlberta library provides unAPI, but if you hover over the book icon in the address bar, you'll see that it's being translated not via unAPI, but rather through the "Library Catalog (SIRSI)" translator.

    It seems to me that the unAPI code could be modified to allow it to save the source server as the repository-- I've just made such a change to unAPI.js, but I don't have an unAPI site to try it on, and you didn't post a URL for your site.

    Download it from here, and put it in the translators directory of your Zotero data directory. It should replace the not-very-useful "unAPI" with the domain of the source page.

    Let me know if it works for you. If it does, I'll submit this as a proper patch.
  • Don't try it yet. I was too careless in adapting it, and the translator I posted has a JavaScript error in it. I'll post a revised one shortly.
  • Now it works for me. Please give this a try and let me know whether it sets the repository correctly for your catalog as well.
    http://github.com/ajlyon/zotero-bits/blob/master/unAPI.js
  • Works like a charm. Great work man. unAPI isn't up on our site quite yet, but I think we are pushing it live this week. when we do, you can test it on our site at
    http://library.case.edu/digitalcase/BrowseObjects.aspx?PID=ksl:caseetd
    or many other pages in the digitalcase section of our site.

    Now if only the zotero didn't ignore the mods language field everything would be perfect.
  • Looking at https://www.zotero.org/trac/browser/extension/trunk/translators/MODS.js#L603, it appears that MODS is supposed to support the language field. I don't know much about MODS, but perhaps the code comment about supporting "languageTerms that are @type="code" only" is at issue?

    I'll submit the updated unAPI.js to the dev list for review.
  • The updated unAPI translator should hit clients soon.

This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.