Standalone PowerShell tools for existing ORC projects. Every mutating tool is
read-only by default and requires -Apply.
Preview a site-local migration:
pwsh -NoProfile -File .\enumerate-base64.ps1 -Site C:\src\orc\appApply it:
pwsh -NoProfile -File .\enumerate-base64.ps1 `
-Site C:\src\orc\app `
-ApplyOnly F# wrappers that render HTML or Markdown are scanned: index.fs,
indexmd.fs, and sharphtml-*, sharphtm-*, sharpmd-*, or
sharpmarkdown-*. JavaScript/package source is deliberately excluded.
The tool validates each data:*;base64, payload, deduplicates decoded bytes,
writes strings/sharedstrings.fs, and replaces every inline URI with the
correct ordinary-string or triple-quoted raw-string expression. Its report
maps stable asset IDs to every source file and line. Rename the generated
Category.Asset### binding and all of its reported references together.
Reruns preserve manually renamed catalog entries and append only new payloads.
Inspect a large catalog without printing its payloads, or register one asset by hash without scanning the site:
pwsh -NoProfile -File .\enumerate-base64.ps1 -Site C:\src\orc\app -List
pwsh -NoProfile -File .\enumerate-base64.ps1 `
-Site C:\src\orc\app `
-AddAsset C:\assets\hero.png `
-AssetName HeroLogo `
-ApplyIf the bytes already exist, the stable reference is reported and the catalog
is left untouched. A new payload is appended only with -Apply.
In the matching .github/config/deploy-*.fs, set
UseSharedStrings = true. ORC then opens that site-local module for both
deployment and multi-site preview rendering. The helper remains F# source and
is never copied to the published site.
Preview every HTML-comment migration below a folder:
pwsh -NoProfile -File .\convert-comments.ps1 -Path C:\siteApply the exact preview:
pwsh -NoProfile -File .\convert-comments.ps1 -Path C:\site -ApplyFiles can be passed individually or as an array. The script converts
<!-- ... --> to /* ... */, including multiline comments, only inside
CSS/script raw-text regions. It recognizes <style>/<script> bodies,
Giraffe style/script nodes whose content is a triple-quoted rawText, and
standalone CSS/JavaScript/TypeScript wrappers. Normal HTML comments remain
normal HTML comments. -AllComments is available for an explicitly selected
file that is known to be raw text.
The migration preserves the file's Unicode encoding, BOM, line endings, and
all text inside the delimiters. A file is blocked and left wholly untouched
when an eligible comment body already contains */.
Folder scans include F#, HTML, CSS, JavaScript, and TypeScript files by
default. Override -Extensions when a project uses another text extension.
Generated and dependency directories are skipped.
Inspect current F# module/namespace declarations and deterministic, path-derived alternatives:
pwsh -NoProfile -File .\modulefix.ps1 `
-RepoRoot C:\project `
-CheckDirectory C:\project\docsThe module tool reports collisions and placeholder names but never edits
source. Use -Format Json to create a refactoring plan or
-FailOnCollision in automation.