API Reference
Export-ImageConsoleStory
Exports an authored ImagePlayground console story to SVG, HTML, PNG, GIF, or APNG.
Remarks
Use New-ImageConsoleStory to compose the reusable story once, then pipe it to this cmdlet for each required format. Export never executes displayed commands.
Examples
Export a reusable console story to GIF
PS>
$story = New-ImageConsoleStory -WindowStyle WindowsTerminal -Width 1100 -Speed Slow -Content {
New-ImageConsoleStoryTab -Id PowerShell -Title 'PowerShell' -Profile PowerShell -Active
New-ImageConsoleStoryCommand -Text 'dotnet build'
New-ImageConsoleStoryOutput -Text 'Build succeeded.' -Style Success
New-ImageConsoleStoryTab -Id Ubuntu -Title 'Ubuntu' -Profile Ubuntu
New-ImageConsoleStoryCommand -Text './build.sh'
New-ImageConsoleStoryOutput -Text 'Linux package ready.' -Style Success
}
$story | Export-ImageConsoleStory -Path '.\demo.gif'
Creates a Discord-friendly animated GIF while retaining the story object for other exports.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Export-ImageConsoleStory [-AnimationScale <Int32>] [-EndHoldSeconds <Double>] [-FramesPerSecond <Int32>] [-MaximumFrames <Int32>] [-NoLoop] [-PassThru] -Path <String> [-Show] -Story <TerminalStory> [<CommonParameters>]#All Parameter SetsParameters
- AnimationScale Int32
- Raster density multiplier used for animated GIF and APNG output.
- EndHoldSeconds Double
- Completed-state hold time used for animated GIF and APNG output.
- FramesPerSecond Int32
- Frame rate used for animated GIF and APNG output.
- MaximumFrames Int32
- Maximum frame budget used for animated GIF and APNG output.
- NoLoop SwitchParameter
- Produce a single-play animated GIF or APNG instead of a repeating animation.
- PassThru SwitchParameter
- Write the exported story back to the pipeline.
- Path String
- Output file path. Supported extensions are SVG, HTML, HTM, PNG, GIF, and APNG.
- Show SwitchParameter
- Open the generated presentation after export.
- Story TerminalStory
- Authored terminal story to export. Accepts pipeline input from New-ImageConsoleStory.
Outputs
ChartForgeX.Terminal.TerminalStory