metacran / metacranweb

Web pages for metacran
http://www.r-pkg.org
13 stars 6 forks source link

Add ORCID rendering #96

Closed nuest closed 5 years ago

nuest commented 6 years ago

May I also add the package-lock.json ?

nuest commented 6 years ago

@gaborcsardi Anything I can do to help this along?

nuest commented 6 years ago

Good catch about rending in rorcid. The problem here is that I parse the Author field, so there are no rules on how to write your ORCID there. Compare sf and rorcid's respective DESCRIPTION files:

Package: sf
Authors@R: c(person("Edzer", "Pebesma", role = c("aut", "cre"), email = "edzer.pebesma@uni-muenster.de", comment = c(ORCID = "0000-0001-8049-7069")),
    person("Roger", "Bivand", role = "ctb", comment = c(ORCID = "0000-0003-2392-6140")),
    person("Ian", "Cook", role = "ctb"),
    person("Tim", "Keitt", role = "ctb"),
    person("Michael", "Sumner", role = "ctb"),
    person("Robin", "Lovelace", role = "ctb"),
    person("Hadley", "Wickham", role = "ctb"),
    person("Jeroen", "Ooms", role = "ctb"),
    person("Etienne", "Racine", role = "ctb"))
Author: Edzer Pebesma [aut, cre] (0000-0001-8049-7069),
  Roger Bivand [ctb] (0000-0003-2392-6140),
  Ian Cook [ctb],
  Tim Keitt [ctb],
  Michael Sumner [ctb],
  Robin Lovelace [ctb],
  Hadley Wickham [ctb],
  Jeroen Ooms [ctb],
  Etienne Racine [ctb]
Package: rorcid
Authors@R: c(person("Scott", "Chamberlain", role = c("aut", "cre"),
    email = "myrmecocystus@gmail.com", 
    comment = c(ORCID = "0000-0003-1444-9135")))
Author: Scott Chamberlain [aut, cre] (<https://orcid.org/0000-0003-1444-9135>)

So I extended the "remove the ORCID from the displayed string" logic a bit to capture the full ORCID URL by greedily removing everything between ().

I also found similar errors in blogdown and mvtnorm which the update fixes.

It might be worth implementing a parser for the Authors@R field, because there the information is more structured than in Authors, but I am not aware about any other "data" being included in the Authors field that might be removed by the new regex.

gaborcsardi commented 5 years ago

I am sorry this has taken soooo long. Deployed now: E.g. https://www.r-pkg.org/pkg/codemetar

gaborcsardi commented 5 years ago

Thanks much!