Skip to content

Commit

Permalink
Abstracting the configuration so that I don't get emailed everyone's …
Browse files Browse the repository at this point in the history
…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
flickerfly committed Sep 8, 2011
1 parent 53eb550 commit f06b4ee
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
tmp_file.html tmp_file.html
config
8 changes: 7 additions & 1 deletion README
@@ -1,5 +1,9 @@
These are all scripts to provide various notifications from concerning tasks in taskwarrior, a commandline task management system. 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-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. 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.
Expand All @@ -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. 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 # 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 */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. # 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 30 5 * * 1-6 /home/user/bin/taskwarrior-notifications/task-email.sh

# Print out my task list every weekday morning at 5:30 # Print out my task list every weekday morning at 5:30
30 5 * * 1-5 /usr/bin/task | /usr/bin/lp 30 5 * * 1-5 /usr/bin/task | /usr/bin/lp
10 changes: 10 additions & 0 deletions example.config
@@ -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"
8 changes: 2 additions & 6 deletions task-ansi2email.sh
Expand Up @@ -7,12 +7,8 @@
# another smtp program, if you do, please let me know and I'll update this # 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 # cron: 30 5 * * 1-6 /home/user/bin/taskwarrior-notifications/task-email.sh


# Directory to find support files # Pull in the config variables
inc="/home/jritchie/scripts/taskwarrior-notifications" source ./config
tmp_email="/tmp/task_email.txt"
scripts="$inc/scripts"
# Whom to email this too
sendto="josiah@fim.org"


#setup headers so the HTML shows properly #setup headers so the HTML shows properly
cat > $tmp_email <<EOF cat > $tmp_email <<EOF
Expand Down
9 changes: 2 additions & 7 deletions task-email.sh
Expand Up @@ -4,13 +4,8 @@
# Requires ssmtp # Requires ssmtp
# cron: 30 5 * * 1-6 /home/user/bin/taskwarrior-notifications/task-email.sh # cron: 30 5 * * 1-6 /home/user/bin/taskwarrior-notifications/task-email.sh


# Directory to find support files # Pull in the config variables
inc="/home/jritchie/scripts/taskwarrior-notifications" source ./config
tmp_email="/tmp/task_email.txt"
templates="$inc/templates"
scripts="$inc/scripts"
# Whom to email this too
sendto="josiah@fim.org"


# Format time string # Format time string
date=`date '+%b %d'` #Sept 07 date=`date '+%b %d'` #Sept 07
Expand Down

0 comments on commit f06b4ee

Please sign in to comment.