docs: md 2 html for confluence
This commit is contained in:
19
convert-md-to-confluence.ps1
Normal file
19
convert-md-to-confluence.ps1
Normal file
@@ -0,0 +1,19 @@
|
||||
# PowerShell-Skript: Markdown zu Confluence-Wiki konvertieren
|
||||
# Rekursiv alle .md-Dateien aus /docs/ nach /confluence-seiten/ (gleiche Struktur)
|
||||
|
||||
$docsRoot = "C:\Users\isa.LTW\Desktop\17.09.2025\NodeMap\17.09.2025 NodeMap V1.1.350\docs"
|
||||
$outRoot = "C:\Users\isa.LTW\Desktop\17.09.2025\NodeMap\17.09.2025 NodeMap V1.1.350\confluence-seiten"
|
||||
|
||||
# Alle .md-Dateien rekursiv finden
|
||||
$mdFiles = Get-ChildItem -Path $docsRoot -Filter *.md -Recurse
|
||||
|
||||
foreach ($md in $mdFiles) {
|
||||
$relPath = $md.FullName.Substring($docsRoot.Length).TrimStart('\','/')
|
||||
$outPath = Join-Path $outRoot ($relPath -replace ".md$", ".confluence.txt")
|
||||
$outDir = Split-Path $outPath -Parent
|
||||
if (-not (Test-Path $outDir)) { New-Item -ItemType Directory -Path $outDir | Out-Null }
|
||||
Write-Host "Konvertiere: $($md.FullName) -> $outPath"
|
||||
pandoc "$($md.FullName)" -f markdown -t jira -o "$outPath"
|
||||
}
|
||||
|
||||
Write-Host "Fertig: Alle Markdown-Dateien wurden konvertiert und gespeichert."
|
||||
Reference in New Issue
Block a user