Closed it-praktyk closed 7 years ago
@it-praktyk Checking that the document name is also a valid filename is very worthwhile. If you already have a function that can be used that you're happy to share - I'm all for it 😉. I don't see a need to bundle the whole New-OutputObject module at present?
OK, so I'll prepare a pull request . Probably, initially, I'll add names checking only and maybe I'll mention about possibility to extend names preparing in README (?).
Does the best place to check the Name of document for unsupported chars is the begin section in the Document function?
@it-praktyk Yes - in the New-PScriboDocument
method. As document name is used for the output filename, if it's invalid we should error when creating the document/object. Note: thinking ahead we might want to make sure that we cover off invalid Linux characters too?
Today I did first tests the New-OutputObject module on Linux - the module in the current version is not compatible with Linux. I'll try resolve it soon.
@it-praktyk Your New-OutputObject
module implementation is not compatible on Linux? I have dome some initial testing and all unit tests are passing for PScribo Core PowerShell 6 Beta 1 and Beta 2 😃.
For the function Test-CharsInPath I stuck now.
@iainbrighton , my New-OutputObject module is compatible with Linux - tested on PowerShell Core v6.0.0-beta4 - the function Test-CharsInPath (what is the subject of #45) too. On next week I'll try find someone who will test in on MacOS and test it on Windows Server Nano.
I've wrote a module New-OutputObject what is published to the PowerShell Gallery too - link.
As the part of that module I'wrote the function Test-CharsInPath what can be used to parse provided names of files for exported documents (the parameter '-Path' in the function Export-Document) for incorrect chars.
The quote from Test-CharsInPath help is below.
What do you think about
I see that in about_ToDo that kind of plan for Output/Plugins.