year <- sub("-.*", "", meta$Date)
version_note <- paste("R package version", meta$Version)
pkg <- meta$Package
title <- gsub("'", "", meta$Title)
doi <- paste0("10.32614/CRAN.package.", pkg)

citHeader("Kindly cite the geofi R package as follows:")

bibentry(bibtype = "Manual",
         header = sprintf("To cite '%s' in publications use:", pkg),
         title = sprintf("{%s: %s}", pkg, title),
         doi = "10.32614/CRAN.package.geofi",
         author = c(
                    person("Markus", "Kainu", , "markus.kainu@kapsi.fi", role = c("aut", "cre"),
                           comment = c(ORCID = "0000-0003-1376-503X")),
                    person("Joona", "Lehtomaki", , "joona.lehtomaki@iki.fi", role = "aut",
                           comment = c(ORCID = "0000-0002-7891-0843")),
                    person("Juuso", "Parkkinen", role = "ctb",
                           comment = c(ORCID = "0000-0002-7818-5901")),
                    person("Jani", "Miettinen", role = "ctb"),
                    person("Pyry", "Kantanen", role = "ctb", 
                           comment = c(ORCID = "0000-0003-2853-2765")),
                    person("Sampo", "Vesanen", role = "ctb"),
                    person("Leo", "Lahti", , "leo.lahti@iki.fi", role = "aut",
                           comment = c(ORCID = "0000-0001-5537-637X"))
                  ),
         year = year,
         version = meta$Version,
         note = version_note,
         url = "https://github.com/rOpenGov/geofi",
         key = paste0("R-", pkg)
         )


citFooter("\nMany thanks for all contributors! For more info, see: https://github.com/rOpenGov/geofi")
