mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 13:04:59 +02:00
Update the manuals
This commit is contained in:
@ -51,12 +51,12 @@ function GetRemark { param($Example)
|
||||
}
|
||||
|
||||
try {
|
||||
if ($filename -eq "") { $filename = read-host "Enter path to PowerShell script" }
|
||||
if ($filename -eq "") { $filename = Read-Host "Enter path to PowerShell script" }
|
||||
$ScriptName = (Get-Item "$filename").Name
|
||||
|
||||
$full = Get-Help $filename -Full
|
||||
|
||||
"## The *$($ScriptName)* Script"
|
||||
"## Script: *$($ScriptName)*"
|
||||
|
||||
$Description = ($full.description | Out-String).Trim()
|
||||
if ($Description -ne "") {
|
||||
@ -119,7 +119,7 @@ try {
|
||||
}
|
||||
|
||||
""
|
||||
"## Source Code"
|
||||
"## Script Content"
|
||||
"``````powershell"
|
||||
$Lines = Get-Content -path "$filename"
|
||||
foreach($Line in $Lines) {
|
||||
@ -127,7 +127,8 @@ try {
|
||||
}
|
||||
"``````"
|
||||
""
|
||||
"*Generated by convert-ps2md.ps1 using the comment-based help of $ScriptName*"
|
||||
$now = [datetime]::Now
|
||||
"*(generated by convert-ps2md.ps1 using the comment-based help of $ScriptName as of $now)*"
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
|
Reference in New Issue
Block a user