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 = "CSIndicators: Get tailored climate indicators for applications in your sector",
  doi = "10.1016/j.cliser.2023.100393",
  url = "https://www.sciencedirect.com/science/article/pii/S2405880723000547",
  journal = "Climate Services",
  publisher = "Elsevier",
  year = "2023"
)
