-
Notifications
You must be signed in to change notification settings - Fork 747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Library Catalog (VuFind).js #2969
base: master
Are you sure you want to change the base?
Conversation
@zoe-translates -- would you be up for/interested in taking a look at this? Long story: This is a pretty common catalog in Germany, were lots of libraries used to support (just) the Citavi software, which has become much less attractive because of both pricing and declining customer support (I'm being told), with lots of libraries looking at Zotero instead -- given the customizabilitiy of VuFind, this would likely be a bit tricky, but have high impact. See also the linked PR by @AbeJellinek Existing supported VuFind instances: Additional open issue: Additional catalog: https://katalog.ub.uni-freiburg.de/opac/ |
Thank you for bringing this to my attention! I'll look into it. It will probably take some time, but this is a very interesting case. |
First of all, @mathieugrimault, are you still following this PR? If we provide further reviews and comments in the hope of getting the VuFind translator merged, would you help us? |
The code here is based on PR zotero#2969 with stylistic updates to better conform to the current coding practices. - Use `function` declarations instead of named arrow functions - Simplify conditionals based on querySelector - Use the correctly serialized loop in doWeb for multiples - Update creator fieldMode data type of test cases (boolean -> number)
Yes, if I could be of any help ! |
Of course you will be able to, because you are already familiar with the topic. As you can see in the comment above, because the goal has been kinda expanded, I've started a new issue to track the changes and a new PR. The PR is based off the last commit of yours, so if it gets merged you'll be credited too. Is that OK with you? And can I tag you (with @) in discussion there when I need to consult you? Thanks! |
Not all VuFind sites advertise all of the supported export formats. For instance, a site may support MARC but stop short of offering a link for MARC export. Therefore we try something very similar to the original (zotero#2969) PR. Namely, we start with an initial format defined by ourselves independent of what the site says. This initial format can be set manually or looked up from a small list of known sites. If the initial one doesn't work, we consult the list of formats offered by the site, and use those formats as fallback, trying one after another. The difference from zotero#2969 is that we don't repeat this trial-and-error for every single input of the multiple. Instead, if we find a supported format, we use it for subsequent items. If the input format is set manually in the `exports`, don't do fallback. In addition, we add some more selectors for the itemType-identifying <span> elements for detectWeb()
Attempt to provide a base translator for a generic VuFind catalog. The translator relies on scraping the HTML and using exports functionalities, MARC export first, then EndNote and lastly RIS. If none are found, Zotero will probably use Z3988 COinS.
VuFind is heavily customisable (templates and items formats) so results are less than perfect. The translator provide placeholders for customizations for a specific catalog.
Code is based on https://github.com/zotero/translators/blob/master/Finna.js and work by Abe Jellinek #2874