Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upGale Databases.js - New logic to access citation metadata #2076
Conversation
This comment has been minimized.
This comment has been minimized.
Please publish update after 12/20/2019 in order to coordinate with Gale releases. |
This comment has been minimized.
This comment has been minimized.
Thanks @jimmiazek . Looks good at first glance, I'll review for details next weekend the latest. Just to confirm the data is December 20th? I believe I had December 16th from Megan. |
This comment has been minimized.
This comment has been minimized.
@jimmiazek: Can you revert the .gitignore change? (You can put this in a global ignore file on your system.) |
This comment has been minimized.
This comment has been minimized.
@adam3smith - Original release date (12/16) has been moved to (12/20). |
This comment has been minimized.
This comment has been minimized.
Thanks! Looks great overall. I have no concerns about the code itself. Except two quick ones that I think are just due to the testing stage of this:
Some remaining issues on import quality:
Let me know if you have any questions about this. |
This comment has been minimized.
This comment has been minimized.
@adam3smith - made the code changes that you asked to uncomment the JSON object -- I believe this is what is causing Travis to fail. Production server is gale.com. Applied your suggestion for M2 and SP tags. For your analysis, regarding the differences for detectWeb and doWeb. This is something that will have to be addressed in the future. The doWeb is using a REST client to retrieve RIS. The detectWeb makes a different call to get different data to render the display. |
This comment has been minimized.
This comment has been minimized.
Thanks -- I'll take a look at why linting fails. I'd guess Windows EoL for the JSON header, but either way, I should be able to fix that quickly on my end. |
'inRepository': true, | ||
'translatorType': 4, | ||
'browserSupport': 'gcsibv', | ||
'lastUpdated': '2019-10-11 12:00:00' |
This comment has been minimized.
This comment has been minimized.
dstillman
Dec 12, 2019
Member
You need to revert these quote changes, which will break the translator. (For historical reasons, this is JSON, not JavaScript.)
|
||
var GaleZotero = (function () { |
This comment has been minimized.
This comment has been minimized.
dstillman
Dec 12, 2019
Member
There's no need for this encapsulation. Just put the relevant code in detectWeb()
and doWeb()
and define other top-level helper functions as necessary.
|
||
var GaleZotero = (function () { | ||
var DATA_TRANSLATOR = '32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7'; |
This comment has been minimized.
This comment has been minimized.
dstillman
Dec 12, 2019
Member
This can just go directly in the translator.setTranslator()
call below (as in all other translators), with a comment noting that it's RIS.
items[href] = title; | ||
} | ||
|
||
function processMulipleEntries(entries) { |
This comment has been minimized.
This comment has been minimized.
var map = {}; | ||
for (var item in entries) { | ||
/* istanbul ignore next */ | ||
if (entries.hasOwnProperty(item)) { |
This comment has been minimized.
This comment has been minimized.
dstillman
Dec 12, 2019
Member
This check isn't necessary — Object.prototype will never be overridden in the contexts where this will run.
function getURLs(selectedItems) { | ||
var urls = []; | ||
for (var url in selectedItems) { | ||
if (selectedItems.hasOwnProperty(url)) { |
This comment has been minimized.
This comment has been minimized.
} | ||
] | ||
} | ||
] | ||
]; // eslint-disable-line |
This comment has been minimized.
This comment has been minimized.
note: "<p>Northern Illinois University</p>" | ||
} | ||
], | ||
seeAlso: [] |
This comment has been minimized.
This comment has been minimized.
dstillman
Dec 12, 2019
Member
Please revert all the quote changes in these test cases. These tests should be generated by Scaffold and shouldn't be reformatted.
/** BEGIN TEST CASES **/ | ||
// eslint-disable-next-line no-unused-vars |
This comment has been minimized.
This comment has been minimized.
dstillman
Dec 12, 2019
Member
Remove all these eslint-disable lines. You should be using this repo's lint rules, which should handle all of this properly.
This comment has been minimized.
This comment has been minimized.
(Re: all of these comments, I'm guessing you were developing this code outside of the Translator Editor, with a different environment and different lint rules. We strongly recommend developing within the editor, and you should check the code with eslint within the repo, which should use the bundled lint rules. Among other things, the rules will ensure it's a valid translator, which this isn't.) |
This comment has been minimized.
This comment has been minimized.
@jimmiazek a bit confused why you closed this and deleted the branch? What´s the status of the updated site and code? |
This comment has been minimized.
This comment has been minimized.
It looks like the account was deleted. |
This comment has been minimized.
This comment has been minimized.
how very odd & unfortunate... |
This comment has been minimized.
This comment has been minimized.
We can still take the old version of this PR and build on top of that our changes. Give me some minutes to come up with something... |
This comment has been minimized.
This comment has been minimized.
Thanks -- we should check that they did, in fact, update their site on the 20th. Otherwise these changes won't work. |
This comment has been minimized.
This comment has been minimized.
Update: yes, it looks like all of Gale is update, so this would be nice to get in. |
This comment has been minimized.
This comment has been minimized.
Continued in #2096. |
ghost commentedDec 2, 2019
No description provided.