-
Notifications
You must be signed in to change notification settings - Fork 1
/
PresoPublish.ps1
16 lines (16 loc) · 900 Bytes
/
PresoPublish.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$presos = Get-ChildItem -Directory .\content\presentations
$presos | ForEach-Object -ThrottleLimit 5 -Parallel {
#Action that will run in Parallel. Reference the current object via $PSItem and bring in outside variables with $USING:varname
# Grab the preso file in the dir
$markdown = Get-ChildItem $_ -Filter *.md
$name = $_.BaseName
$markdown
# Create the feature image
npx @marp-team/marp-cli@latest $markdown.FullName -o (Join-Path $_ -ChildPath "feature.png")
# Get the Preso HTML
npx @marp-team/marp-cli@latest $markdown.FullName -o (Join-Path $_ -ChildPath "$($name).html") --allow-local-files
# Get the Preso PDF
npx @marp-team/marp-cli@latest $markdown.FullName -o (Join-Path $_ -ChildPath "$($name).pdf") --allow-local-files
# Get the Preso PPTX
npx @marp-team/marp-cli@latest $markdown.FullName -o (Join-Path $_ -ChildPath "$($name).pptx") --allow-local-files
}