Created
September 15, 2022 15:18
-
-
Save mgreenegit/188800ec85056899e71b239e63c76b0c to your computer and use it in GitHub Desktop.
PS slideShow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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