---
name: Andreas
surname: Gammelgaard Damsbo
position: "MD, PhD-student"
pronouns: he/him
address: "Danish Stroke Centre, Neurology, Aarhus University Hospital"
phone: "+45 2490 3612"
www: "andreas.gdamsbo.dk"
email: "andrlr@rm.dk"
github: agdamsbo
date: "`r format(Sys.time(), '%B %Y')`"
docname: publications
output:
  vitae::awesomecv:
    page_total: true
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
library(vitae)
library(dplyr)
library(tibble)
library(rorcid)

orc_id <- "0000-0002-7559-1154"

# Notes
# https://stackoverflow.com/questions/63067088/syntax-for-publication-list-with-full-authors
```

# Publications

```{r}
# library(scholar)
# scholar_id <- "Y80Xqc4AAAAJ"
# l <- get_profile(scholar_id)
# scholar::get_publications(scholar_id) |> writeLines("publications.bib")
# bibliography_entries("publications.bib") %>%
#   arrange(desc(author$family), issued)
```

```{r}
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)

bibliography_entries("pubs.bib") %>%
  arrange(desc(issued))

## Currently not working; I think it is due to error in DOI lookup with latest article.
```
