File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ # requires -Module EZOut
2+ # Install-Module EZOut or https://github.com/StartAutomating/EZOut
3+ $myFile = $MyInvocation.MyCommand.ScriptBlock.File
4+ $myModuleName = ' PowerShellAI'
5+ $myRoot = $myFile | Split-Path
6+ Push-Location $myRoot
7+ $formatting = @ (
8+ # Add your own Write-FormatView here,
9+ # or put them in a Formatting or Views directory
10+ foreach ($potentialDirectory in ' Formatting' , ' Views' ) {
11+ Join-Path $myRoot $potentialDirectory |
12+ Get-ChildItem - ea ignore |
13+ Import-FormatView - FilePath {$_.Fullname }
14+ }
15+ )
16+
17+ $destinationRoot = $myRoot
18+
19+ if ($formatting ) {
20+ $myFormatFile = Join-Path $destinationRoot " $myModuleName .format.ps1xml"
21+ $formatting | Out-FormatData - Module $MyModuleName | Set-Content $myFormatFile - Encoding UTF8
22+ Get-Item $myFormatFile
23+ }
24+
25+ $types = @ (
26+ # Add your own Write-TypeView statements here
27+ # or declare them in the 'Types' directory
28+ Join-Path $myRoot Types |
29+ Get-Item - ea ignore |
30+ Import-TypeView
31+
32+ )
33+
34+ if ($types ) {
35+ $myTypesFile = Join-Path $destinationRoot " $myModuleName .types.ps1xml"
36+ $types | Out-TypeData | Set-Content $myTypesFile - Encoding UTF8
37+ Get-Item $myTypesFile
38+ }
39+ Pop-Location
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ PowerShell GPT AI module allows to integrate with OpenAI API and access GPT-3 mo
1616 ' Get-GPT3Completion'
1717 )
1818
19+ FormatsToProcess = ' PowerShellAI.format.ps1xml'
20+ TypesToProcess = ' PowerShellAI.types.ps1xml'
21+
1922 AliasesToExport = @ (
2023 ' gpt'
2124 )
You can’t perform that action at this time.
0 commit comments