Newer
Older
#' @param reports_dir [character] path for the reports
#' @param reports [character] subfolders containing each report
#' @param publish_dir [character] rendering output path relatively to the report
#' folder which is in format `"./reports/my_report"`
#' @param output_format output format, see [bookdown::render_book]. Only
#' `"bookdown::gitbook"` and `"bookdown::pdf_book"` are currently handled
#' @param clean_cache [logical] clean Rmarkdown cache files
#' @param ... Parameters passed to [render_report] and [bookdown::render_book]
#'
#' @return `NULL`, this function is used for side effect.
#' @export
#' @rdname render_reports
#'
#' @examples
render_reports <- function(reports_dir = "./reports",
reports = list.dirs(reports_dir),
publish_dir = "../../public/reports",
...) {
options(knitr.duplicate.label = 'allow')
message("folder list:")
message("*******************************************************************")
message("*******************************************************************")
path <-
render_report(input = file.path(reports_dir, report),
output_dir = file.path(publish_dir, report),
...)