oxinabox / DataDepsGenerators.jl

Utility for developers to help define DataDeps registration blocks, for reusing existing Data with DataDeps.jl
Other
18 stars 6 forks source link

Fallback from just DOI to https://dx.doi.org/<DOI> ? #63

Open oxinabox opened 5 years ago

oxinabox commented 5 years ago

I'm not 100% sure on this,

but I think if you call the general generate, without specifying a repository, and passing in a DOI,

possibly we should also check the results for if the URL: https://dx.doi.org/<DOI> had been passed instead. And even expand that URL into it's final form after all the redirects complete. Because that would work with more of the providers.

I am not sure what the best way to do this is.

It might be as an explict thing done in the generate function. Or it might be done in some providers (like JSONLD_Web) if they are passed as DOI (rather than an URL), in get_mainpage. Or it might be that we make a wrapping provider type / macro decorator to to that to multiple providers.

It would be good to have a test case showing this being useful