Mercurial > repos > mingchen0919 > tripal_db_explorer
diff search_contents_render.R @ 6:4bc7752bfd72 draft
resources summary + search
| author | mingchen0919 |
|---|---|
| date | Mon, 19 Mar 2018 16:29:51 -0400 |
| parents | 5accedb3133e |
| children |
line wrap: on
line diff
--- a/search_contents_render.R Mon Mar 19 00:43:50 2018 -0400 +++ b/search_contents_render.R Mon Mar 19 16:29:51 2018 -0400 @@ -10,6 +10,7 @@ library(getopt) library(rmarkdown) +library(jsonlite) #------------------------------------------------ @@ -17,13 +18,13 @@ # load helper function source(paste0(Sys.getenv('TOOL_DIR'), '/helper.R')) # import getopt specification matrix from a csv file -spec_csv = paste0(Sys.getenv('TOOL_DIR'), '/getopt_specification.csv') -opt = getopt(getopt_specification_matrix(spec_csv)) +opt = getopt(getopt_specification_matrix('/search_contents.csv')) opt$X_t = Sys.getenv('TOOL_DIR') +print(opt) #---------------------------------------------------- -#-----------using passed arguments in R +#-----------using passed arguments in R # to define system environment variables--- do.call(Sys.setenv, opt[-1]) #---------------------------------------------------- @@ -34,7 +35,7 @@ OUTPUT_DIR = opt$X_d TOOL_DIR = opt$X_t OUTPUT_REPORT = opt$X_o -RMD_NAME = '' +RMD_NAME = 'search_contents.Rmd' # create the output associated directory to store all outputs dir.create(OUTPUT_DIR, recursive = TRUE) @@ -48,4 +49,4 @@ ##--------end of code rendering .Rmd templates---------------- sink() -##=========== End of sinking output============================= \ No newline at end of file +##=========== End of sinking output=============================
