[ARVADOS] updated: 1.1.3-269-g274124d

Git user git at public.curoverse.com
Tue Apr 17 11:11:47 EDT 2018


Summary of changes:
 sdk/R/createDoc.R | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 sdk/R/createDoc.R

       via  274124d082f7268fbe3b3d5e0608a3f4b6ae68ac (commit)
      from  f7252acd6a9309d61da6b6fbd7a51003cab7a8a4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 274124d082f7268fbe3b3d5e0608a3f4b6ae68ac
Author: Fuad Muhic <muhic.fuad at gmail.com>
Date:   Tue Apr 17 17:10:04 2018 +0200

    Added script to generate html doc for .Rmd files.
    
    Arvados-DCO-1.1-Signed-off-by: Fuad Muhic <fmuhic at capeannenterprises.com>

diff --git a/sdk/R/createDoc.R b/sdk/R/createDoc.R
new file mode 100644
index 0000000..8d4c5ba
--- /dev/null
+++ b/sdk/R/createDoc.R
@@ -0,0 +1,19 @@
+#Run script with $Rscript createDoc.R input.Rmd output.html
+
+require(knitr) # required for knitting from rmd to md
+require(markdown) # required for md to html
+
+args <- commandArgs(TRUE)
+
+if(length(args) != 2)
+    stop("Please provide 2 arguments corresponding to input and output file!")
+
+inputFile <- args[[1]] # .Rmd file
+outputFile <- args[[2]] # .html file
+
+# Create and fill temp .md file from existing .Rmd file
+tempMdFile <- tempfile("tempREADME", fileext = "md")
+knitr::knit(inputFile, tempMdFile) 
+
+# Generate HTML from temporary .md file
+markdown::markdownToHTML(tempMdFile, outputFile) 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list