Skip to contents

This function allows you to check, display, or initialize froggeR settings for Quarto documents. Settings are stored in `~/.config/froggeR/config.yml` for persistence across froggeR projects.

Usage

froggeR_settings(update = TRUE, verbose = TRUE)

Arguments

update

Logical. If TRUE (default), prompts to update existing settings or create new ones if none exist.

verbose

Logical. If TRUE (default), settings output is printed to the console.

Value

Invisibly returns the current settings list.

Details

The function manages the following settings: - `name`: Your Name (required) - `email`: your.email@example.com (required) - `orcid`: 0000-0000-0000-0000 (optional) - `url`: https://github.com/yourUsername (optional) - `affiliations`: Your Institution (optional) - `toc`: Table of Contents (defaults to this if left empty)

When run interactively with `update = TRUE`, it provides a menu-driven interface for updating these settings. If settings don't exist, it will prompt to create them regardless of the `update` parameter.

Examples

# \donttest{
# Update settings interactively with console feedback
froggeR_settings(update = TRUE, verbose = TRUE)
#> Updating froggeR settings. Leave blank to keep current values.
#> Enter value for Name: 
#> Enter value for e-mail: 
#> Enter value for ORCID: 
#> Enter value for URL: 
#> Enter value for Affiliation: 
#> 
#> Current froggeR settings:
#> Name:              
#> email:             
#> ORCID:             
#> URL:               
#> Affiliations:      
#> Table of Contents: Table of Contents
#> 

# Save settings without updating and print console output
settings <- froggeR_settings(update = FALSE, verbose = TRUE)
#> Updating froggeR settings. Leave blank to keep current values.
#> Enter value for Name: 
#> Enter value for e-mail: 
#> Enter value for ORCID: 
#> Enter value for URL: 
#> Enter value for Affiliation: 
#> 
#> Current froggeR settings:
#> Name:              
#> email:             
#> ORCID:             
#> URL:               
#> Affiliations:      
#> Table of Contents: Table of Contents
#> 

# Save settings without updating and suppress console output
settings <- froggeR_settings(update = FALSE, verbose = FALSE)
#> Updating froggeR settings. Leave blank to keep current values.
#> Enter value for Name: 
#> Enter value for e-mail: 
#> Enter value for ORCID: 
#> Enter value for URL: 
#> Enter value for Affiliation: 
# }