Skip to main content

run_render_stdout

Function run_render_stdout 

Source
pub fn run_render_stdout(
    profiles: &[String],
    family: Option<&FamilyName>,
    separator: Option<&str>,
    pre_prompt: Option<&str>,
    post_prompt: Option<&str>,
    framing: Framing,
    config_override: Option<&Path>,
    output: JsonOutput,
) -> Result<(), PrompterError>
Expand description

Render one or more profiles to stdout.

Convenience function that reads configuration and renders the specified profiles to standard output with optional separator, pre-prompt, and post-prompt. When multiple profiles are provided, files are deduplicated across all profiles.

§Arguments

  • profiles - Profile names to render (deduplicated in order)
  • family - Optional family used to substitute matching fragment variants
  • separator - Optional separator between files
  • pre_prompt - Optional custom pre-prompt text
  • post_prompt - Optional custom post-prompt text
  • framing - Whether to wrap fragments in framing context or emit bare bodies
  • config_override - Optional configuration file override
  • json - Whether to output in JSON format

§Errors

Returns an error if:

  • Configuration file cannot be read or parsed
  • Profile resolution fails
  • Writing to stdout fails