PsDaVinci.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
# Copyright (c) STÜBER SYSTEMS GmbH. All rights reserved.
# Licensed under the MIT License.

Import-LocalizedData -BindingVariable stringTable

<#
 .Synopsis
  Creates a new JSON configuration template for the 'Start-DaVinciImport' cmdlet
 
 .Description
  This cmdlet will create a new JSON configuration file for an import source. If the JSON
  file exists already it will add the configuration to the file. You must adapt the
  configuration to your needs by opening the configuration file in a text editor.
 
 .Parameter Source
  The name of a supported import source. Currently supported is 'ecf'.
 
 .Parameter ConfigFile
  The file name of the JSON configuration file. If this file exists already this cmdlet
  will terminate with an error.
 
 .Example
  # Adds a configuration template for an ECF to DAVINCI import
  Initialize-DaVinciImport -Source ecf -ConfigFile MyImportConfig.json
 
 .Example
  # Adds a configuration template for an ECF to DAVINCI import (short form)
  Initialize-DaVinciImport ecf MyImportConfig.json
#>

function Initialize-DaVinciImport {
    param(
        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [ImportSource]
        $Source,
        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [string]
        $ConfigFile
    )
    process
    {
        try
        {
            $ConfigPath = GetFullConfigPath -ConfigFile $ConfigFile

            switch ($Source)
            {
                ([ImportSource]::ecf)   { CreateOrPopulateConfigFile -JsonProviderName "daVinci" -JsonConfigName "EcfImport" -ConfigTemplateName "import" -ConfigPath $ConfigPath }
            }
        }
        catch
        {
            $ErrorMessage = $_.Exception.Message
            Write-Error $ErrorMessage
        }
    }
}

<#
 .Synopsis
  Creates a new JSON configuration template for the 'Start-DaVinciExport' cmdlet
 
 .Description
  This cmdlet will create a new JSON configuration file for an export target. If the JSON
  file exists already it will add the configuration to the file. You must adapt the
  configuration to your needs by opening the configuration file in a text editor.
   
 .Parameter Target
  The name of a supported export target. Currently supported are 'sdui', 'iserv'
  and 'ecf'.
 
 .Parameter ConfigFile
  The file name of the JSON configuration file. If this file exists already this cmdlet
  will terminate with an error.
 
 .Example
  # Adds a configuration template for a DAVINCI to ECF export
  Initialize-DaVinciExport -Target ecf -ConfigFile MyExportConfig.json
 
 .Example
  # Adds a configuration template for a DAVINCI to ECF export (short from)
  Initialize-DaVinciExport ecf MyExportConfig.json
#>

function Initialize-DaVinciExport {
   param(
        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [ExportTarget]
        $Target,
        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [string]
        $ConfigFile
    )
    process
    {
        try
        {
            $ConfigPath = GetFullConfigPath -ConfigFile $ConfigFile

            switch ($Target)
            {
                ([ExportTarget]::sdui)  { CreateOrPopulateConfigFile -JsonProviderName "daVinci" -JsonConfigName "SduiExport" -ConfigTemplateName "export" -ConfigPath $ConfigPath }
                ([ExportTarget]::iserv) { CreateOrPopulateConfigFile -JsonProviderName "daVinci" -JsonConfigName "IServExport" -ConfigTemplateName "export" -ConfigPath $ConfigPath }
                ([ExportTarget]::ecf)   { CreateOrPopulateConfigFile -JsonProviderName "daVinci" -JsonConfigName "EcfExport" -ConfigTemplateName "export" -ConfigPath $ConfigPath }
            }
        }
        catch
        {
            $ErrorMessage = $_.Exception.Message
            Write-Error $ErrorMessage
        }
    }
}

<#
 .Synopsis
  Starts a new import from a supported source to DAVINCI.
 
 .Description
  This cmdlet will start a new import from a supported source to DAVINCI.
 
 .Parameter Source
  The name of a supported import source. Currently supported is 'ecf'.
 
 .Parameter ConfigFile
  The file name of the JSON configuration file.
 
 .Example
  # Starts an import from ECF to DAVINCI
  Start-DaVinciImport -Source ecf -ConfigFile MyImportConfig.json
 
 .Example
  # Starts an import from ECF to DAVINCI (short form)
  Start-DaVinciImport ecf MyImportConfig.json
#>

