summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/maildirproc/purdue.rc368
1 files changed, 207 insertions, 161 deletions
diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc
index f086eee..a09d7ab 100644
--- a/.config/maildirproc/purdue.rc
+++ b/.config/maildirproc/purdue.rc
@@ -24,8 +24,11 @@ def is_to_or_from_re(mail,address):
def piazza_topic(mail, topic):
return (
- is_to_or_from(mail, topic+" on Piazza")
- or mail["Subject"].contains(topic+" on Piazza"))
+ False
+ or is_to_or_from(mail, topic+" on Piazza")
+ or mail["Subject"].contains(topic+" on Piazza")
+ or (is_to_or_from(mail, "@piazza.com>") and mail["Subject"].contains(" in "+topic+": "))
+ )
def my_filters(mail):
# Generic stuff ########################################################
@@ -79,6 +82,7 @@ def my_filters(mail):
or is_to_or_from(mail, "@alerts.comcast.net")
or is_to_or_from(mail, "rentpayment.com")
or is_to_or_from(mail, "@vectren.com")
+ or is_to_or_from(mail, "@vectrenemail.com")
):
mail.move("INBOX.housing.BeauJardin")
return
@@ -91,7 +95,11 @@ def my_filters(mail):
mail.move("INBOX.crap.CERIAS")
return
- if is_to_or_from(mail,"royfu@purdue.edu"):
+ if (
+ False
+ or is_to_or_from(mail,"royfu@purdue.edu")
+ or is_to_or_from(mail,"usmannkhan@purdue.edu")
+ ):
mail.move("INBOX.crap.Hackers")
return
@@ -123,173 +131,211 @@ def my_filters(mail):
mail.move("INBOX.crap.cron")
return
- # Fall 2012 ############################################################
-
- # SCI210 (Teaming principles)
- if mail["Subject"].contains("Fall-2012-SCI-21000-001:"):
- mail.move("INBOX.classes.2012-2.SCI210")
- # CS180 (Java)
- if mail["Subject"].contains("fall-2012-cs-18000"):
- mail.move("INBOX.classes.2012-2.CS180")
- return
- if piazza_topic(mail, "CS 18000"):
- mail.move("INBOX.classes.2012-2.CS180.Piazza")
- return
- # SOC100
- if mail["Subject"].contains("Fall-2012-SOC-10000"):
- mail.move("INBOX.classes.2012-2.SOC100")
- return
-
- # Spring 2013 ##########################################################
-
- # CS240 (C)
- if mail["Subject"].contains("[CS240] Submission result for"):
- mail.move("INBOX.classes.2013-1.CS240.autograder")
- return
- if mail["Subject"].contains("[CS240]") or mail["Subject"].contains("Spring-2013-CS-24000"):
- mail.move("INBOX.classes.2013-1.CS240")
- return
- if piazza_topic(mail, "CS 240"):
- mail.move("INBOX.classes.2013-1.CS240.Piazza")
- return
- # PHYS220
- if mail["Subject"].matches(".*(PHYS|CHIP)\s*220.*") or is_to_or_from(mail,"srdas@purdue.edu"):
- mail.move("INBOX.classes.2013-1.PHYS220")
- return
- # SOC220 (Social Problems)
- if mail["Subject"].contains("Spring-2013-SOC-22000"):
- mail.move("INBOX.classes.2013-1.SOC220")
- return
-
- # Fall 2013 ############################################################
-
- # CS250 (Computer Architecture)
- if mail["Subject"].contains("Fall-2013-CS-25000"):
- mail.move("INBOX.classes.2013-2.CS250")
- return
- if piazza_topic(mail, "CS 250") or piazza_topic(mail, "CS 250-FALL2013"):
- mail.move("INBOX.classes.2013-2.CS250.Piazza")
- return
- # CS251 (Intro Algo)
- if mail["Subject"].contains("Fall-2013-CS-25100"):
- mail.move("INBOX.classes.2013-2.CS251")
- return
- if piazza_topic(mail, "CS 251"):
- mail.move("INBOX.classes.2013-2.CS251.Piazza")
- return
- # SPAN101
- if mail["Subject"].contains("Fall-2013-SPAN-10100"):
- mail.move("INBOX.classes.2013-2.SPAN101")
- return
- # MA261 (Calc III)
- if mail["Subject"].contains("Fall-2013-MA-26100"):
- mail.move("INBOX.classes.2013-2.MA261")
- return
- # MA265 (Linear Algebra)
- if mail["Subject"].contains("Fall-2013-MA-26500"):
- mail.move("INBOX.classes.2013-2.MA265")
- return
-
- # Spring 2014 ##########################################################
-
- # COM217
- if mail["Subject"].contains("Spring-2014-COM-21700-004"):
- mail.move("INBOX.classes.2014-1.COM217")
- return
- if mail["From"].contains("mixable") and mail["Subject"].matches("^COM 21700"):
- mail.move("INBOX.classes.2014-1.COM217.Mixable")
+ # # Fall 2012 ############################################################
+
+ # # SCI210 (Teaming principles)
+ # if mail["Subject"].contains("Fall-2012-SCI-21000-001:"):
+ # mail.move("INBOX.classes.2012-2.SCI210")
+ # # CS180 (Java)
+ # if mail["Subject"].contains("fall-2012-cs-18000"):
+ # mail.move("INBOX.classes.2012-2.CS180")
+ # return
+ # if piazza_topic(mail, "CS 18000"):
+ # mail.move("INBOX.classes.2012-2.CS180.Piazza")
+ # return
+ # # SOC100
+ # if mail["Subject"].contains("Fall-2012-SOC-10000"):
+ # mail.move("INBOX.classes.2012-2.SOC100")
+ # return
+
+ # # Spring 2013 ##########################################################
+
+ # # CS240 (C)
+ # if mail["Subject"].contains("[CS240] Submission result for"):
+ # mail.move("INBOX.classes.2013-1.CS240.autograder")
+ # return
+ # if mail["Subject"].contains("[CS240]") or mail["Subject"].contains("Spring-2013-CS-24000"):
+ # mail.move("INBOX.classes.2013-1.CS240")
+ # return
+ # if piazza_topic(mail, "CS 240"):
+ # mail.move("INBOX.classes.2013-1.CS240.Piazza")
+ # return
+ # # PHYS220
+ # if mail["Subject"].matches(".*(PHYS|CHIP)\s*220.*") or is_to_or_from(mail,"srdas@purdue.edu"):
+ # mail.move("INBOX.classes.2013-1.PHYS220")
+ # return
+ # # SOC220 (Social Problems)
+ # if mail["Subject"].contains("Spring-2013-SOC-22000"):
+ # mail.move("INBOX.classes.2013-1.SOC220")
+ # return
+
+ # # Fall 2013 ############################################################
+
+ # # CS250 (Computer Architecture)
+ # if mail["Subject"].contains("Fall-2013-CS-25000"):
+ # mail.move("INBOX.classes.2013-2.CS250")
+ # return
+ # if piazza_topic(mail, "CS 250") or piazza_topic(mail, "CS 250-FALL2013"):
+ # mail.move("INBOX.classes.2013-2.CS250.Piazza")
+ # return
+ # # CS251 (Intro Algo)
+ # if mail["Subject"].contains("Fall-2013-CS-25100"):
+ # mail.move("INBOX.classes.2013-2.CS251")
+ # return
+ # if piazza_topic(mail, "CS 251"):
+ # mail.move("INBOX.classes.2013-2.CS251.Piazza")
+ # return
+ # # SPAN101
+ # if mail["Subject"].contains("Fall-2013-SPAN-10100"):
+ # mail.move("INBOX.classes.2013-2.SPAN101")
+ # return
+ # # MA261 (Calc III)
+ # if mail["Subject"].contains("Fall-2013-MA-26100"):
+ # mail.move("INBOX.classes.2013-2.MA261")
+ # return
+ # # MA265 (Linear Algebra)
+ # if mail["Subject"].contains("Fall-2013-MA-26500"):
+ # mail.move("INBOX.classes.2013-2.MA265")
+ # return
+
+ # # Spring 2014 ##########################################################
+
+ # # COM217
+ # if mail["Subject"].contains("Spring-2014-COM-21700-004"):
+ # mail.move("INBOX.classes.2014-1.COM217")
+ # return
+ # if mail["From"].contains("mixable") and mail["Subject"].matches("^COM 21700"):
+ # mail.move("INBOX.classes.2014-1.COM217.Mixable")
+ # return
+ # # CS252 (Systems Programming)
+ # if piazza_topic(mail, "CS 25200"):
+ # mail.move("INBOX.classes.2014-1.CS252.Piazza")
+ # return
+ # # CS307 (Software Engineering)
+ # if is_to_or_from(mail, "dunsmore@purdue.edu") or mail["Subject"].contains("Spring-2014-CS-30700-LE1"):
+ # mail.move("INBOX.classes.2014-1.CS307")
+ # return
+ # # SPAN102
+ # if mail["Subject"].contains("spring-2014-span-102"):
+ # mail.move("INBOX.classes.2014-1.SPAN102")
+ # return
+ # # STAT350
+ # if is_to_or_from(mail, "ssellke@purdue.edu"):
+ # mail.move("INBOX.classes.2014-1.STAT350")
+ # return
+ # if piazza_topic(mail, "STAT 35000 (SELLKE)"):
+ # mail.move("INBOX.classes.2014-1.STAT350.Piazza")
+ # return
+
+ # # Fall 2014 ############################################################
+
+ # # CS334 (Graphics)
+ # if (is_to_or_from(mail, "lin553@purdue.edu") or mail["Subject"].contains("Fall-2014-CS-33400")):
+ # mail.move("INBOX.classes.2014-2.CS334")
+ # return
+ # # CS354 (OS)
+ # if piazza_topic(mail, "CS 354"):
+ # mail.move("INBOX.classes.2014-2.CS354.Piazza")
+ # return
+ # # CS381 (Algo)
+ # if piazza_topic(mail, "CS 381"):
+ # mail.move("INBOX.classes.2014-2.CS381.Piazza")
+ # return
+ # # CS456 (Programming languages)
+ # if piazza_topic(mail, "CS 456"):
+ # mail.move("INBOX.classes.2014-2.CS456.Piazza")
+ # return
+ # # MA416
+ # if mail["Subject"].contains("Fall-2014-MA-41600"):
+ # mail.move("INBOX.classes.2014-2.MA416")
+ # return
+ # # PHYS221
+ # if (False
+ # or is_to_or_from(mail, "cui@purdue.edu")
+ # or is_to_or_from(mail, "shina@purdue.edu")
+ # or is_to_or_from(mail, "ajith@purdue.edu")
+ # ):
+ # mail.move("INBOX.classes.2014-2.PHYS221")
+ # return
+
+ # # Spring 2015 #########################################################
+
+ # # CS352 (Compilers)
+ # if is_to_or_from(mail, "wjg@cs.purdue.edu"):
+ # mail.move("INBOX.classes.2015-1.CS352")
+ # return
+ # if piazza_topic(mail, "CS 352"):
+ # mail.move("INBOX.classes.2015-1.CS352.Piazza")
+ # return
+ # # CS408 (Software testing)
+ # if (False
+ # or mail["Subject"].contains("spring-2015-cs-40800")
+ # or is_to_or_from(mail, "li1471@purdue.edu")
+ # or is_to_or_from(mail, "kirby@purdue.edu")
+ # or is_to_or_from(mail, "webb39@purdue.edu")
+ # or is_to_or_from(mail, "Jkou@purdue.edu")
+ # or is_to_or_from(mail, "nstodda@purdue.edu")
+ # or is_to_or_from(mail, "aryker@purdue.edu") # TA
+ # ):
+ # mail.move("INBOX.classes.2015-1.CS408")
+ # return
+ # # CS448 (Databases)
+ # if piazza_topic(mail, "CS 44800"):
+ # mail.move("INBOX.classes.2015-1.CS448.Piazza")
+ # return
+ # if mail["Subject"].matches("CS *448"):
+ # mail.move("INBOX.classes.2015-1.CS448")
+ # return
+ # # ME297 (FRC)
+ # if (False
+ # or mail["Subject"].contains("[ME297]")
+ # or is_to_or_from(mail, "heller5@purdue.edu")
+ # ):
+ # mail.move("INBOX.classes.2015-1.ME297")
+ # return
+ # # SOC324 (Criminology)
+ # if mail["Subject"].contains("spring-2015-soc-32400"):
+ # mail.move("INBOX.classes.2015-1.SOC324")
+ # return
+
+ # Spring 2015 ###############################z##########################
+
+ # CHM 490 (History & Philosophy of Science)
+ if is_to_or_from(mail, "gmbodner@purdue.edu"):
+ mail.move("INBOX.classes.2015-2.CHM490")
+ return
+ # CS 334 (Graphics)
+ if (
+ False
+ or mail["Subject"].contains("fall-2015-cs-33400-le1")
+ or is_to_or_from(mail, "aliaga@purdue.edu")
+ or is_to_or_from(mail, "abejara@purdue.edu")
+ ):
+ mail.move("INBOX.classes.2015-2.CS334")
return
- # CS252 (Systems Programming)
- if piazza_topic(mail, "CS 25200"):
- mail.move("INBOX.classes.2014-1.CS252.Piazza")
+ if piazza_topic(mail, "CS 334"):
+ mail.move("INBOX.classes.2015-2.CS334.Piazza")
return
- # CS307 (Software Engineering)
- if is_to_or_from(mail, "dunsmore@purdue.edu") or mail["Subject"].contains("Spring-2014-CS-30700-LE1"):
- mail.move("INBOX.classes.2014-1.CS307")
+ # CS 490 (Senior Project)
+ if is_to_or_from(mail, "anesen@purdue.edu"):
+ mail.move("INBOX.classes.2015-2.CS490")
return
- # SPAN102
- if mail["Subject"].contains("spring-2014-span-102"):
- mail.move("INBOX.classes.2014-1.SPAN102")
+ if piazza_topic(mail, "CS 49000"):
+ mail.move("INBOX.classes.2015-2.CS490.Piazza")
return
- # STAT350
- if is_to_or_from(mail, "ssellke@purdue.edu"):
- mail.move("INBOX.classes.2014-1.STAT350")
+ # MA 416 (Probability)
+ if mail["Subject"].contains("fall-2015-ma-41600"):
+ mail.move("INBOX.classes.2015-2.MA416")
return
- if piazza_topic(mail, "STAT 35000 (SELLKE)"):
- mail.move("INBOX.classes.2014-1.STAT350.Piazza")
+ if piazza_topic(mail, "SELLKE 416 "):
+ mail.move("INBOX.classes.2015-2.MA416.Piazza")
return
- # Fall 2014 ############################################################
-
- # CS334 (Graphics)
- if (is_to_or_from(mail, "lin553@purdue.edu") or mail["Subject"].contains("Fall-2014-CS-33400")):
- mail.move("INBOX.classes.2014-2.CS334")
- return
- # CS354 (OS)
- if piazza_topic(mail, "CS 354"):
- mail.move("INBOX.classes.2014-2.CS354.Piazza")
- return
- # CS381 (Algo)
- if piazza_topic(mail, "CS 381"):
- mail.move("INBOX.classes.2014-2.CS381.Piazza")
+ # FRC 4272
+ if mail["Subject"].contains("[ME297]"):
+ mail.move("INBOX.classes.2015-2.FRC4272")
return
- # CS456 (Programming languages)
- if piazza_topic(mail, "CS 456"):
- mail.move("INBOX.classes.2014-2.CS456.Piazza")
- return
- # MA416
- if mail["Subject"].contains("Fall-2014-MA-41600"):
- mail.move("INBOX.classes.2014-2.MA416")
- return
- # PHYS221
- if (False
- or is_to_or_from(mail, "cui@purdue.edu")
- or is_to_or_from(mail, "shina@purdue.edu")
- or is_to_or_from(mail, "ajith@purdue.edu")
- ):
- mail.move("INBOX.classes.2014-2.PHYS221")
- return
-
- # Spring 2015 #########################################################
- # CS352 (Compilers)
- if is_to_or_from(mail, "wjg@cs.purdue.edu"):
- mail.move("INBOX.classes.2015-1.CS352")
- return
- if piazza_topic(mail, "CS 352"):
- mail.move("INBOX.classes.2015-1.CS352.Piazza")
- return
- # CS408 (Software testing)
- if (False
- or mail["Subject"].contains("spring-2015-cs-40800")
- or is_to_or_from(mail, "li1471@purdue.edu")
- or is_to_or_from(mail, "kirby@purdue.edu")
- or is_to_or_from(mail, "webb39@purdue.edu")
- or is_to_or_from(mail, "Jkou@purdue.edu")
- or is_to_or_from(mail, "nstodda@purdue.edu")
- or is_to_or_from(mail, "aryker@purdue.edu") # TA
- ):
- mail.move("INBOX.classes.2015-1.CS408")
- return
- # CS448 (Databases)
- if piazza_topic(mail, "CS 44800"):
- mail.move("INBOX.classes.2015-1.CS448.Piazza")
- return
- if mail["Subject"].matches("CS *448"):
- mail.move("INBOX.classes.2015-1.CS448")
- return
- # ME297 (FRC)
- if (False
- or mail["Subject"].contains("[ME297]")
- or is_to_or_from(mail, "heller5@purdue.edu")
- ):
- mail.move("INBOX.classes.2015-1.ME297")
- return
- # SOC324 (Criminology)
- if mail["Subject"].contains("spring-2015-soc-32400"):
- mail.move("INBOX.classes.2015-1.SOC324")
- return
-
# Everything else #####################################################
mail.move("INBOX.ham");