eprintsug / altmetric

Altmetric integration for EPrints
2 stars 1 forks source link

Improve default DOI extraction #13

Open jesusbagpuss opened 1 year ago

jesusbagpuss commented 1 year ago

If someone has entered a DOI resolver URL into the id_number field, the Altmetric badge will fail, as this: https://github.com/eprintsug/altmetric/blob/a9cb2a2b0ccf0a5c35b9fa567dc41c0f1875bbf4/cfg/cfg.d/z_altmetric.pl#L37-L41 will return the URL, not the DOI from the URL.

jesusbagpuss commented 4 days ago

Should use this module to parse DOI from resolver URL: https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/DOI.pm https://github.com/eprints/eprints3.4/blob/master/perl_lib/EPrints/DOI.pm

Would need wrapping to allow older versions of EPrints (v3.3.16 or earlier) that didn't include the module to work.