Permalink
Browse files

Abstracting the configuration so that I don't get emailed everyone's …

…task list who neglects to change the email address in the script and so others can have their own config within the repo without having problems.
  • Loading branch information...
1 parent 53eb550 commit f06b4ee8b8437c92ec69ed785b37324b07e390f9 @flickerfly committed Sep 8, 2011
Showing with 22 additions and 14 deletions.
  1. +1 −0 .gitignore
  2. +7 −1 README
  3. +10 −0 example.config
  4. +2 −6 task-ansi2email.sh
  5. +2 −7 task-email.sh
View
@@ -1 +1,2 @@
tmp_file.html
+config
View
8 README
@@ -1,5 +1,9 @@
These are all scripts to provide various notifications from concerning tasks in taskwarrior, a commandline task management system.
+*** Configuration ***
+Configuration of the email address and file locations can be changed in the 'config' file in the root of the repo. A sample config is provided in example.config. Simply rename this to config and make the appropriate edits.
+
+*** Available Scripts ***
task-email.sh: Uses ssmtp to send html formatted email to you on a regular basis giving you updates on your task list. I'm playing with two methods of accomplishing this. This one requires python and numpy (a python module). See the task-ansi2email.sh for an option that does not require python. Currently, the fancy HTML on this is optimized for mobile screens so it's thin and all that. I assume a little CSS would change this quickly. Thanks to
task-popup.sh: Provides popups with sound to your linux desktop. This uses tools that come as part of the default ubuntu system, but are available on other Linux operating systems.
@@ -8,10 +12,12 @@ task-ansi2email.sh: An alternate, but not as pretty version of HTML email. This
task-print.sh: Yeah, this doesn't actually exist because it is easily done in a crontab line so a script is overkill in a basic situation. See the appropriate line below.
-crontab lines:
+*** Sample Crontab lines ***
# Popup a little notice monday through friday ever 30 minutes with task info
*/30 * * * 1-5 DISPLAY=:0.0 /home/user/bin/taskwarrior-notifications/task-popup.sh
+
# Send me an email every morning at 5:30 on all days except Sunday.
30 5 * * 1-6 /home/user/bin/taskwarrior-notifications/task-email.sh
+
# Print out my task list every weekday morning at 5:30
30 5 * * 1-5 /usr/bin/task | /usr/bin/lp
View
@@ -0,0 +1,10 @@
+# Whom to email this too
+sendto="user@domain.com"
+
+# Directory to find support files
+inc="/home/user/scripts/taskwarrior-notifications"
+tmp_email="/tmp/task_email.txt"
+scripts="$inc/scripts"
+
+# Where to find the templates to use for HTML email
+templates="$inc/templates"
View
@@ -7,12 +7,8 @@
# another smtp program, if you do, please let me know and I'll update this
# cron: 30 5 * * 1-6 /home/user/bin/taskwarrior-notifications/task-email.sh
-# Directory to find support files
-inc="/home/jritchie/scripts/taskwarrior-notifications"
-tmp_email="/tmp/task_email.txt"
-scripts="$inc/scripts"
-# Whom to email this too
-sendto="josiah@fim.org"
+# Pull in the config variables
+source ./config
#setup headers so the HTML shows properly
cat > $tmp_email <<EOF
View
@@ -4,13 +4,8 @@
# Requires ssmtp
# cron: 30 5 * * 1-6 /home/user/bin/taskwarrior-notifications/task-email.sh
-# Directory to find support files
-inc="/home/jritchie/scripts/taskwarrior-notifications"
-tmp_email="/tmp/task_email.txt"
-templates="$inc/templates"
-scripts="$inc/scripts"
-# Whom to email this too
-sendto="josiah@fim.org"
+# Pull in the config variables
+source ./config
# Format time string
date=`date '+%b %d'` #Sept 07

0 comments on commit f06b4ee

Please sign in to comment.