aboutsummaryrefslogtreecommitdiff
path: root/scripts/.scripts/tdone
diff options
context:
space:
mode:
authorNeodarZ <neodarz@neodarz.net>2017-08-23 20:35:04 +0200
committerNeodarZ <neodarz@neodarz.net>2017-08-23 20:35:04 +0200
commit8dab54a65a713d7bf661bc966e58c7e8ecf9c408 (patch)
treed945c2db604bb2243aa59ab9da38c472985ef5ea /scripts/.scripts/tdone
parent58fe5cf21035b556cab6577bd0ebc294d0df621f (diff)
downloaddotfiles_ascii-8dab54a65a713d7bf661bc966e58c7e8ecf9c408.tar.xz
dotfiles_ascii-8dab54a65a713d7bf661bc966e58c7e8ecf9c408.zip
Add some cool script
Diffstat (limited to 'scripts/.scripts/tdone')
-rwxr-xr-xscripts/.scripts/tdone28
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/.scripts/tdone b/scripts/.scripts/tdone
new file mode 100755
index 0000000..35fe01d
--- /dev/null
+++ b/scripts/.scripts/tdone
@@ -0,0 +1,28 @@
+#!/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 [[ $1 == "-h" ]]; then
+ usage
+else
+ echo "Wrong option/date"
+ echo "Write 'tdone -h' for help"
+fi