Skip to content

Instantly share code, notes, and snippets.

@mgreenegit
Created September 15, 2022 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgreenegit/188800ec85056899e71b239e63c76b0c to your computer and use it in GitHub Desktop.
Save mgreenegit/188800ec85056899e71b239e63c76b0c to your computer and use it in GitHub Desktop.
PS slideShow
function wait { $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') }
function line { write-host '' }
function getslides {param([string]$path) Get-Childitem -Path $path -Filter slide*.md}
function slide {
param(
[string]$path
)
$slides = getslides $path
foreach ($i in 0..$slides.count) {
$slide = Join-Path $path slide$i.md
Clear-Host
line
if (Test-Path $slide) {
Show-Markdown $slide
wait
}
}
'no more slides' | Show-Markdown
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment