aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2019-03-20 15:58:34 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2019-03-20 15:58:34 +0100
commit1cc812d69311a1b3f846d0fb160a68a26fe11d65 (patch)
tree9398e567f31c6080879392020fcb2462776b588f
parentfe9c6bf06cb89ced0f61015bb24a88990a2c8fe8 (diff)
Use shQuote for filename creation in chent$pdf()
-rw-r--r--ChangeLog14
-rw-r--r--DESCRIPTION2
-rw-r--r--R/chent.R5
3 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 31c099d..b8c0898 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+commit fe9c6bf06cb89ced0f61015bb24a88990a2c8fe8
+Author: Johannes Ranke <jranke@uni-bremen.de>
+Date: 2019-02-21 16:00:30 +0100
+
+ Use codecov and update docs
+
+commit bfa20a8c262580e38d30cfa95e75d1b01b568d07
+Author: Johannes Ranke <jranke@uni-bremen.de>
+Date: 2019-02-19 23:19:31 +0100
+
+ Use rsvg instead of grConvert
+
+ as grConvert is not on CRAN
+
commit a7e2c2008699b590325ccd848562881251676faf
Author: Johannes Ranke <jranke@uni-bremen.de>
Date: 2019-02-19 20:46:18 +0100
diff --git a/DESCRIPTION b/DESCRIPTION
index a46a427..123c12f 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -2,7 +2,7 @@ Package: chents
Type: Package
Title: Chemical Entities as R Objects
Version: 0.2-7
-Date: 2019-02-21
+Date: 2019-03-20
Authors@R: c(person("Johannes", "Ranke", role = c("aut", "cre", "cph"),
email = "jranke@uni-bremen.de"))
Description: Utilities for dealing with chemical entities and associated
diff --git a/R/chent.R b/R/chent.R
index f6a8b09..ae23aeb 100644
--- a/R/chent.R
+++ b/R/chent.R
@@ -194,7 +194,7 @@ chent <- R6Class("chent",
PythonInR::pyExec("d2d.DrawMolecule(mol)")
PythonInR::pyExec("d2d.FinishDrawing()")
self$svg <- PythonInR::pyGet("d2d.GetDrawingText()")
- svgfile <- tempfile(fileext = ".svg")
+ svgfile <- tempfile(fileext = ".svg")
psfile <- tempfile(fileext = ".ps")
writeLines(self$svg, svgfile)
rsvg::rsvg_ps(svgfile, psfile)
@@ -383,7 +383,8 @@ chent <- R6Class("chent",
plot(self)
dev.off()
message("Cropping file '", path, "' using pdfcrop")
- system(paste("pdfcrop --margin 10", path, path, "> /dev/null"))
+ bash_path <- shQuote(path)
+ system(paste("pdfcrop --margin 10", bash_path, bash_path, "> /dev/null"))
# Get the height of the MediaBox
head <- readLines(path, n = 20, skipNul = TRUE)

Contact - Imprint