function Start-DaVinciImport {
    param(
        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [ImportSource]
        $Source,
        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [string]
        $ConfigFile )
    process
    {
        try
        {
            $ConfigPath = GetFullConfigPath -ConfigFile $ConfigFile
            $Config = GetConfig -Config $ConfigPath
        
            switch ($Source)
            {
                ([ImportSource]::ecf) { RunDavConsole -Command "export" -Provider "ecf" -Config $Config }
            }
        }
        catch
        {
            $ErrorMessage = $_.Exception.Message
            Write-Error $ErrorMessage
        }
    }
}

<#
 .Synopsis
  Starts a new export from DAVINCI to a supported target.
 
 .Description
  This cmdlet will start a new export from DAVINCI to a supported target.
 
 .Parameter Target
  The name of a supported export target. Currently supported are 'sdui', 'iserv'
  and 'ecf'.
 
 .Parameter ConfigFile
  The file name of the JSON configuration file.
 
 .Example
  # Starts an export from DAVINCI to Ecf
  Start-DaVinciExport -Target ecf -ConfigFile MyExportConfig.json
 
 .Example
  # Starts an export from DAVINCI to Ecf (short form)
  Start-DaVinciExport ecf MyExportConfig.json
#>

function Start-DaVinciExport {
    param(
        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [ExportTarget]
        $Target,
        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [string]
        $ConfigFile
    )
    process
    {
        try
        {
            $ConfigPath = GetFullConfigPath -ConfigFile $ConfigFile
            $Config = GetConfig -Config $ConfigPath

            switch ($Target)
            {
                ([ExportTarget]::sdui)  { RunDavConsole -Command "export" -Provider "sdui" -Config $Config }
                ([ExportTarget]::iserv) { RunDavConsole -Command "export" -Provider "iserv" -Config $Config }
                ([ExportTarget]::ecf)   { RunDavConsole -Command "export" -Provider "ecf" -Config $Config }
            }
        }
        catch
        {
            $ErrorMessage = $_.Exception.Message
            Write-Error $ErrorMessage
        }
    }
}

function CreateOrPopulateConfigFile {
    param(
        [string]
        $ConfigPath,
        [string]
        $ConfigTemplateName,
        [string]
        $JsonProviderName,
        [string]
        $JsonConfigName
    )
    process
    {
        $ConfigTemplatePath = GetConfigTemplatePath -TemplateName $ConfigTemplateName
        $ConfigTemplate = Get-Content -Raw -Path $ConfigTemplatePath | ConvertFrom-Json

        foreach ($property in $ConfigTemplate.daVinci.PSObject.Properties)
        {
            if ($property.Name -ne $JsonConfigName)
            {
                $ConfigTemplate.daVinci.PSObject.Properties.Remove($property.Name)
            }
        }

        if (Test-Path -Path $ConfigPath)
        {
            $Config = Get-Content -Raw -Path $ConfigPath | ConvertFrom-Json
            
            if ($Config | Get-Member -Name $JsonProviderName -MemberType NoteProperty)
            {
                if ($null -ne $Config.daVinci)
                {
                    if (-not ($Config.daVinci | Get-Member -Name $JsonConfigName -MemberType NoteProperty))
                    {
                        $ConfigPropertyValue = $ConfigTemplate.daVinci | Select-Object -ExpandProperty $JsonConfigName
                        $Config.daVinci | Add-Member -MemberType NoteProperty -Name $JsonConfigName -Value $ConfigPropertyValue
                    }
                }
            }
            else
            {
                $Config | Add-Member -MemberType NoteProperty -Name $JsonProviderName -Value $ConfigTemplate.daVinci
            }
        }
        else 
        {
            $Config = $ConfigTemplate
        }

        $Config | ConvertTo-Json -depth 100 | Set-Content $ConfigPath
    }
}

function RunDavConsole{
    param(
        [string]
        $Command,
        [string]
        $Provider,
        [PSObject]
        $Config
    )
    process
    {
        Write-Host $stringTable.StartDaVinciConsole -ForegroundColor $Host.PrivateData.VerboseForegroundColor

        $ConsolePath = GetDavConsolePath -Config $Config

        if (($ConsolePath) -and (Test-Path -Path $ConsolePath -PathType Leaf))
        {
            $CurrentLocation = Get-Location
            Set-Location -Path (Split-Path -Path $ConfigPath)
            try
            {   
                Invoke-Expression "& ""$($consolePath)"" $($Command) -p ""$($Provider)"" -c ""$($ConfigPath)"""
            }
            finally 
            {
                Set-Location -Path $CurrentLocation
            }

            if ($LASTEXITCODE -ne 0)
            {
                $ErrorMessage = $stringTable.ErrorDaVinciConsoleFailed
                throw $ErrorMessage
            }
        }
        else
        {
            $ErrorMessage = ([string]::Format($stringTable.ErrorDaVinciConsoleNotFound, $ConsolePath)) 
            throw $ErrorMessage
        }
    }
}

