diff --git a/NAMESPACE b/NAMESPACE index 9e9fa9f..8a7e6d5 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -5,14 +5,17 @@ export(quarto_add_extension) export(quarto_binary_sitrep) export(quarto_create_project) export(quarto_inspect) +export(quarto_list_extensions) export(quarto_path) export(quarto_preview) export(quarto_preview_stop) export(quarto_publish_app) export(quarto_publish_doc) export(quarto_publish_site) +export(quarto_remove_extension) export(quarto_render) export(quarto_serve) +export(quarto_update_extension) export(quarto_use_template) export(quarto_version) import(rlang) @@ -28,4 +31,5 @@ importFrom(rstudioapi,isAvailable) importFrom(rstudioapi,viewer) importFrom(tools,vignetteEngine) importFrom(utils,browseURL) +importFrom(utils,read.table) importFrom(yaml,write_yaml) diff --git a/R/list.R b/R/list.R index 50d92ae..6aa76d8 100644 --- a/R/list.R +++ b/R/list.R @@ -12,6 +12,7 @@ #' #' @importFrom rlang is_interactive #' @importFrom cli cli_abort +#' @importFrom utils read.table #' @export quarto_list_extensions <- function(quiet = FALSE, quarto_args = NULL){ quarto_bin <- find_quarto() @@ -23,7 +24,7 @@ quarto_list_extensions <- function(quiet = FALSE, quarto_args = NULL){ if (grepl("No extensions are installed", stderr_cleaned)) { invisible() } else{ - invisible(read.table(text = stderr_cleaned, header = TRUE, fill = TRUE, sep = "", stringsAsFactors = FALSE)) + invisible(utils::read.table(text = stderr_cleaned, header = TRUE, fill = TRUE, sep = "", stringsAsFactors = FALSE)) } } diff --git a/R/remove.R b/R/remove.R index 49f8edf..cc8f54b 100644 --- a/R/remove.R +++ b/R/remove.R @@ -23,7 +23,7 @@ #' \dontrun{ #' # Remove an already installed extension #' quarto_remove_extension("quarto-ext/fontawesome") -#' +#' } #' @importFrom rlang is_interactive #' @importFrom cli cli_abort #' @export diff --git a/man/quarto_list_extensions.Rd b/man/quarto_list_extensions.Rd new file mode 100644 index 0000000..aba1743 --- /dev/null +++ b/man/quarto_list_extensions.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/list.R +\name{quarto_list_extensions} +\alias{quarto_list_extensions} +\title{List Installed Quarto extensions} +\usage{ +quarto_list_extensions(quiet = FALSE, quarto_args = NULL) +} +\arguments{ +\item{quiet}{Suppress warning and other messages.} + +\item{quarto_args}{Character vector of other \code{quarto} CLI arguments to append +to the Quarto command executed by this function. This is mainly intended for +advanced usage and useful for CLI arguments which are not yet mirrored in a +dedicated parameter of this \R function. See \verb{quarto render --help} for options.} +} +\description{ +List Quarto Extensions in this folder or project by running \verb{quarto list} +} +\examples{ +\dontrun{ +# List Quarto Extensions in this folder or project +quarto_list_extensions() +} + +} diff --git a/man/quarto_publish_doc.Rd b/man/quarto_publish_doc.Rd index df6c011..8e6ae6f 100644 --- a/man/quarto_publish_doc.Rd +++ b/man/quarto_publish_doc.Rd @@ -50,11 +50,12 @@ Defaults to the name of the \code{input}.} supplied, will often be displayed in favor of the name. When deploying a new document, you may supply only the title to receive an auto-generated name} -\item{account, server}{Uniquely identify a remote server with either your -user \code{account}, the \code{server} name, or both. If neither are supplied, and -there are multiple options, you'll be prompted to pick one. +\item{server}{Server name. Required only if you use the same account name on +multiple servers.} -Use \code{\link[rsconnect:accounts]{accounts()}} to see the full list of available options.} +\item{account}{Account to deploy application to. This parameter is only +required for the initial deployment of an application when there are +multiple accounts configured on the system (see \link[rsconnect]{accounts}).} \item{render}{\code{local} to render locally before publishing; \code{server} to render on the server; \code{none} to use whatever rendered content currently @@ -62,10 +63,7 @@ exists locally. (defaults to \code{local})} \item{metadata}{Additional metadata fields to save with the deployment record. These fields will be returned on subsequent calls to -\code{\link[rsconnect:deployments]{deployments()}}. - -Multi-value fields are recorded as comma-separated values and returned in -that form. Custom value serialization is the responsibility of the caller.} +\code{\link[rsconnect:deployments]{deployments()}}.} \item{...}{Named parameters to pass along to \code{rsconnect::deployApp()}} } diff --git a/man/quarto_remove_extension.Rd b/man/quarto_remove_extension.Rd new file mode 100644 index 0000000..e296ba1 --- /dev/null +++ b/man/quarto_remove_extension.Rd @@ -0,0 +1,45 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/remove.R +\name{quarto_remove_extension} +\alias{quarto_remove_extension} +\title{Remove a Quarto extensions} +\usage{ +quarto_remove_extension( + extension = NULL, + no_prompt = FALSE, + quiet = FALSE, + quarto_args = NULL +) +} +\arguments{ +\item{extension}{The extension to remove, either an archive or a GitHub +repository as described in the documentation +\url{https://quarto.org/docs/extensions/managing.html}.} + +\item{no_prompt}{Do not prompt to confirm approval to download external extension.} + +\item{quiet}{Suppress warning and other messages.} + +\item{quarto_args}{Character vector of other \code{quarto} CLI arguments to append +to the Quarto command executed by this function. This is mainly intended for +advanced usage and useful for CLI arguments which are not yet mirrored in a +dedicated parameter of this \R function. See \verb{quarto render --help} for options.} +} +\description{ +Remove an extension in this folder or project by running \verb{quarto remove} +} +\section{Extension Trust}{ +Quarto extensions may execute code when documents are rendered. Therefore, if +you do not trust the author of an extension, we recommend that you do not +install or use the extension. +By default \code{no_prompt = FALSE} which means that +the function will ask for explicit approval when used interactively, or +disallow installation. +} + +\examples{ +\dontrun{ +# Remove an already installed extension +quarto_remove_extension("quarto-ext/fontawesome") +} +} diff --git a/man/quarto_update_extension.Rd b/man/quarto_update_extension.Rd new file mode 100644 index 0000000..372b1eb --- /dev/null +++ b/man/quarto_update_extension.Rd @@ -0,0 +1,49 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/update.R +\name{quarto_update_extension} +\alias{quarto_update_extension} +\title{Update a Quarto extensions} +\usage{ +quarto_update_extension( + extension = NULL, + no_prompt = FALSE, + quiet = FALSE, + quarto_args = NULL +) +} +\arguments{ +\item{extension}{The extension to update, either an archive or a GitHub +repository as described in the documentation +\url{https://quarto.org/docs/extensions/managing.html}.} + +\item{no_prompt}{Do not prompt to confirm approval to download external extension.} + +\item{quiet}{Suppress warning and other messages.} + +\item{quarto_args}{Character vector of other \code{quarto} CLI arguments to append +to the Quarto command executed by this function. This is mainly intended for +advanced usage and useful for CLI arguments which are not yet mirrored in a +dedicated parameter of this \R function. See \verb{quarto render --help} for options.} +} +\description{ +Update an extension to this folder or project by running \verb{quarto update} +} +\section{Extension Trust}{ +Quarto extensions may execute code when documents are rendered. Therefore, if +you do not trust the author of an extension, we recommend that you do not +install or use the extension. +By default \code{no_prompt = FALSE} which means that +the function will ask for explicit approval when used interactively, or +disallow installation. +} + +\examples{ +\dontrun{ +# Update a template and set up a draft document from a GitHub repository +quarto_update_extension("quarto-ext/fontawesome") + +# Update a template and set up a draft document from a ZIP archive +quarto_update_extension("https://github.com/quarto-ext/fontawesome/archive/refs/heads/main.zip") +} + +}