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 Worldcat fetcher #6035

Closed
wants to merge 58 commits into from
Closed

Conversation

GlennOlsson
Copy link

Add EntryBased fetcher for the Worldcat databse (#2581, #1065)

Problem right now is the API key. Tried requesting a sandbox key, but the request was denied. However I believe you being a trusted organisation might have better luck. You can request a key at this link. The key can be added at this line

Have tested the fetcher and importer with XML content from their test api, which has yield successful results

@tobiasdiez tobiasdiez self-requested a review February 27, 2020 15:36
Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be really great if you could check if WorldCat JSON is possible

@tobiasdiez
Copy link
Member

@koppor Could you please try to get an API key for us? That would be perfect. Thanks!

@koppor
Copy link
Member

koppor commented Feb 28, 2020

@tobiasdiez I crafted a long answer yesterday, but it was lost. Short answer: Register --> login with university id --> I have to choose "Library of City Stuttgart" (or University of Stuttgart Library) (have to get an account for one of them, but that is doable) --> WorldCat then uses that Library --> I don't want all JabRef traffic going through the Stuttgart library --> Think, we need to add a key configuration and direct all users to https://www.oclc.org/developer/develop/authentication/how-to-request-a-wskey.en.html.

I would be OK for me to add a key for our JUnit tests.

@Siedlerchr
Copy link
Member

+1 for integration into the preferences

@tobiasdiez
Copy link
Member

@koppor Thanks for investigating this! This is a bit unfortunate as it decreases the user experience (and complexifies the code). Could you maybe contact them (I guess WCAPIRegister@oclc.org)? Maybe they provide access for us that is not bound to a specific university/library.

@koppor koppor force-pushed the master branch 5 times, most recently from b8ef7b7 to 21c6e5e Compare March 4, 2020 17:02
@koppor
Copy link
Member

koppor commented Mar 6, 2020

Reply: JabRef can pay for a subscription. Alternatively, JabRef could ask a library to route traffic through them -- I would need to investigate on the costs for us. - In the current state, I would opt for a preference to enter the WorldCat key.

@JabRef JabRef deleted a comment from codecov bot Mar 23, 2020
@Siedlerchr
Copy link
Member

@GlennOlsson It would be nice if you could finish this PR.
Here are the things todo:

  1. Add a field in the preferences to enter and store the API Key
  2. Pass the preferences to the fetcher
  3. Switch to the json API. I think it should be easier.

@tobiasdiez
Copy link
Member

Concerning the API key, I'm actually in contact with the TU Delft library. But that's a slow progress at the moment for the obvious reasons...

@calixtus calixtus added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: devcall labels Feb 5, 2021
@calixtus calixtus removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Mar 1, 2021
@calixtus
Copy link
Member

calixtus commented Mar 1, 2021

Remaining issue: The api seems to have changed. Requires a little bit more work.

@tobiasdiez tobiasdiez added status: changes required Pull requests that are not yet complete and removed status: depends-on-external A bug or issue that depends on an update of an external library labels Mar 10, 2021
calixtus and others added 5 commits June 22, 2021 07:43
# Conflicts:
#	build.gradle
#	src/main/java/org/jabref/gui/preferences/PreferencesDialogViewModel.java
#	src/main/java/org/jabref/logic/importer/WebFetchers.java
#	src/main/java/org/jabref/logic/util/BuildInfo.java
#	src/main/java/org/jabref/preferences/PreferencesService.java
…dcat-fetcher

# Conflicts:
#	src/main/java/org/jabref/gui/preferences/PreferencesDialogViewModel.java
#	src/main/java/org/jabref/logic/importer/WebFetchers.java
Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
@koppor
Copy link
Member

koppor commented Jul 7, 2021

This PR currently implements WorldCat 1.0 API. This will be sunset at some time: https://www.oclc.org/developer/develop/web-services/worldcat-search-api.en.html. Currently, the version 2.0 is in test, and only "Libraries that maintain both WorldCat Discovery and OCLC Cataloging subscriptions." may use it.

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
@koppor
Copy link
Member

koppor commented Jul 7, 2021

PDF on the WorldCat fetcher: https://matienzo.org/storage/2009/2009-Jun-WorldCatAPI.pdf

Example test:

Manual test using the WEb page: https://www.worldcat.org/search?q=ti%3AMarkdown+ti%3Aarchitectural+ti%3Adecision+ti%3Arecords%3A+ti%3AFormat+ti%3Aand+ti%3Atool+ti%3Asupport&qt=results_page

grafik

Similar call (only "Markdown Architectural") to the API:

https://www.worldcat.org/webservices/catalog/search/opensearch?wskey=...ourkey...&q=srw.ti%3DMarkdown%20and%20srw.ti%3DArchitectural

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:diag="http://www.loc.gov/zing/srw/diagnostic/" xmlns:oclcterms="http://purl.org/oclc/terms/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
    <title>OCLC Worldcat Search: srw.ti=Markdown and srw.ti=Architectural</title>
    <id>http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=srw.ti%3DMarkdown+and+srw.ti%3DArchitectural&amp;start=1&amp;count=10&amp;format=atom&amp;wskey=...ourkey...</id>
    <updated>2021-07-07T18:17:09-04:00</updated>
    <subtitle>Search results for srw.ti=Markdown and srw.ti=Architectural at http://worldcat.org/webservices/catalog</subtitle>
    <opensearch:totalResults>1</opensearch:totalResults>
    <opensearch:startIndex>1</opensearch:startIndex>
    <opensearch:itemsPerPage>10</opensearch:itemsPerPage>
    <opensearch:Query role="request" searchTerms="srw.ti=Markdown and srw.ti=Architectural" startPage="1"/>
    <link rel="alternate" href="http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=srw.ti%3DMarkdown+and+srw.ti%3DArchitectural&amp;start=1&amp;count=10&amp;wskey=yuxeAzDLufk3pxfKFY2SJqUQg1yHGTwX7QkG2zpStsnTlSdhZISwQzdj3rQZ0Czl15y6ZuSMRRl4W2xV" type="text/html"/>
    <link rel="self" href="http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=srw.ti%3DMarkdown+and+srw.ti%3DArchitectural&amp;start=1&amp;count=10&amp;format=atom&amp;wskey=...ourkey..." type="application/atom+xml"/>
    <link rel="first" href="http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=srw.ti%3DMarkdown+and+srw.ti%3DArchitectural&amp;start=1&amp;count=10&amp;format=atom&amp;wskey=...ourkey..." type="application/atom+xml"/>
    <link rel="last" href="http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=srw.ti%3DMarkdown+and+srw.ti%3DArchitectural&amp;start=1&amp;count=10&amp;format=atom&amp;wskey=...ourkey..." type="application/atom+xml"/>
    <link rel="search" type="application/opensearchdescription+xml" href="http://worldcat.org/webservices/catalog/opensearch.description.xml"/>
    <entry>
        <author>
            <name>Abbott, Martin L.</name>
        </author>
        <title>The art of scalability : scalable web architecture, processes, and organizations for the modern enterprise</title>
        <link href="http://worldcat.org/oclc/904905227"/>
        <id>http://worldcat.org/oclc/904905227</id>
        <updated>2019-10-02T23:41:13Z</updated>
        <summary>In The Art of Scalability, Second Edition, leading scalability consultants Martin L. Abbott and Michael T. Fisher cover everything you need to know to smoothly scale products and services for any requirement. This extensively revised edition reflects new technologies, strategies, and lessons, as well as new case studies from the authors' pioneering consulting practice, AKF Partners. Writing for technical and nontechnical decision-makers, Abbott and Fisher cover everything that impacts scalability, including architecture, process, people, organization, and technology. Their insights and recommendations reflect more than thirty years of experience at companies ranging from eBay to Visa, and Salesforce.com to Apple. You'll find updated strategies for structuring organizations to maximize agility and scalability, as well as new insights into the cloud (IaaS/PaaS) transition, NoSQL, DevOps, business metrics, and more. Using this guide's tools and advice, you can systematically clear away obstacles to scalability-and achieve unprecedented IT and business performance.</summary>
        <dc:identifier>urn:ISBN:9780134032801</dc:identifier>
        <dc:identifier>urn:ISBN:0134032802</dc:identifier>
        <dc:identifier>urn:LCCN:2015009317</dc:identifier>
        <oclcterms:recordIdentifier>904905227</oclcterms:recordIdentifier>
    </entry>
</feed>

This is not at all a relation to the queried paper.

@koppor koppor removed the status: changes required Pull requests that are not yet complete label Jul 7, 2021
@koppor koppor marked this pull request as draft July 7, 2021 22:27
@koppor
Copy link
Member

koppor commented Jul 7, 2021

The API key customization is done at #7720.

@koppor
Copy link
Member

koppor commented Sep 2, 2021

This PR is currently too much work to get it finished.

Main points:

  1. Uses old WorldCat API 1.0. Not sure how future proof this is.
  2. Querying using the 1.0 API lead to wrong results (see Add Worldcat fetcher #6035 (comment))
  3. The PR misses the important feature to search for a query string (see Support Worldcat.org as fetcher #1065 (comment)). The current implemented functionality is to add BibTeX data to an existing entry.

Thus, I close this PR and hope that some other external contributor will take over.

Am sorry that I did not guide straight from the beginning through JabRef's different fetcher possibilities (the documentation at https://devdocs.jabref.org/advanced-reading/fetchers is far from being complete) and stressing that the most demanded feature is that a user searches for new entries.

@koppor koppor closed this Sep 2, 2021
koppor pushed a commit that referenced this pull request May 1, 2022
25512a5 Update sheldon.yaml
78c5ba4 Create innovations-therapeutiques-en-oncologie.csl (#6032)
70ab28a style for Revista Ladinia (#6035)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 25512a5
Jonathan-Oliveira pushed a commit to Jonathan-Oliveira/jabref that referenced this pull request May 7, 2022
25512a5 Update sheldon.yaml
78c5ba4 Create innovations-therapeutiques-en-oncologie.csl (JabRef#6032)
70ab28a style for Revista Ladinia (JabRef#6035)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 25512a5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants