Giter Club home page Giter Club logo

todo.txt-later's Introduction

later - schedule future events for todo.txt

a simple addon providing for recurring and future todos in todo.txt

Overview

later works as an action for the excellent todo.txt. It builds on the idea of recur add-on. I believe it improves on the ability to do something every X Friday by anchoring it on a date. In addition it does not require additional modules to be installed, since all functionality is handled by the core ruby installation, which is the only requirement.

Additionally you can easily move tasks from your current todo list to re-appear at a future time. Kind of like a snooze button.

How it works

later should run via a scheduled task or, if so inclined, manually once a day. It will read the later.txt todo file and find items whose date fits the current date. Those items are then added to the normal todo.txt file.

Here is what the later.txt might look like.

Mon take out garbage
Mon,Tue,Sat make dinner
1,14 do something on the 1st and 14th of month @personal
Jul4,Dec25 Holiday tasks
2014-03-03;Fri/2 every 2nd Friday
2014-06-01..2014-10-01;Thu mow the lawn in the summer

Basically you can specify the following:

  • a date in the todo.txt format: 2014-02-30
  • day of the week in the 3 letter format: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
  • a number indicating the day of the month. 1, 12,
  • a month day such as Nov11 (make sure to zero pad so Nov03, NOT Nov3)

You can also use a list of them separated by a comma and no spaces:

  • Mon,Fri
  • 1,15
  • Jun01,Oct03

It's also possible to repear at intervals by adding /2 after one of the above. However if you want to use an interval like that you need to specify a start date and a ;. For example:

2014-04-01;Mon,Fri/2

means starting on 2014-04-01 every 2nd Monday and Friday.

Lastly the start date can also have an end date, which would stop repeating the task after the end date:

2014-04-01..2014-05-01;Mon,Fri/2

Everything after the first space on a line becomes the todo item. By default later will not add items to your todo list if they they already exist. If you always want an item added simply add three exclamation points like this, which will be replaced by the date. That will make it unique

Fri (A) !!! something todo every friday
1,15 !!! always do something twice a month 

Note that you'll want to add the exclamation points after the priority to keep in line with the Rule 2 of the todo.txt format.

later will clean up after itself when it finds a simple dated task or one with an end date and remove those entries from the later.txt after adding them to your normal todo.txt

Installation

  • install ruby (I'm using version 1.9.3)
  • download later to todo.actions.d/ in your todo.txt directory
  • create a later.txt (todo.sh edit later should do it)
  • run later: todo.sh later and/or add it to your crontab, but make sure to run it only once per day, since it will keep adding the todo items again if they have been completed.

Testing

There are quite a few unit tests based on minitest for the date parsing. To run them simply call

ruby test/test_laterdate.rb

todo.txt-later's People

Contributors

opennomad avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.