18870: Need to declare NODES as array
[arvados.git] / sdk / R / createDoc.R
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: Apache-2.0
4
5 #Run script with $Rscript createDoc.R input.Rmd output.html
6
7 require(knitr) # required for knitting from rmd to md
8 require(markdown) # required for md to html
9
10 args <- commandArgs(TRUE)
11
12 if(length(args) != 2)
13     stop("Please provide 2 arguments corresponding to input and output file!")
14
15 inputFile <- args[[1]] # .Rmd file
16 outputFile <- args[[2]] # .html file
17
18 # Create and fill temp .md file from existing .Rmd file
19 #tempMdFile <- tempfile("tempREADME", fileext = "md")
20 knitr::knit(inputFile, outputFile)
21 #knitr::knit(inputFile, tempMdFile)
22
23 # Generate HTML from temporary .md file
24 #markdown::markdownToHTML(tempMdFile, outputFile)