library(shiny) library(showtext) library(gt) library(lubridate) library(qbr) library(tidyverse) library(quarto) ui <- fluidPage( titlePanel("My Title"), sidebarLayout( sidebarPanel(width = 3, textInput(inputId = "user.string", label = "Enter a string:"), br(), downloadButton(outputId = "report", label = "Generate Report:"), ), mainPanel( ) ) ) server <- function(input, output) { dynamic.filename <- paste0("Cages_", format(Sys.Date(), "%y%m%d"), format(Sys.time(), "%H%M%S"), ".html") output$report <- downloadHandler( filename = dynamic.filename, content = function(file) { temp_file <- tempfile(fileext = ".html") quarto::quarto_render( "checklist.qmd", output_format = "html", output_file = temp_file, execute_params = list(userkey = input$user.string) ) file.copy(temp_file, file) } ) } # Run the application shinyApp(ui = ui, server = server)