new service files - updates to ll-stack-architecture.md

This commit is contained in:
2026-08-25 09:48:34 +02:00
parent 14f888843f
commit 6c8c89ffce
18 changed files with 644 additions and 34 deletions

View File

@@ -0,0 +1,6 @@
param([Parameter(Mandatory=$true)][string[]]$keyword)
### keyword to filter
$csvDir=(Join-Path $PSScriptRoot ..)
Get-Content $csvDir\ArmorExport-Armor.csv|convertFrom-Csv -Delimiter ';' `
|ForEach-Object { $_.Keywords = ($_.Keywords -split ','); $_ } `
|where-object { $keyword -in $_.Keywords }

View File

@@ -0,0 +1,4 @@
param([Parameter(Mandatory=$true)][int]$slot)
#slot to filter
$csvDir=(Join-Path $PSScriptRoot ..)
Get-Content $csvDir\ArmorExport-Armor-Slot.csv|ConvertFrom-Csv -Delimiter ';'|Sort-Object -Property FormID,Slot -Unique|Where-Object { $_.Slot -eq $slot }

View File

@@ -0,0 +1,2 @@
$csvDir=(Join-Path $PSScriptRoot ..)
Get-Content $csvDir\ArmorExport-Armor.csv|convertFrom-Csv -Delimiter ';'|ForEach-Object { $_.Keywords = ($_.Keywords -split ','); $_ }|where-object { $_.Keywords -contains 'ArmorHeavy' }

View File

@@ -0,0 +1,2 @@
$csvDir=(Join-Path $PSScriptRoot ..)
Get-Content $csvDir\ArmorExport-Armor.csv|convertFrom-Csv -Delimiter ';'|ForEach-Object { $_.Keywords = ($_.Keywords -split ','); $_ }|where-object { $_.Keywords -contains 'ArmorLight' }

View File

@@ -0,0 +1,3 @@
#show count of records by slot
$csvDir=(Join-Path $PSScriptRoot ..)
Get-Content $csvDir\ArmorExport-Armor-Slot.csv|ConvertFrom-Csv -Delimiter ';'|Sort-Object -Property FormID,Slot -Unique|Sort-Object Slot|Group-Object -NoElement -Property slot

View File

@@ -0,0 +1,3 @@
param([Parameter(Mandatory=$true)][int]$slot)
$csvDir=(Join-Path $PSScriptRoot ..)
Get-Content $csvDir\ArmorExport-ArmorAddon-Slot.csv|ConvertFrom-Csv -Delimiter ';'|Sort-Object -Property FormID,Slot -Unique|Where-Object { $_.Slot -eq $slot }

View File

@@ -0,0 +1,3 @@
#show count of records by slot
$csvDir=(Join-Path $PSScriptRoot ..)
Get-Content $csvDir\ArmorExport-ArmorAddon-Slot.csv|ConvertFrom-Csv -Delimiter ';'|Sort-Object -Property FormID,Slot -Unique|Sort-Object Slot|Group-Object -NoElement -Property slot

View File

