build/remove_screenshots.R

## based on https://gist.github.com/mages/1544009
cdir <- setwd("./inst/app/tools/help")

## remove all local png files
list.files("./figures/", pattern = "*.png")
unlink("figures/*.png")
check <- list.files("./figures/", pattern = "*.png")
stopifnot(length(check) == 0)
cat("--", file = "figures/place_holder.txt")

fn <- list.files(pattern = "\\.(md|Rmd)$")
for (f in fn) {
  org <- readLines(f, warn = FALSE)
  changed <- gsub("figures_model/", "https://radiant-rstats.github.io/docs/model/figures_model/", org)
  cat(changed, file = f, sep = "\n")
}

setwd(cdir)

## submit package to CRAN
devtools::submit_cran()

## use the git-tab to manually revert all changes to docs and
## deletion of images

## remove after revering the changes from the code above
unlink("inst/app/tools/help/figures/place_holder.txt")
radiant-rstats/radiant.model documentation built on Nov. 29, 2023, 5:59 a.m.