Permalink
Browse files

Added daily-mail.

  • Loading branch information...
1 parent cfbc742 commit a98d8bd1b71a156c7b06d19415e57349039c669b @jgm committed Nov 6, 2010
Showing with 32 additions and 0 deletions.
  1. +3 −0 README
  2. +29 −0 daily-mail
View
@@ -15,6 +15,9 @@ backup-cloudlib
calnet
lookup names in Calnet LDAP directory
+daily-mail
+ sends a daily email with todos and notes
+
find_duplicate_words
find duplicate words in a text
View
@@ -0,0 +1,29 @@
+#!/bin/sh -e
+# mails todo list and unfiled notes to me, unless empty
+
+tempfile=`mktemp /tmp/mailXXXXXXXX`
+todofile="$HOME/Wiki/TodoList"
+notesfile="$HOME/Wiki/UnfiledNotes"
+
+addline () { echo $1 >> $tempfile ; }
+addfile () { cat $1 >> $tempfile ; }
+
+addline "To: John MacFarlane <jgm@berkeley.edu>"
+addline "Subject: Todo list"
+addline ""
+addline "Good morning John!"
+addline ""
+
+if [ -s $notesfile ] ; then
+ addline "You have unfiled notes:"
+ addline ""
+ addfile $notesfile
+ addline ""
+fi
+addline "Here are some things to work on today:"
+addline ""
+addfile $todofile
+
+cat $tempfile | /usr/sbin/sendmail -F "Your Computer" -f "jgm" -i jgm@berkeley.edu
+rm $tempfile
+

0 comments on commit a98d8bd

Please sign in to comment.