Learn R Programming

boilerplate (version 1.3.0)

boilerplate_copy_bibliography: Copy Bibliography to Project Directory

Description

Copies the bibliography file from cache to a specified directory, typically for use with Quarto documents.

Usage

boilerplate_copy_bibliography(
  db,
  target_dir = ".",
  overwrite = TRUE,
  update_first = FALSE,
  quiet = FALSE
)

Value

Path to the copied bibliography file, or NULL if operation failed

Arguments

db

Database object containing bibliography information

target_dir

Directory to copy the bibliography file to. Default is current directory.

overwrite

Logical. Whether to overwrite existing file

update_first

Logical. Whether to update from remote before copying

quiet

Logical. Suppress messages

Examples

Run this code
# \donttest{
# Create temporary directory for example
temp_dir <- tempfile()
dir.create(temp_dir)

# Initialise and import
boilerplate_init(data_path = temp_dir, create_dirs = TRUE, confirm = FALSE, quiet = TRUE)
db <- boilerplate_import(data_path = temp_dir, quiet = TRUE)

# Copy bibliography
boilerplate_copy_bibliography(db, temp_dir)

# Clean up
unlink(temp_dir, recursive = TRUE)
# }

Run the code above in your browser using DataLab