This folder provides turnkey scripts that demonstrate how to use the repository utilities for converting ANSI art into PowerShell colorscripts and for slicing tall ANSI files into manageable chunks. Each script runs entirely in PowerShell so you can adapt it for build automation or ad-hoc conversions.
- Node.js 18+ (required for the JavaScript conversion utilities)
- PowerShell 7+ (recommended for faster execution)
npm installin the repository root sonode_modulesis available
- Converts
assets/ansi-files/DEL-FLAG.ANSinto a new PowerShell script underdist/examples/(safe scratch location). - Demonstrates how to call
Convert-AnsiToColorScript.jswith explicit input/output arguments. - Produces a UTF-8 (no BOM) PowerShell script ready for testing with
Test-AllColorScripts.ps1.
Run it from the repository root:
pwsh -NoProfile -File ./docs/examples/ansi-conversion/Convert-SampleAnsi.ps1- Splits the tall
assets/ansi-files/we-ACiDTrip.ANSartwork into 160-line slices. - Shows how to use the
scripts/Split-AnsiFile.jshelper with automatic break detection and custom heights. - Writes results to
./dist/examples/we-ACiDTrip/so you can convert each slice individually.
Execute with:
pwsh -NoProfile -File ./docs/examples/ansi-conversion/Split-SampleAnsi.ps1Feel free to duplicate these scripts when building your own workflows—they are intentionally verbose with comments that explain each step.