While I like the functionality of the todo.txt structure, I do not like the fact that done tasks stay in my todo list in perpetuity, and I also don’t want to lose them. So, I’ve made a simple hack that allows me to move done items to a done folder. Here’s the code:
#!/bin/sh awk '/^x/ {print $0}' ~/Dropbox/todo/todo.txt >> ~/Dropbox/todo/done.txt awk '!/^x/ {print $0}' ~/Dropbox/todo/todo.txt > ~/Dropbox/todo/todo2.txt mv ~/Dropbox/todo/todo2.txt ~/Dropbox/todo/todo.txt |
I call it todo_done.sh.
I copied my original to /tmp/pre in order to test and make sure I have a backup. After running todo_done.sh I get:
$ diff -u /tmp/pre/todo.txt ~/Dropbox/todo/todo.txt --- /tmp/pre/todo.txt 2017-11-15 17:46:21.794510999 -0500 +++ /home/ayoung/Dropbox/todo/todo.txt 2017-11-15 17:46:24.584515043 -0500 @@ -7,7 +7,6 @@ 2017-10-02 Expenses 2017-10-04 Containerize hammer 2017-10-06 Complete steam setup -x 2017-10-12 Trrc time resource reduce cost 2017-10-12 Whiteboard training 2017-10-14 Subscription manager extensions for skis or products? 2017-10-15 Workcenter is made up of 4 things: machine, man, method, measures. |
and
$ diff -u /tmp/pre/done.txt ~/Dropbox/todo/done.txt --- /tmp/pre/done.txt 2017-11-15 17:46:17.914505377 -0500 +++ /home/ayoung/Dropbox/todo/done.txt 2017-11-15 17:46:24.580515037 -0500 @@ -26,3 +26,4 @@ x 2017-10-19 Drs appt? x 2017-11-02 Letter of Support x 2017-11-15 2017-09-27 LinkedIn TJX +x 2017-10-12 Trrc time resource reduce cost |