@@ -0,0 +1,51 @@
<#
.PARAMETER editorId
to filter by editorId
.PARAMETER formId
to filter by formId
.PARAMETER all
to list all records
.PARAMETER slotAsArray
convert slot field to array
.PARAMETER splitBySlot
split records by slot
.EXAMPLE
PS> .\get-armor.ps1 -editorId EnchArmorImperialLightGauntletsMarksman03
.EXAMPLE
PS> .\get-armor.ps1 -formId 000B9745
#>
param([string]$editorId, [string]$formId, [switch]$slotAsArray, [switch]$splitBySlot)
#editorId or formId to filter
#usage:
## .\get-armor.ps1 -editorId EnchArmorImperialLightGauntletsMarksman03
## .\get-armor.ps1 -formId 000B9745
$csvDir=(Join-Path $PSScriptRoot ..)
$csvFile="ArmorExport-Armor.csv"
if($splitBySlot) {
$csvFile="ArmorExport-Armor-Slot.csv"
}
if($editorId -or $formId) {
Get-Content (Join-Path $csvDir $csvFile)|ConvertFrom-Csv -Delimiter ';' `
|where-object { ($editorId -and $_.EditorID -eq $editorId) -or ($formId -and $_.FormID -eq $formId)} `
|foreach-object {
$_.Keywords = $_.Keywords -Split ',';
$_.ArmorAddon = $_.ArmorAddon -Split ',';
if($slotAsArray -and !$splitBySlot) { $_.Slot = ($_.Slot -Split ','); }
$_
}
} else {
Get-Content (Join-Path $csvDir $csvFile)|ConvertFrom-Csv -Delimiter ';' `
|foreach-object {
$_.Keywords = $_.Keywords -Split ',';
$_.ArmorAddon = $_.ArmorAddon -Split ',';
if($slotAsArray -and !$splitBySlot) { $_.Slot = ($_.Slot -Split ','); }
$_
}
}

View File

@@ -0,0 +1,88 @@
<#
.PARAMETER editorId
to filter by editorId
.PARAMETER formId
to filter by formId
.PARAMETER all
to list all records
.PARAMETER slotAsArray
convert slot field to array
.PARAMETER splitBySlot
split records by slot
.EXAMPLE
PS> .\get-armor.ps1 | ?{ $_.FormID -in '00013939' } | .\get-armoraddon.ps1
.EXAMPLE
PS> .\get-armoraddon.ps1 -formId 0005DB82
.EXAMPLE
PS> .\get-armor.ps1 -editorId EnchArmorImperialLightGauntletsMarksman03|.\get-armoraddon.ps1
.EXAMPLE
PS> .\armor-by-keyword.ps1 ArmorHeavy|?{$_.Keywords -contains 'ArmorHelmet'}|.\get-armoraddon.ps1
#>
param([string]$editorId, [string]$formId, [switch]$all, [switch]$slotAsArray, [switch]$splitBySlot)
# editorId or formId to filter
# -all to list all records
#usage:
## .\get-armor.ps1 | ?{ $_.FormID -in '00013939' } | .\get-armoraddon.ps1
## .\get-armoraddon.ps1 -formId 0005DB82
## .\get-armor.ps1 -editorId EnchArmorImperialLightGauntletsMarksman03|.\get-armoraddon.ps1
## .\armor-by-keyword.ps1 ArmorHeavy|?{$_.Keywords -contains 'ArmorHelmet'}|.\get-armoraddon.ps1
Set-StrictMode -Version 3.0
$csvDir=(Join-Path $PSScriptRoot ..)
$myInput = $input
$ids=@()
$inObjs=@{}
foreach($i in $myInput) {
foreach($a in $i.ArmorAddon) {
$ids+=$a;
if($inObjs.ContainsKey($a)) {
$inObjs[$a]=$i
} else {
$inObjs.Add($a, $i)
}
}
}
$csvDir=(Join-Path $PSScriptRoot ..)
$csvFile="ArmorExport-ArmorAddon.csv"
if($splitBySlot) {
$csvFile="ArmorExport-ArmorAddon-Slot.csv"
}
if($editorId -or $formId) {
Get-Content (Join-Path $csvDir $csvFile)|ConvertFrom-Csv -Delimiter ';' `
|where-object { ($editorId -and $_.EditorID -eq $editorId) -or ($formId -and $_.FormID -eq $formId)} `
|foreach-object { `
if($slotAsArray -and !$splitBySlot) { $_.Slot = ($_.Slot -Split ','); } `
$_.AdditionalRaces = ($_.AdditionalRaces -Split ','); `
$_ `
}
} elseif($ids.Length -gt 0) {
Get-Content (Join-Path $csvDir $csvFile)|ConvertFrom-Csv -Delimiter ';' `
|where-object { $ids -contains $_.EditorID } `
|foreach-object { `
if($slotAsArray -and !$splitBySlot) { $_.Slot = ($_.Slot -Split ','); } `
$_.AdditionalRaces = ($_.AdditionalRaces -Split ','); `
$_ } `
|foreach-object { Add-Member -InputObject $_ -MemberType NoteProperty -Name _ArmoRef `
-Value "$($inObjs[$_.EditorID].EditorID) `"$($inObjs[$_.EditorID].Name)`" [$($inObjs[$_.EditorID].RecordType):$($inObjs[$_.EditorID].FormID)]"; `
$_ }
} elseif($all) {
Get-Content (Join-Path $csvDir $csvFile)|ConvertFrom-Csv -Delimiter ';' `
|foreach-object { `
if($slotAsArray -and !$splitBySlot) { $_.Slot = ($_.Slot -Split ','); } `
$_.AdditionalRaces = ($_.AdditionalRaces -Split ','); `
$_ }
}