Closed nicebread closed 10 months ago
We actually replace the DOI with the DOI returned from the server, if user chooses to fetch the information automatically.
Maybe we can ask for the DOI first, then fill in the following fields for title and year using the information we get from the server. We can show a warning, if the DOI does not exist. So instead of Title -> Year -> DOI as we currently have it, we could have DOI -> Title -> Year, where we update title and year after the DOI changes.
Are publications without a DOI allowed? If not, we can also change Title and Year to uneditable info fields.
Yes, great idea! We only want works that have a doi.
This is how I implemented it:
https://github.com/nicebread/RESQUE/assets/68744864/602b8100-fceb-4854-a038-e3277b6b9c79
Very nice! The only question is, how robust the doi retrieval is. Does it, for example, work with the following (valid) dois?
https://doi.org/10.15626/MP.2021.2911 https://doi.org/10.5964/ps.6029
Which service is used to resolve the dois?
Do we need a solution that user still can enter the title and date if the doi simply is not recognized by the system?
I would assume that it works for any valid DOI, we get the information from doi.org.
fetch('https://doi.org/' + doi, {
headers: {
Accept: 'application/vnd.citationstyles.csl+json'
}
})
The DOIs you are concerned about:
Yes, implement it like that!
I pushed my changes: 515b04038b9e0adebdcb97f467f964cd03bb1719
@nicebread you can try it.
Works great! I tried it on a slow internet connection in the train, which caused a ~4 second delay until the title and year got retrieved. Could you add a status indicator (in the "Paper title" and "Year of publication" field), such as: "[circular loading indicator] Retrieving meta-data from doi.org ..."
While working on the R scripts for the profile analysis, I had to normalize the dois, using this R script:
Because some dois were not valid, such as:
Can we do this normalization already in the web form? And add a quick check whether the constructed URL points to a valid web site? (And add a ✅ if it does, and a ❌ "doi is not valid" if it doesn't)
(related to #12)