From 48ea2d6fe60293c5c927876fc3d835c43aae985a Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Sat, 28 Aug 2021 12:37:13 +0200 Subject: [PATCH] Improve convert-ps2md.ps1 --- Scripts/convert-ps2md.ps1 | 106 ++++++++++---------------------------- 1 file changed, 27 insertions(+), 79 deletions(-) diff --git a/Scripts/convert-ps2md.ps1 b/Scripts/convert-ps2md.ps1 index ceafe2b1..83816be5 100644 --- a/Scripts/convert-ps2md.ps1 +++ b/Scripts/convert-ps2md.ps1 @@ -1,59 +1,18 @@ -# -# File: Get-HelpByMarkdown.ps1 -# -# Author: Akira Sugiura (urasandesu@gmail.com) -# -# -# Copyright (c) 2014 Akira Sugiura -# -# This software is MIT License. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# - <# - .SYNOPSIS - Gets the comment-based help and converts to GitHub Flavored Markdown. - - .PARAMETER Name - A command name to get comment-based help. - - .EXAMPLE - & .\Get-HelpByMarkdown.ps1 Select-Object > .\Select-Object.md - - DESCRIPTION - ----------- - This example gets comment-based help of `Select-Object` command, and converts GitHub Flavored Markdown format, then saves it to `Select-Object.md` in current directory. - - .INPUTS - System.String - - .OUTPUTS - System.String - +.SYNOPSIS + convert-ps2md.ps1 [