Update manuals

This commit is contained in:
Markus Fleschutz
2021-08-30 15:48:23 +02:00
parent b88f04ce4b
commit d24fd94517
254 changed files with 266 additions and 266 deletions

View File

@ -1,6 +1,6 @@
<#
.SYNOPSIS
convert-ps2md.ps1 [<script>]
convert-ps2md.ps1 [<filename>]
.DESCRIPTION
Converts the comment-based help of a PowerShell script to Markdown.
.EXAMPLE
@ -11,7 +11,7 @@
https://github.com/fleschutz/PowerShell
#>
param([string]$script = "")
param([string]$filename = "")
function EncodePartOfHtml { param([string]$Value)
($Value -replace '<', '&lt;') -replace '>', '&gt;'
@ -51,12 +51,12 @@ function GetRemark { param($Example)
}
try {
if ($script -eq "") { $script = read-host "Enter path to PowerShell script" }
$ScriptName = (get-item "$script").Name
if ($filename -eq "") { $filename = read-host "Enter path to PowerShell script" }
$ScriptName = (get-item "$filename").Name
$full = Get-Help $script -Full
$full = Get-Help $filename -Full
"# PowerShell Script $scriptName"
"# PowerShell Script $ScriptName"
""
"## Synopsis & Description"
@ -128,7 +128,7 @@ try {
}
""
"*Generated by convert-ps2md.ps1*"
"*Generated from comment-based help of $ScriptName by convert-ps2md.ps1*"
} catch {
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1