Converts a list of parsed Shinylive applications into a single Quarto document. Creates a properly formatted .qmd file with YAML frontmatter, organized sections for each application, and correctly formatted code blocks with all necessary markers and options.
Arguments
- apps
List of parsed Shinylive applications. Each application should contain:
engine
: Character string identifying the app type ("r"
or"python"
)options
: List of YAML-style options from the original code blockfiles
: Named list of file definitions, each containing:name
: Character string of the file namecontent
: Character string of the file contenttype
: Character string indicating the file type
- qmd_path
Character string. Path where the Quarto document should be written. Should end with
.qmd
extension. Parent directory will be created if it doesn't exist.
Details
The function performs these steps:
Creates YAML frontmatter with required Quarto settings
For each application:
Adds a section header with application number
Creates a code block with appropriate engine (
shinylive-r
/shinylive-python
)Converts and adds all application options
Adds file markers and content for each file
Properly closes the code block
Writes the complete document to the specified path
Option Formatting
Options are converted to YAML format based on their type:
Logical:
#| option: true
or#| option: false
Numeric:
#| option: 500
Character:
Single:
#| option: "value"
Vector:
#| option: ["value1", "value2"]
See also
write_apps_to_dirs()
for alternative directory output format