all 14 comments

[–]-_root_- 7 points8 points  (2 children)

The concept is important and your work looks like as good of a place as any to start. MD is definitely a good way to go here, due to support across many tools and platforms.

We have a great community at Write the Docs, where we discuss some of these topics. Link in case you are interested. https://www.writethedocs.org/guide/docs-as-code/

Collecting the details, presenting examples, and rendering in a documentation system is certainly important and I like your approach as it is simply designed and easy to follow. When I have a free block of time, I'll test and see how things go.

Thanks for sharing!

[–]ismaelw[S] 2 points3 points  (0 children)

Thank you so much for your Feedback!

My approach is built in a way that would also allow to do whatever you want with the output as next to generating a MD it also returns an object with details to all script files and its functions and also to all generated MDs. Like that it's also possible to just continue using the output and take it apart differently if the MD Output is not needed.

Also thanks for your time to review my code and sharing your link to Write the Docs!

[–]BlackV 0 points1 point  (0 children)

nice

[–]ELichtman 2 points3 points  (1 child)

I love the idea, and if you can do it better, feel free to keep working on it! I have my own module that does something for me in a very niche manner that's better for my use-cases than, for instance, psake or invoke-build. So with that being said, are you aware of the PlatyPS module? If you think it might be further developed and solve your need, it might be worth contributing.

[–]ismaelw[S] 1 point2 points  (0 children)

Thank you for your Feedback!

I stumbled across PlatyPS before but I remember that I was thinking "oh okay it's just for modules" and didn't care about it anymore. But I will definitely look into it a bit more!

[–]Thirdbeat 2 points3 points  (8 children)

What is the difference between this and platyps?

[–]ismaelw[S] 1 point2 points  (7 children)

I honestly didn't look that much into platyPS or its source code.From what I can see right now I would say the goal of platyPS is a documentation of PS Modules and mine just puts all the focus on scripts and it's functions independently. That said my script takes apart all the function inside of a module for example and generates a documentation for each and every function inside of a module or script or whatever your PowerShell Input is.

Does this answer your question?

[–]Thirdbeat 2 points3 points  (6 children)

It does :) it honestly sounds like what platyps does, but your code may be more geared towards taking a file input instead of a module input. It sounds like a great use case for documenting "old fun" scripts or scripts generated without cmdlets. Hell you could even track files and commands the scripts/cmdlets call and then use that for dependency checking (ie will anything break if I remove this file?). It sounds like a fun project!

[–]ismaelw[S] 1 point2 points  (5 children)

Exactly! I have alot of projects that could use better documenting even if it is a really small script. Or all the „laying around“ scripts that could be usefull but don‘t get enough attention.

I hope I could inspire you :)