[Distr-commits] r851 - branches/distr-2.5/pkg/utils

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jan 10 16:06:48 CET 2013


Author: ruckdeschel
Date: 2013-01-10 16:06:47 +0100 (Thu, 10 Jan 2013)
New Revision: 851

Modified:
   branches/distr-2.5/pkg/utils/compactify-Vignettes.R
Log:
compactify-Vignettes.R auch in utils in branch eingestellt

Modified: branches/distr-2.5/pkg/utils/compactify-Vignettes.R
===================================================================
--- branches/distr-2.5/pkg/utils/compactify-Vignettes.R	2013-01-10 14:44:38 UTC (rev 850)
+++ branches/distr-2.5/pkg/utils/compactify-Vignettes.R	2013-01-10 15:06:47 UTC (rev 851)
@@ -0,0 +1,22 @@
+########## compactify all vignettes
+compactVignettes <- function(startDir="C:/rtest",rforgeproject="distr",
+                      qpdf = "C:/R/qpdf-4.0.0/bin/qpdf",
+                      gs = "C:/Program Files (x86)/Ghostscript/gs9.00/bin/gswin32",
+                      select = "distr-2.5", invert = FALSE){
+     startD <- file.path(startDir,rforgeproject)
+     dir0 <- paste(startD,dir(startD, recursive=TRUE),sep="/")
+     dir1 <- grep("inst/doc/.+\\.pdf",dir0,value=TRUE)
+     dir1 <- c(dir1,grep("vignettes/.+\\.pdf",dir0,value=TRUE))
+     if(!is.null(select)){
+        l <- length(select)
+        for(i in 1:l) dir1 <- grep(select[i],dir1, value = TRUE, invert = invert[i])
+     }
+     print(dir1)
+     tools::compactPDF(dir1, gs_quality = "ebook", qpdf=qpdf, gs_cmd=gs)
+}
+
+if(FALSE){
+## Examples
+compactVignettes()
+compactVignettes(select="branches", invert=TRUE)
+}
\ No newline at end of file



More information about the Distr-commits mailing list