manual orcid doi pull
This commit is contained in:
parent
cb352719be
commit
60dc4de757
35
cv.Rmd
35
cv.Rmd
@ -60,21 +60,24 @@ tribble(
|
||||
library(dplyr)
|
||||
library(rorcid)
|
||||
|
||||
# works <- rorcid::orcid_works(orc_id)[[1]]
|
||||
#
|
||||
# edu <- do.call("rbind",
|
||||
# rorcid::orcid_educations(orc_id)[[1]]
|
||||
# )
|
||||
|
||||
# orc_id <- "0000-0002-7559-1154"
|
||||
# pubs <- orcid_citations(orcid = orc_id, put_code=NULL)
|
||||
#
|
||||
# writeLines(pubs$citation, "publications.bib")
|
||||
# bibliography_entries("pubs.bib") %>%
|
||||
# arrange(desc(author$family), issued)
|
||||
if (!file.exists("publications.bib")) {
|
||||
works <- rorcid::orcid_works(orc_id)[[1]]
|
||||
|
||||
dois <-
|
||||
Reduce(c, do.call(
|
||||
cbind,
|
||||
lapply(works$works$`external-ids.external-id`, function(a) {
|
||||
if ("doi" %in% c(a[[1]])) {
|
||||
s <- do.call(cbind, a)
|
||||
s[, "external-id-normalized.value"][s[, "external-id-type"] == "doi"]
|
||||
}
|
||||
})
|
||||
)) |> na.omit() |> unique()
|
||||
|
||||
# rorcid::check_dois(dois)
|
||||
RefManageR::GetBibEntryWithDOI(dois) |> rbibutils::writeBib("publications.bib")
|
||||
}
|
||||
|
||||
bibliography_entries("pubs.bib") %>%
|
||||
arrange(desc(issued))
|
||||
|
||||
## Currently not working; I think it is due to error in DOI lookup with latest article.
|
||||
bibliography_entries("publications.bib") %>%
|
||||
arrange(desc(author$family), issued)
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user