Open Stephanevg opened 5 years ago
Good idea! If the recursive option was used that is reading a directory of scripts, be better to display one image per file script otherwise gets clustered and too hard to see.
Great @PeterMTaylor Thanks for pointing that out, I have updated the first section.
I am thinking that we could perhaps add a switch parameter to give the possibility to the user to set everything in one and single file. I was thinking of something along the lines of: -Combine
or -GenenrateOutputInSingleFile
Is that something that would make sense?
Ah reflecting this further I think y thoughts would be a simple named switch like -OutputType All for allowing any file even recursively or -OutputType Single to easier to read image per file.
@PeterMTaylor What do you think of:
-OutputType [Combined/Single]
Ps: I am also thinking that this switch could be used for a regular Class (UML) diagram --> Created a new issue to support it here : https://github.com/Stephanevg/PSClassUtils/issues/69
?
Sounds good. Go for it! Merry Xmas too!
Consider creating an abastract syntax tree visulisation for scripts:
Ideally, I would imagine a command having the following syntax:
-Path
: should be capable of handeling FileInfo, FolderInfo, and strings as inputs (just like Write-CUClassDiagram),-ExportPath
: Should default to the current directory. If no name is specified, it should be'ScriptName.AbastractSyntaxTree.png'
By default, it should create one image per script file (to avoid a clustered image).
some information on AST: https://geekeefy.wordpress.com/2017/06/07/powershell-tokenization-and-abstract-syntax-tree/