# ConvertTo-ImageStorySource

Converts exact source text into renderer-neutral syntax spans for visual stories.

Project

ImagePlayground

Automate image processing, codes, metadata, charts, topology, and visual stories from PowerShell.

[View on GitHub](https://github.com/EvotecIT/ImagePlayground) [Visit Website](#) [Releases](https://github.com/EvotecIT/ImagePlayground/releases) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/ImagePlayground)

Stars **102**

Forks **7**

Open issues 

Total downloads **708,853**

Release **ImagePlayground-PowerShellModule.v3.2.7**

Language: C# Updated: 2026-11-18

Command 

**Module**

`ImagePlayground`

**Inputs**

`System.String`

**Outputs**

`ChartForgeX.Stories.StorySourceText`

Converts exact source text into renderer-neutral syntax spans for visual stories.

## Syntax

```
ConvertTo-ImageStorySource
[-Language <String>]
[-Text] <String>
[-Tokenizer <IStorySourceTokenizer>]
[<CommonParameters>]
```

[#](#method-convertto-imagestorysource-string-string-istorysourcetokenizer)

Parameter set: `All Parameter Sets`

## Description

PowerShell uses the native System.Management.Automation parser. Other languages can provide an optional IStorySourceTokenizer adapter without adding parser dependencies to ChartForgeX.

## Examples

### Tokenize PowerShell source

```powershell
$source = ConvertTo-ImageStorySource -Text 'Get-Process | Sort-Object CPU -Descending' -Language PowerShell
```

Returns exact source text with semantic spans suitable for New-ImageStoryPanel.

## Parameters

**-Language String optional**

Language identifier. PowerShell uses its native parser; Plain preserves text without tokenization.

**-Text String requiredposition: 0pipeline: True (ByValue)**

Exact source text, including whitespace and line endings.

**-Tokenizer IStorySourceTokenizer optional**

Optional tokenizer adapter for C#, Bash, or another language.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:03EE832E2BAA333FBACBB0E49E66B3F75208DF516F873122896831C103AA209D -->
