citHeader("To cite package 'CSTools' in publications use:")

yr <- sub('.*(2[[:digit:]]{3})-.*', '\\1', meta$Date, perl = TRUE)
if (length(yr) == 0) yr <- format(Sys.Date(), '%Y')

bibentry(
  bibtype = 'Manual',
  title = paste0(meta$Package, ': ', meta$Title),
  author = Filter(function(p) 'aut' %in% p$role, as.person(meta$Author)),
  year = yr,
  note = paste('R package version', meta$Version),
  url = meta$URL
)

bibentry(
  bibtype = "Article",
  author = c(person("Núria", "Pérez-Zanón", email = "nuria.perez@bsc.es"), person("", "et al.")),
  title = "Climate Services Toolbox (CSTools) v4.0: from climate forecasts to climate forecast information",
  doi = "10.5194/gmd-15-6115-2022",
  url = "https://gmd.copernicus.org/articles/15/6115/2022/",
  journal = "Geoscientific Model Development",
  publisher = "European Geosciences Union",
  year = "2022"
)
