{ "translatorID":"cf87eca8-041d-b954-795a-2d86348999d5", "translatorType":4, "label":"Library Catalog (Aleph)", "creator":"Simon Kornblith, Michael Berkowitz, Ming Yeung Cheung", "target":"https?://[^/]+/F(?:/[A-Z0-9\\-]+(?:\\?.*)?$|\\?func=find|\\?func=scan|\\?func=short)", "minVersion":"1.0.0b3.r1", "maxVersion":"", "priority":100, "inRepository":true, "lastUpdated":"2009-10-22 19:00:00" } /* Aleph OPAC Translator Example installations (mainly French): http://naude.bibliotheque-mazarine.fr/ http://bibli.polytechnique.fr/ http://sifrix2.sdv.fr/ http://aleph.insa-rouen.fr http://brenet.ens-lyon.fr http://bu-pau.univ-pau.fr/ http://babel.bu.univ-paris5.fr http://inti.univ-paris4.fr/ http://aleph.u-paris10.fr/ http://servaleph.univ-catholyon.fr/ http://armada.scd.univ-paris12.fr/ http://catalogue.univ-angers.fr/ http://biblio.ville-lehavre.fr/ http://opac.nebis.ch/ http://scd2.univ-lille1.fr/ http://catalogue.univ-paris1.fr/ http://source.ulg.ac.be/ http://med.cite-sciences.fr/ http://biblio.mulhouse.fr/ http://mediatheque.sigdci76.fr/ http://opac.biu-montpellier.fr/ */ function detectWeb(doc, url) { var singleRe = new RegExp("^https?://[^/]+/F/[A-Z0-9\-]+\?.*(?:func=full-set-set|func=direct|func=myshelf-full.*)"); if(singleRe.test(doc.location.href)) { return "book"; } else { var tags = doc.getElementsByTagName("a"); for(var i=0; i 3) { ind = field[3]; if(field.length > 4) { ind += field[4]; } } record.addField(code, ind, value); } } } var newItem = new Zotero.Item(); record.translate(newItem); var domain = url.match(/https?:\/\/([^\/]+)/); newItem.repository = domain[1]+" Library Catalog"; for (var i in newItem.creators) { if (!newItem.creators[i]['firstName']) { var name = newItem.creators[i]['lastName'].split(/([^\s]+)\s+(.*)$/); newItem.creators[i] = {lastName:name[1], firstName:name[2], creatorType:'author'}; } } var oldCreators = newItem.creators; newItem.creators = new Array(); var transient = new Array(); for each (var a in oldCreators) { if (a.lastName) { if (!a.lastName.match(/\d+/)) transient.push(a); } } for each (var a in transient) { if (a.firstName) { if (a.firstName.match(/\|/)) a.firstName = a.firstName.match(/([^|]+)\s+|/)[1]; } } newItem.creators = transient; newItem.title = newItem.title.replace(/(<<|>>)/g, ''); newItem.complete(); }, function() {Zotero.done();}); Zotero.wait(); }