Skip to content

Commit

Permalink
Update CITATION
Browse files Browse the repository at this point in the history
  • Loading branch information
brownag committed Apr 6, 2022
1 parent 6bc5f36 commit 0512d18
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
20 changes: 20 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,27 @@ library(rvest)
gsub(".*/([0-9\\.]+)$", "\\1", html_text(html_element(html_element(read_html("https://github.com/ncss-tech/soilDB/releases.atom"), "entry"), "id")))
}
.update_CITATION <- function(version) {
x <- sprintf('citHeader("To cite soilDB in publications use:")
citEntry(
entry = "Manual",
title = "soilDB: Soil Database Interface",
author = "Dylan Beaudette, Jay Skovlin, Stephen Roecker and Andrew Brown",
note = "R package version %s",
url = "https://CRAN.R-project.org/package=soilDB",
year = "%s",
textVersion = "Dylan Beaudette, Jay Skovlin, Stephen Roecker and Andrew Brown (%s). soilDB: Soil Database Interface. R package version %s. https://CRAN.R-project.org/package=soilDB"
)
', version, format(Sys.time(), "%Y"), format(Sys.time(), "%Y"), version)
suppressWarnings(writeLines(strsplit(x, "\n")[[1]], "inst/CITATION"))
}
# get latest tagged release from github
soilDB_CRAN_VERSION <- .getLatestCRANRelease()
# update inst/CITATION
.update_CITATION(soilDB_CRAN_VERSION)
```

## Installation
Expand Down
9 changes: 3 additions & 6 deletions inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ citEntry(
entry = "Manual",
title = "soilDB: Soil Database Interface",
author = "Dylan Beaudette, Jay Skovlin, Stephen Roecker and Andrew Brown",
note = paste0("R package version ", packageVersion('soilDB')),
note = "R package version 2.6.14",
url = "https://CRAN.R-project.org/package=soilDB",
year = format(Sys.time(), "%Y"),
textVersion = paste0("Dylan Beaudette, Jay Skovlin, Stephen Roecker and Andrew Brown (",
format(Sys.time(), "%Y"),
"). soilDB: Soil Database Interface. R package version ",
packageVersion('soilDB'), ". https://CRAN.R-project.org/package=soilDB")
year = "2022",
textVersion = "Dylan Beaudette, Jay Skovlin, Stephen Roecker and Andrew Brown (2022). soilDB: Soil Database Interface. R package version 2.6.14. https://CRAN.R-project.org/package=soilDB"
)

0 comments on commit 0512d18

Please sign in to comment.