From 1f5737d7c0b97ac29c72a9f0cd883bd6211edec9 Mon Sep 17 00:00:00 2001 From: Andrew DeFaria Date: Sun, 11 Jul 2021 13:51:03 -0700 Subject: [PATCH] Changed announceEmail.pl to remove things like order numbers --- bin/announceEmail.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/announceEmail.pl b/bin/announceEmail.pl index 96da982..906b22a 100755 --- a/bin/announceEmail.pl +++ b/bin/announceEmail.pl @@ -125,6 +125,8 @@ sub notify($) { my $cmd = "notify-send -i $icon -t $timeout '$msg'"; Execute $cmd; + + return; } # notify sub interrupted { @@ -235,6 +237,10 @@ sub MonitorMail() { # Google Talk doesn't like # $subject =~ s/\#//g; + # Remove long strings of numbers like order numbers. They are uninteresting + my $longNumber = 5; + $subject =~ s/\s+\S*\d{$longNumber,}\S*\s*//g; + # Now speak it! my $logmsg = "From $from $subject"; -- 2.17.1