Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

paulroub/todo.txt-recurring-tasks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An add-on for Gina Trapani's todo.txt script, allowing the automatic addition of recurring tasks to the todo list.

Once installed, the todo.sh recur command should be run from a cron job (or other scheduler), once a day. Any tasks applicable to the current date will be appended to the todo list (if they're not already present).

The recurring tasks are pulled from a recur.txt file, living in the same directory as todo.txt. Each line in recur.txt has the syntax:

[week[,week ...] ] day : task

or

daily: task    

Where:

  • week is an optional list of weeks - "first", "second", "third", "fourth", "fifth" or "last". Weeks are separated by commas only (no spaces).
  • day is one of "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" or "sunday". If a task needs to happen on two different days of the week, you'll need two lines.
  • task is anything that might appear in a todo.txt task, including priority, contexts or projects. Do not include an added-on date, however.

Examples:

sunday: (A) Weekly review of projects list
monday: Take out the trash @home
last saturday: Apply the dog's flea medicine
first,third friday: Collect and file expenses
daily: run the dishwasher

Note that the add-on attempts to be smart about things, so if you ran this on a Sunday when todo.txt already contained:

(B) Weekly review of projects list @home

It would notice the task with the same text (ignoring priority, context, project) and add nothing.

Installation:

Download the latest recur archive, and unpack it in a temporary directory, e.g.

tar zxf Todotxt-Recur-1.02.tar.gz
cd Todotxt-Recur-1.02

If you are using the standard todo.sh location for add-ons ($HOME/.todo.actions.d), you'll want to run:

perl Makefile.PL
make
make test
sudo make install

to install the recur script and its component modules.

There are a few common Perl modules you'll need if you want to run the make test step: Test::Harness, Test::More and Test::Class. These are not required for normal script operation.

If your add-ons live elsewhere, you'll need to specify that directory as an INSTALLSITESCRIPT option when generating the Makefile.

perl Makefile.PL INSTALLSITESCRIPT=/some/other/directory
make
make test
sudo make install

(Installing the modules in a user-specific directory, rather than system-wide, calls for setting LIB= as appropriate, and is left as an exercise for the reader.)

See the general Creating and Installing Add-Ons documentation to learn where your add-ons live if you're unsure.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages