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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 15 12:46:19 CET 2013


Author: ruckdeschel
Date: 2013-01-15 12:46:19 +0100 (Tue, 15 Jan 2013)
New Revision: 858

Modified:
   branches/distr-2.5/pkg/utils/RBuild.bat
   pkg/utils/RBuild.bat
   pkg/utils/compactify-Vignettes.R
   pkg/utils/finde.r
Log:
changed utility RBuild.bat for smaller vignettes 

Modified: branches/distr-2.5/pkg/utils/RBuild.bat
===================================================================
--- branches/distr-2.5/pkg/utils/RBuild.bat	2013-01-13 11:08:18 UTC (rev 857)
+++ branches/distr-2.5/pkg/utils/RBuild.bat	2013-01-15 11:46:19 UTC (rev 858)
@@ -1,3 +1,3 @@
 @echo off
-call R CMD build --compact-vignettes --resave-data %1
+call R CMD build --compact-vignettes="gs+qpdf" --resave-data %1
 echo on
\ No newline at end of file

Modified: pkg/utils/RBuild.bat
===================================================================
--- pkg/utils/RBuild.bat	2013-01-13 11:08:18 UTC (rev 857)
+++ pkg/utils/RBuild.bat	2013-01-15 11:46:19 UTC (rev 858)
@@ -1,3 +1,3 @@
 @echo off
-call R CMD build --compact-vignettes --resave-data %1
+call R CMD build --compact-vignettes="gs+qpdf" --resave-data %1
 echo on
\ No newline at end of file

Modified: pkg/utils/compactify-Vignettes.R
===================================================================
--- pkg/utils/compactify-Vignettes.R	2013-01-13 11:08:18 UTC (rev 857)
+++ pkg/utils/compactify-Vignettes.R	2013-01-15 11:46:19 UTC (rev 858)
@@ -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

Modified: pkg/utils/finde.r
===================================================================
--- pkg/utils/finde.r	2013-01-13 11:08:18 UTC (rev 857)
+++ pkg/utils/finde.r	2013-01-15 11:46:19 UTC (rev 858)
@@ -28,6 +28,7 @@
 finde(x="\"loc\"", dir ="C:/rtest/distr/branches/distr-2.4/pkg/distrEx/", rec=TRUE)
 finde(x=".makeQNew", dir ="C:/rtest/distr/pkg/distr/R")
 finde(x="http://distr\\.r-forge\\.r-project\\.org/distr\\.pdf", dir ="C:/rtest/distr/", rec=TRUE)
+finde(x="cniper.+\\(", dir ="C:/rtest/robast/branches/robast-0.9/pkg", rec=TRUE)
 
 ersetze <- function(x0 = "nchar", x1="nchar", dir="C:/rtest/distr/pkg/distr/R", ext = "R", rec = FALSE){
   ow <- getwd()



More information about the Distr-commits mailing list