Stuff I've written for my todo.txt setup.
A file to keep available copies of one-time checklists (i.e. "stuff to take when going swimming")
Read the comments at the top of the templated_checklists
file for info on how to use this.
A recurring item generator for todo.txt. Yes, there are like 14 of these, but I couldn't find a single one that could do "every 2 weeks", or that would run the script for previous days that the script was missed if your computer wasn't turned on, so I wrote my own.
- Requirements: Ruby and gems: ice_cube, optimist
- Run
todo.sh ice_recur --help
for info on how to useice_recur
and all the command line options.
Install gem
, the ruby library manager
Using Pacman:
sudo pacman -S rubygems
Using apt
sudo apt install rubygems
Using yum
sudo yum install rubygems
Afterwards, use gem to install the needed libraries
gem install optimist
gem install ice_cube
This script goes in $TODO_DIR/actions/
You put your entries in $TODO_DIR/ice_recur.txt
, and add something like this:
~/bin/todo.sh ice_recur
to your crontab, to run once a day.
Every entry that matches the current day or previous days after
$TODO_DIR/.ice_recur_completed
was last touched (which happens at the end of
every run) will be added, as long as there is no other entry with the same text
content. By default, priority, creation date, completion date, due date,
threshold date, and notes are ignored when matching the entry in
ice_recur.txt
to the todo.txt
file. There are command line options to
ignore project and context, as well.
Comments can be added to the file using #
.
Entries look like:
@[optional starting date] @@[optional ending date] [timing] - [task]
like:
@2016-02-03 Weekly ; day Monday - (B) Mon Recur Test
Where [timing]
is a sequence of timing specifiers seperated by " ; ". Each
timing specifier makes the item more specific.
The starting/ending date (marked by @
/@@
) is entirely optional; if specified, the
script won't start to run until that date/will stop running on that date.
Run ice_recur
tests like this if you want pretty output and failure if you
miss tests: prove -v --exec "./ice_recur --test" ice_recur
- ice_recur 1.2 29 Nov 2018: Added support for
day_of_week
,day_of_year
andmonth_of_year
- ice_recur 1.3 29 Nov 2018: Now uses the timestamp on the
.ice_recur_completed
file, and runs the schedule for each day since then, so you can run it less than once a day and it'll still work properly. - ice_recur 1.4 30 Nov 2018: No longer uses
todotxt-rb
; this means better handling of key/value tags, at least potentially - ice_recur 1.5 2 Dec 2018: Added
-n, -p, and -o
. Won't run twice on the same day anymore. Additional clarity on what's getting added. - ice_recur 1.5.1 3 Dec 2018: Bugfix: Start the run the day after the last touch to the completed file.
- ice_recur 1.5.2 4 Dec 2018: Added
-f
- ice_recur 1.6 13 Dec 2018: Added @@ for end dates