boilerplate_update_bibliography {boilerplate} | R Documentation |
Update Bibliography from Remote Source
Description
Downloads and caches a bibliography file from a remote URL specified in the database.
Usage
boilerplate_update_bibliography(
db,
cache_dir = NULL,
force = FALSE,
quiet = FALSE
)
Arguments
db |
Database object containing bibliography information |
cache_dir |
Directory to cache the bibliography file. Default uses tools::R_user_dir("boilerplate", "cache") |
force |
Logical. Force re-download even if cached file exists |
quiet |
Logical. Suppress messages |
Value
Path to the local bibliography file, or NULL if no bibliography specified
Examples
# 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)
# Update bibliography
bib_file <- boilerplate_update_bibliography(db)
# Clean up
unlink(temp_dir, recursive = TRUE)
[Package boilerplate version 1.3.0 Index]