diff --git a/.claude/settings.local.json b/.claude/settings.local.json index caabf9b..af8a53c 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -2,7 +2,11 @@ "permissions": { "allow": [ "Bash(powershell.exe -ExecutionPolicy Bypass -File scripts/Process-MailRules.ps1)", - "Bash(powershell.exe -ExecutionPolicy Bypass -File scripts/Process-MailRules.ps1 -DryRun)" + "Bash(powershell.exe -ExecutionPolicy Bypass -File scripts/Process-MailRules.ps1 -DryRun)", + "Bash(powershell.exe -Command \"Get-ChildItem ''C:\\\\Users\\\\d-chrka\\\\Documents\\\\projects\\\\mail-organizer\\\\logs\\\\protocols\\\\'' -Filter ''run_*.json'' | Select-Object Name\")", + "Bash(powershell.exe -File:*)", + "Bash(node -e:*)", + "Bash(node:*)" ] } } diff --git a/config/rules.json b/config/rules.json index 77c79e0..3ea1481 100644 --- a/config/rules.json +++ b/config/rules.json @@ -52,8 +52,7 @@ "match": { "from": "*@datacenter-group.com", "subject": "Wartungsbericht*", - "hasAttachment": true, - "unreadOnly": false + "hasAttachment": true }, "actions": { @@ -70,6 +69,23 @@ "moveToFolder": "archive" } } + }, + { + "id": "feldmann-fi-rechnung-loeschen", + "enabled": true, + "name": "Feldmann FI-Rechnung Erinnerungen loeschen", + "description": "Automatische Erinnerungen von M. Feldmann zu FI Rechnungen in den Papierkorb verschieben", + + "match": { + "subject": "M. Feldmann: Bitte denken Sie an FI Rechnung*" + }, + + "actions": { + "onSuccess": { + "markAsRead": true, + "moveToFolder": "deleteditems" + } + } } ] } diff --git a/scripts/Generate-ProtocolHtml.ps1 b/scripts/Generate-ProtocolHtml.ps1 new file mode 100644 index 0000000..7e063c8 --- /dev/null +++ b/scripts/Generate-ProtocolHtml.ps1 @@ -0,0 +1,167 @@ +param( + [Parameter(Mandatory)][string]$JsonData, + [Parameter(Mandatory)][string]$OutputPath +) + +# Escape for safe embedding in JS string literal +$escaped = $JsonData -replace '\\', '\\\\' -replace "'", "\\\'" -replace "`r`n", '\n' -replace "`n", '\n' + +$html = @' + +