Skip to content

Commit fd123eb

Browse files
committed
🚸 Use the current working directory as default report_path
1 parent fe1d0ea commit fd123eb

15 files changed

Lines changed: 31 additions & 22 deletions

‎R/add_abstract.R‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#' @importFrom fs is_dir is_file path
1010
#' @importFrom utils head tail
1111
#' @importFrom yaml read_yaml write_yaml
12-
add_abstract <- function(report_path) {
12+
add_abstract <- function(report_path = ".") {
1313
assert_that(is.string(report_path), noNA(report_path), is_dir(report_path))
1414
target <- path(report_path, "_quarto.yml")
1515
stopifnot("no `_quarto.yml` found at `report_path`" = is_file(target))

‎R/add_bibliography.R‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#' @importFrom fs is_dir is_file file_exists path
1010
#' @importFrom utils head tail
1111
#' @importFrom yaml read_yaml write_yaml
12-
add_bibliography <- function(report_path) {
12+
add_bibliography <- function(report_path = ".") {
1313
assert_that(is.string(report_path), noNA(report_path), is_dir(report_path))
1414
target <- path(report_path, "_quarto.yml")
1515
stopifnot("no `_quarto.yml` found at `report_path`" = is_file(target))

‎R/add_chapter.R‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#' @importFrom fs is_dir is_file path
1919
#' @importFrom utils head tail
2020
#' @importFrom yaml read_yaml
21-
add_chapter <- function(report_path, title, filename, toc = TRUE) {
21+
add_chapter <- function(report_path = ".", title, filename, toc = TRUE) {
2222
assert_that(is.string(report_path), noNA(report_path), is_dir(report_path))
2323
target <- path(report_path, "_quarto.yml")
2424
stopifnot("no `_quarto.yml` found at `report_path`" = is_file(target))

‎R/add_cover.R‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#' @importFrom fs file_move is_dir is_file path
88
#' @importFrom pdftools pdf_convert pdf_subset
99
#' @importFrom yaml read_yaml write_yaml
10-
add_cover <- function(report_path, cover_pdf) {
10+
add_cover <- function(report_path = ".", cover_pdf) {
1111
assert_that(
1212
is.string(report_path),
1313
noNA(report_path),

‎R/add_index.R‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#' @importFrom assertthat assert_that is.string has_name noNA
99
#' @importFrom fs is_dir is_file path
1010
#' @importFrom yaml read_yaml write_yaml
11-
add_index <- function(report_path) {
11+
add_index <- function(report_path = ".") {
1212
assert_that(is.string(report_path), noNA(report_path), is_dir(report_path))
1313
target <- path(report_path, "_quarto.yml")
1414
stopifnot("no `_quarto.yml` found at `report_path`" = is_file(target))

‎R/add_recommendations.R‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#' The file also add a table of contents, a list of figures and a list of
66
#' tables to the pdf version of the report.
77
#' @param report_path The path to the folder containing the report.
8+
#' Defaults to the current working directory.
89
#' @param lof A logical value indicating whether to add a list of figures.
910
#' Defaults to `TRUE`.
1011
#' If `TRUE`, a list of figures is added to the pdf version of the report.
@@ -17,7 +18,7 @@
1718
#' @importFrom utils head tail
1819
#' @importFrom yaml read_yaml write_yaml
1920
add_recommendations <- function(
20-
report_path,
21+
report_path = ".",
2122
lof = TRUE,
2223
lot = TRUE
2324
) {

‎R/insert_missing_metadata.R‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' @importFrom fs is_dir is_file path
66
#' @importFrom stats setNames
77
#' @importFrom yaml read_yaml write_yaml
8-
insert_missing_metadata <- function(report_path) {
8+
insert_missing_metadata <- function(report_path = ".") {
99
assert_that(is.string(report_path), noNA(report_path), is_dir(report_path))
1010
target <- path(report_path, "_quarto.yml")
1111
stopifnot("no `_quarto.yml` found at `report_path`" = is_file(target))

‎man/add_abstract.Rd‎

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎man/add_author.Rd‎

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎man/add_bibliography.Rd‎

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)