# Code copied from citation()
author <- meta$`Authors@R`
if (length(author)) {
    aar <- .read_authors_at_R_field(author)
    author <- Filter(function(e) {
        !(is.null(e$given) && is.null(e$family)) && !is.na(match("aut",
            e$role))
    }, aar)
}

if (is.null(meta$Date)) {
  date <- format(Sys.Date(), "%Y")
} else {
  date <- format(as.Date(meta$Date), "%Y")
}

bibentry(
  bibtype = "Manual",
  title   = paste0(meta$Package, ": ", gsub("[[:space:]]+", " ", meta$Title)),
  author  = author,
  year    = date,
  doi     = "10.5281/zenodo.10471458",
  url     = "https://epiverse-trace.github.io/simulist/"
)
