mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-08 20:54:38 +02:00
Update the manuals in Docs/
This commit is contained in:
@ -52,18 +52,20 @@ function GetRemark { param($Example)
|
||||
|
||||
try {
|
||||
if ($filename -eq "") { $filename = read-host "Enter path to PowerShell script" }
|
||||
$ScriptName = (get-item "$filename").Name
|
||||
$ScriptName = (Get-Item "$filename").Name
|
||||
|
||||
$full = Get-Help $filename -Full
|
||||
|
||||
"## $ScriptName - $($full.Synopsis)"
|
||||
"## The $ScriptName PowerShell Script"
|
||||
|
||||
$Description = ($full.description | Out-String).Trim()
|
||||
if ($Description -ne "") {
|
||||
""
|
||||
"$Description"
|
||||
} else {
|
||||
""
|
||||
"$($full.Synopsis)"
|
||||
}
|
||||
|
||||
""
|
||||
"## Parameters"
|
||||
"``````powershell"
|
||||
@ -116,6 +118,12 @@ try {
|
||||
"$Links"
|
||||
}
|
||||
|
||||
""
|
||||
"## Source Code"
|
||||
$Lines = Get-Content -path "$filename"
|
||||
foreach($Line in $Lines) {
|
||||
"$Line"
|
||||
}
|
||||
""
|
||||
"*Generated by convert-ps2md.ps1 using the comment-based help of $ScriptName*"
|
||||
} catch {
|
||||
|
Reference in New Issue
Block a user