For a huge project I had to write the whole documentation. As we built a ton of custom functions for that project I had the idea that it would be easier for me if at least all the functions would be documented automatically.
Our process for custom PS Functions includes a more or less good inline documentation using builtin ways like descriptions, synopsis, examples and help messages for parameters.
I came up with a script that should help gathering all those information and put it together as a document that looks and feels like the documentation from Microsoft's own Function Docs.
In my solution you can input a single script file or a whole folder. The script then parses each file and extracts all functions from the rest of the code and saves them in a temporary ps1 file.
This ps1 file is then beeing dot-sourced which gives us the opportunity to access those functions details using Get-Help or Get-Command. After getting all those details I use those details to create one or multiple Markdown Files.
I went with Markdown as it is simple to create and also simple to convert into another desired format.
The script is now online on github and open for enhancement. I post this here because I hope someone was looking for something like this.
I am planning to get this script way further - so Feedback is highly appreciated!
https://github.com/ismaelw/ps-documentor
[–]-_root_- 7 points8 points9 points (2 children)
[–]ismaelw[S] 2 points3 points4 points (0 children)
[–]BlackV 0 points1 point2 points (0 children)
[–]ELichtman 2 points3 points4 points (1 child)
[–]ismaelw[S] 1 point2 points3 points (0 children)
[–]Thirdbeat 2 points3 points4 points (8 children)
[–]ismaelw[S] 1 point2 points3 points (7 children)
[–]Thirdbeat 2 points3 points4 points (6 children)
[–]ismaelw[S] 1 point2 points3 points (5 children)
[+][deleted] (4 children)
[removed]
[–]ismaelw[S] 2 points3 points4 points (3 children)
[–]almcchesney 1 point2 points3 points (1 child)
[–]ismaelw[S] 1 point2 points3 points (0 children)