adsabs / bumblebee

🐝 Clever face for ADS
https://ui.adsabs.harvard.edu
GNU General Public License v2.0
38 stars 21 forks source link

Make pages Papers-friendly #792

Open aaccomazzi opened 8 years ago

aaccomazzi commented 8 years ago

Papers is an application which allows people to manage their bibliographies and one way in which it does that is that it grabs some metadata from a web page contents (see http://www.papersapp.com).

Alyssa points out that this does not work for bumblebee, probably for the same reason why Zotero also is not able to extract this info (see issue #560).

Here is a screenshot she sent me. Usually you'd expect to see article information in the right column.

image

Asked if this is a deal-breaker, Alyssa reports:

Sorry Alberto. It’s pretty serious. I import articles into Papers this way very routinely. The issue is that the Search (ADS) function inside Papers also doesn’t return full information, so neither way (Papers to ADS or ADS to Papers) currently is working if I use Bumblebee. That’s pretty bad, no?

aholachek commented 8 years ago

I'm not sure if the JavaScript is a compounding factor, but I assume the bigger issue is we don't have metadata in the head right now like 2.0 and Classic, since from what I can tell that is necessary for Papers to function.

I found this example of 'highwire style' metadata tags, which seem to be what 2.0 and Classic are using, should I go ahead and set it up for bumblebee? @aaccomazzi

aholachek commented 8 years ago

So, as a test I tried to insert metadata in the head each time the abstract view was refreshed and then manually trigger a browser load event.

Here's the code of what i put in each abstract page's "onRender" function:

   $("head").append(metatagTemplate());
    dispatchEvent(new Event('load'));
    dispatchEvent(new Event("DOMContentLoaded"));
    $(document.body).trigger('load')

Basically, given what the zotero guy says here, zotero waits until the site load is "registered with the browser" so I tried to manually trigger any events i thought they might be listening to to re-check the metadata. But sadly it didn't work.

ehenneken commented 8 years ago

In case this is helpful, this is how I solved the Papers problem in Classic:

Associate the MIME type "application/x-endnote-refer" and the file extension "enw" with the application "/Applications/Papers.app" (assuming Papers is in this location).

In Classic you can now export records directly into Papers by selecting them, scrolling down the list of records, selecting "EndNote Format" and "Load into EndNote" as return method. I think the "Load into EndNote" in Classic is mostly done by setting "application/x-endnote-refer" in the response header (AA would know the details).

aholachek commented 8 years ago

All right after implementing the suggestions here, I've got it working in Zotero for Firefox. But there's something wrong with my Chrome plugin since it won't download metadata from any website, it just says "error" and redirects to this page

aholachek commented 8 years ago

after the fix for zotero is deployed (also works for mendeley) i will email the papers support people to see if they have any suggestions

aholachek commented 8 years ago

i submitted a question to the papers people on their papersapp support page 6 days ago but got no response

ehenneken commented 7 years ago

This issue popped up again: Feedback from Peter Kurczynski (pkurczyn@nsf.gov) January 24 2017

I would suggest that the new interface be made to pass metadata for a search result to an application like Papers.

I use Papers 2.8;  the classic ADS interface is able to pass metadata for a search result into Papers, when I press the "Papers" button that it installed on my web browser.  This functionality is lost in the new ADS interface.

Not sure if this is something that Papers could change, or if it is something with the format of ADS search results with the new interface.
aaccomazzi commented 7 years ago

For completeness, this is the feedback we got from Matthias at Papers:

Tbh, I'm not sure that what you're doing is a good idea. You're basically removing access to all metadata of a well-known repository for many (most?) clients, esp. those which are not able to handle Javascript and/or delayed DOM content. In my opinion, all basic metadata should be available via plain HTML so that clients and tools (whatever these might be) can access this information freely & easily. Zotero, Mendeley & Papers are just three of these tools. When importing via bookmarklet, Papers just fetches the HTML source at the given address location. I would suggest that you continue to support this use case. In addition, a proper API would be also very nice to have.

To which @aholachek replied:

Thanks for your reply. In reviewing this email some months later I realized that you seemed to ask if we have an API, which we do. Information can be found at https://github.com/adsabs/adsabs-dev-api. Would there be a way to use this to grab the metadata?

But we never heard back AFAIK