aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/scripts/tdone
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-09-05 07:48:16 +0200
committerneodarz <neodarz@neodarz.net>2019-09-05 07:48:16 +0200
commit9b19480228d8421c3987a634a602012c953a993e (patch)
tree4bce21766502f3a72bb2002daeea2a406c2a3bda /dotfiles/scripts/tdone
parent40dddc15f4a323d3c84c84be7bb2c5ca94d3c07c (diff)
downloaddotfiles_dotdrop-9b19480228d8421c3987a634a602012c953a993e.tar.xz
dotfiles_dotdrop-9b19480228d8421c3987a634a602012c953a993e.zip
Add some scripts
Diffstat (limited to '')
-rwxr-xr-xdotfiles/scripts/tdone30
1 files changed, 30 insertions, 0 deletions
diff --git a/dotfiles/scripts/tdone b/dotfiles/scripts/tdone
new file mode 100755
index 0000000..d63fd87
--- /dev/null
+++ b/dotfiles/scripts/tdone
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+usage () {
+ echo "Usage:"
+ echo " tdone <option> <date>"
+ echo "Date list:"
+ echo " today - Show the tasks done today"
+ echo " yesterday - Show the tasks done yesterday"
+ echo " week - Show the tasks done this week"
+ echo " month - Show the tasks done this month"
+ echo "Option list:"
+ echo " -h view this help message"
+ }
+
+if [[ $1 == "today" ]]; then
+ task end.after:today completed
+elif [[ $1 == "yesterday" ]]; then
+ task end.after:today-1d completed
+elif [[ $1 == "month" ]]; then
+ task end.after:socm completed
+elif [[ $1 == "week" ]]; then
+ task end.after:socw completed
+elif [[ $@ =~ ^[[:digit:][:space:]]*$ ]]; then
+ task modify -next $@; task done $@
+elif [[ $1 == "-h" ]]; then
+ usage
+else
+ echo "Wrong option/date"
+ echo "Write 'tdone -h' for help"
+fi