Skip to content
ChartForgeX
Command

Export-ImageConsoleStory

Module imageplayground
Inputs
ChartForgeX.Terminal.TerminalStory
Outputs
ChartForgeX.Terminal.TerminalStory

Exports an authored ImagePlayground console story to SVG, HTML, PNG, GIF, or APNG.

Syntax

Export-ImageConsoleStory [-AnimationScale <Int32>] [-EndHoldSeconds <Double>] [-FramesPerSecond <Int32>] [-MaximumFrames <Int32>] [-NoLoop] [-PassThru] [-Path] <String> [-Show] -Story <TerminalStory> [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

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

Authored help example

Export a reusable console story to GIF

$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.

Parameters

-AnimationScale Int32 optional
Raster density multiplier used for animated GIF and APNG output.
-EndHoldSeconds Double optional
Completed-state hold time used for animated GIF and APNG output.
-FramesPerSecond Int32 optional
Frame rate used for animated GIF and APNG output.
-MaximumFrames Int32 optional
Maximum frame budget used for animated GIF and APNG output.
-NoLoop SwitchParameter optional
Produce a single-play animated GIF or APNG instead of a repeating animation.
-PassThru SwitchParameter optional
Write the exported story back to the pipeline.
-Path String requiredposition: 0aliases: FilePath
Output file path. Supported extensions are SVG, HTML, HTM, PNG, GIF, and APNG.
-Show SwitchParameter optional
Open the generated presentation after export.
-Story TerminalStory requiredpipeline: True (ByValue)
Authored terminal story to export. Accepts pipeline input from New-ImageConsoleStory.

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.