From aca216b9c50d8e8fa11b43dac5ce78d841ee19c6 Mon Sep 17 00:00:00 2001 From: vnijs Date: Thu, 15 Sep 2016 18:18:16 -0700 Subject: [PATCH] remove screenshots --- build/remove_screenshots.R | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 build/remove_screenshots.R diff --git a/build/remove_screenshots.R b/build/remove_screenshots.R new file mode 100644 index 0000000..0279f93 --- /dev/null +++ b/build/remove_screenshots.R @@ -0,0 +1,19 @@ +## based on https://gist.github.com/mages/1544009 +cdir <- setwd("~/gh/radiant.multivariate/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) { + f <- fn[1] + org <- readLines(f) + changed <- gsub("figures_multivariate/", "https://radiant-rstats.github.io/docs/multivariate/figures_multivariate/", org) + cat(changed, file=f, sep="\n") +} + +setwd(cdir)