function GetConfig {
    param(
        [string]
        $ConfigPath
    )
    process
    {
        if (($ConfigPath) -and (Test-Path -Path $ConfigPath -PathType leaf))
        {
            return Get-Content -Path $ConfigPath -Raw | ConvertFrom-Json
        }
        else
        {
            return "{}" | ConvertFrom-Json
        }
    }
}

function GetConfigTemplatePath {
    param(
        [string]
        $TemplateName
    )
    process
    {
        return Join-Path -Path $PSScriptRoot -ChildPath "PsDaVinci.Template.$($TemplateName).json"
    }
}

function GetFullConfigPath {
    param(
        [string]
        $ConfigFile
    )
    process
    {
        $ConfigPath = $ConfigFile
        
        if ((Split-Path -Path $ConfigPath -Leaf) -eq $ConfigPath)
        {
            $ConfigPath = Join-Path -Path (Get-Location) -ChildPath $ConfigPath
        }

        if (-not (Test-Path -Path $ConfigPath -PathType Leaf))
        {
            if (-not ([IO.Path]::HasExtension($ConfigPath)))
            {
                $ConfigPath = [IO.Path]::ChangeExtension($ConfigPath, "json")
            }
        }

        return $ConfigPath
    }
}

function GetDavConsolePath {
    param(
        [PSObject]
        $Config
    )
    process
    {
        if ($Config)
        {
            if ($Config.PsDaVinci.Tools.DaVinciConsole)
            {
                return $config.PsDaVinci.Tools.DaVinciConsole
            }
        }
        
        $RegKey64 = "HKLM:\SOFTWARE\WOW6432Node\Stueber Systems\daVinci 6\Main"
        $RegKey32 = "HKLM:\SOFTWARE\Stueber Systems\daVinci 6\Main"

        if ([Environment]::Is64BitProcess)
        {
            if (Test-Path -Path $RegKey64)
            {
                $RegKey = Get-ItemProperty -Path $RegKey64 -Name BinFolder
                return Join-Path -Path $RegKey.BinFolder -ChildPath "daVinciConsole.exe"
            }
            else
            {
                return $null
            }
        }
        else
        {
            if (Test-Path -Path $RegKey32)
            {
                $RegKey = Get-ItemProperty -Path $RegKey32 -Name BinFolder
                return Join-Path -Path $RegKey.BinFolder -ChildPath "daVinciConsole.exe"
            }
            else
            {
                return $null
            }
        }
    
    }
}

# List of supported import sources
Enum ImportSource {
    ecf
}

# List of supported export targets
Enum ExportTarget {
    sdui
    iserv
    ecf
}

Export-ModuleMember -Function Initialize-DaVinciImport
Export-ModuleMember -Function Initialize-DaVinciExport
Export-ModuleMember -Function Start-DaVinciImport
Export-ModuleMember -Function Start-DaVinciExport

# SIG # Begin signature block
# MIIZbAYJKoZIhvcNAQcCoIIZXTCCGVkCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUWNp1xWtFSk3662NiZC1rSm+m
# vymgghRtMIIE1TCCA72gAwIBAgIQLv6kF6bmtV9boNbBVSrC5TANBgkqhkiG9w0B
# AQsFADB/MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRp
# b24xHzAdBgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxMDAuBgNVBAMTJ1N5
# bWFudGVjIENsYXNzIDMgU0hBMjU2IENvZGUgU2lnbmluZyBDQTAeFw0xOTA4MDYw
# MDAwMDBaFw0yMTEwMTUyMzU5NTlaMG0xCzAJBgNVBAYTAkRFMQ8wDQYDVQQIDAZC
# ZXJsaW4xDzANBgNVBAcMBkJlcmxpbjEdMBsGA1UECgwUU1RVRUJFUiBTWVNURU1T
# IEdtYkgxHTAbBgNVBAMMFFNUVUVCRVIgU1lTVEVNUyBHbWJIMIIBIjANBgkqhkiG
# 9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzaRIVaSkAMSQj+/zPkMRDRo7TwC80M3tt/nX
# uuPnfQNEilBRgRUj5lJ6AAxam4ayXCf38v371FOQ/IJpFSEU++H+LhCIpiCrjlY2
# m36N34SLUqgxjuFjBPj3gDUN8tATX3Svg0VGe8giXXo2aUYpPESSPfWblr3wmDU4
# eQ/Y6G6QqCAd3O9cqJo5Asp4x04mbo15nkaV0hyD0Bch/I5d6Wgirkirr5K/sC4q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