platyPS icon indicating copy to clipboard operation
platyPS copied to clipboard

New-MarkdownAboutHelp - make easier to migrate exiting files to the markdown format help

Open it-praktyk opened this issue 6 years ago • 1 comments

Enhancement proposal

Based on the example of the Pester module we have existing about help files

PS Pester> ls -la ./en-US/                                                                                                                                                                    total 56                                                                                                                                                                                                           drwxrwxr-x.  2 user user  4096 06-10 18:56 .                                                                                                                                                                   
drwxrwxr-x. 14 user user  4096 06-10 19:29 ..
-rw-rw-r--.  1 user user  3600 05-08 21:55 about_BeforeEach_AfterEach.help.txt
-rw-rw-r--.  1 user user  7390 05-08 21:55 about_Mocking.help.txt
-rw-rw-r--.  1 user user 11621 05-08 21:55 about_Pester.help.txt
-rw-rw-r--.  1 user user 10060 06-10 18:56 about_Should.help.txt
-rw-rw-r--.  1 user user  1253 05-08 21:55 about_TestDrive.help.txt
-rw-rw-r--.  1 user user  1016 05-08 21:55 Gherkin.psd1
-rw-rw-r--.  1 user user  1021 05-08 21:55 RSpec.psd1

Currently, the New-MarkdownAboutHelp doesn't allow provide a folder name containing existing about_ files as a parameter and generate for all of them markdown files under one a command/run.

Expected/proposed behavior

The command

New-MarkdownAboutHelp -Module Pester -OutputFolder .\<LANGUAGE_CODE> -Language <LANGUAGE_CODE> 

should

  • accept a module name as a parameter
  • accept a language code as a parameter
  • find the folder (based on the language code) - let's assume that we are in the root module directory (can we force it?)
  • list all about_ files and create for them markdown files - based on the stripped file names (about_ and .help.txt
  • copy a content of the existing files to correspondent to them

it-praktyk avatar Jun 10 '18 23:06 it-praktyk

Great idea, love it! I'd also love to see some markdown auto-generation from the existing txt file.

vors avatar Jun 10 '18 23:06 vors

New-MarkdownAboutHelp is not supported in Microsoft.PowerShell.PlatyPS. The PowerShell help system (Get-Help) only supports these files as unstructured plain text.

sdwheeler avatar May 31 '24 15:05 sdwheeler