meta <- if (exists("meta")) meta else NULL

if (is.null(meta) || !is.list(meta)) {
  meta <- as.list(read.dcf("DESCRIPTION")[1, ])
}

.pkg_year <- format(Sys.Date(), "%Y")

bibentry(
  bibtype = "Manual",
  title   = "{lexicon}: Lexicon Data",
  author  = person(given = c("Tyler", "W."), family = "Rinker"),
  year    = .pkg_year,
  note    = paste("R package version", meta[["Version"]]),
  url     = meta[["URL"]],
  textVersion = paste(
    "Rinker, T. W.",
    sprintf("(%s).", .pkg_year),
    "lexicon: Lexicon Data.",
    sprintf("R package version %s.", meta[["Version"]]),
    meta[["URL"]]
  )
)


