Permalink
Browse files

Remove ATENDEE and ORGANIZER

  • Loading branch information...
ohtake committed Oct 4, 2012
1 parent 46e233e commit 6457dc485023b8c36ec06259311559f54af1f67f
Showing with 4 additions and 0 deletions.
  1. +4 −0 outlook2ical.ps1
View
@@ -40,11 +40,15 @@ function replace-summary([string]$str) {
function is-description([string]$str) {
$str -match "^(?:DESCRIPTION|X-ALT-DESC)[;:]"
}
+function contains-username([string]$str) {
+ $str -match "^(?:ATTENDEE|ORGANIZER)[;:]"
+}
$lines = cat $private -Encoding UTF8
$lines = normalize-ical $lines
$lines = $lines |% {replace-summary($_)}
$lines = $lines |? {(is-description($_)) -eq $false}
+$lines = $lines |? {(contains-username($_)) -eq $false}
$lines |% -Begin {
# UTF-8N
$writer = New-Object System.IO.StreamWriter -ArgumentList @($public, $false, (New-Object System.Text.UTF8Encoding $false))

0 comments on commit 6457dc4

Please sign in to comment.