Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mathieugrimault
Copy link

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

@adam3smith
Copy link
Collaborator

@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:
[1] UChicago:
https://github.com/zotero/translators/blob/master/UChicago%20VuFind.js
[2] Pika library catalogs:
https://github.com/zotero/translators/blob/master/Library%20Catalog%20(Pika).js
[3] Finna library catalogs:
https://github.com/zotero/translators/blob/master/Finna.js
[4] IxTheo/Relbib Vufind #2873
[5] BDTD Brazilian digital library of theses and dissertations:
#2852

Additional open issue:
[6] HeBIS Katalog: #799

Additional catalog: https://katalog.ub.uni-freiburg.de/opac/

@zoe-translates
Copy link
Collaborator

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.

@zoe-translates zoe-translates self-assigned this Oct 25, 2023
@zoe-translates
Copy link
Collaborator

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?

zoe-translates added a commit to zoe-translates/translators that referenced this pull request Oct 27, 2023
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)
zoe-translates added a commit to zoe-translates/translators that referenced this pull request Oct 27, 2023
@zoe-translates
Copy link
Collaborator

For further discussion of the plan to support VuFind, please see issue #3172.
For the code based on this one, please see PR #3173

@mathieugrimault
Copy link
Author

Yes, if I could be of any help !

@zoe-translates
Copy link
Collaborator

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!

zoe-translates added a commit to zoe-translates/translators that referenced this pull request Oct 29, 2023
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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants