diff --git a/.gitignore b/.gitignore index bb9012c..5b256a4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ tmp_file.html +config diff --git a/README b/README index 7b74ddd..3f61f1c 100644 --- a/README +++ b/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 diff --git a/example.config b/example.config new file mode 100644 index 0000000..43f3f64 --- /dev/null +++ b/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" diff --git a/task-ansi2email.sh b/task-ansi2email.sh index 44dc5a9..f0916bb 100755 --- a/task-ansi2email.sh +++ b/task-ansi2email.sh @@ -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 <