[PATCH] Support for natural language due date parsing (like RTM Gmail extension)

25 views
Skip to first unread message

Sandy Armstrong

unread,
Mar 9, 2008, 11:17:48 PM3/9/08
to ta...@googlegroups.com
Hey Folks,

I didn't get a chance to play with offline support, but in playing
with Tasky I did find that I was wasting a lot of time setting due
dates. Inspired by the capabilities of RTM's Gmail extension for
Firefox, I decided to implement similar support. This patch is a work
in progress...but so far it adds the following to Tasky:

* A preference in the General tab that allows one to enable natural
language due date parsing (it is disabled by default, but honestly I
think it should be enabled by default)
* If a task has no due date set (like when editing a brand new task),
the task is active, and the preference is enabled, then the following
occurs:
- "lunch today" becomes "lunch" with a due date of today
- "lunch tomorrow" becomes "lunch" with a due date of tomorrow
- "lunch 3 feb" becomes "lunch" with a due date of feb 3rd, 2009
(yes, it favors future dates)
- "lunch feb 3rd 2008" becomes "lunch with a due date of feb 3rd, 2008
- So basically, "today", "tomorrow", or strings that work in
DateTime.Parse are supported...I'm working on better regular
expressions to support things like "fri" and "next monday". I want to
model the support after that of the RTM Gmail extension.
* If a task has a due date that is not this year, Tasky shows the
year in the Due Date column

The addition to the preferences dialog is ugly...just wanted to get
this sent before tomorrow.

Delivering the stuff of legendary demos,
Sandy

nlp.patch

Sandy Armstrong

unread,
Mar 10, 2008, 9:40:23 AM3/10/08
to ta...@googlegroups.com
On Sun, Mar 9, 2008 at 8:17 PM, Sandy Armstrong
<sanforda...@gmail.com> wrote:
>
> The addition to the preferences dialog is ugly...just wanted to get
> this sent before tomorrow.

This is easily fixed by adjusting the height request of the window.
Though still, the heading of "Cleverness" could probably be changed...

Sandy

Sandy Armstrong

unread,
Mar 13, 2008, 11:03:12 AM3/13/08
to ta...@googlegroups.com
Updated patch for Tasque attached. There is still a preference, but
it is no longer exposed in the Preferences dialog, and it defaults to
being enabled. Defaulting to being enabled necessitated some changes
in Preferences.cs to support defaults, and I also changed a lot of
"static string" fields to be "const string" fields to support this.

Please review, you know you want it! :-)

nlp.patch

Boyd Timothy

unread,
Mar 13, 2008, 11:22:46 AM3/13/08
to ta...@googlegroups.com
Okay dude,

I just made time for this, read through your latest patch, and it's
AWESOME! Commit it ASAP!

One thing that we REALLY ought to do is ... scroll to and highlight a
modified task. Any time the priority, date, name, etc. is modified on
a task, it has the chance to be reordered. On my long task list when
I created "Review Sandy's nlp.patch today", it quickly disappeared
(was moved to the top of my list) off of the viewable scrolled window.
It's really confusing.

We have code to do scrolling which kind of works, but it needs to be
adjusted to be used right after edits.

Good work Sandy!

-Boyd

On Thu, Mar 13, 2008 at 9:03 AM, Sandy Armstrong

Sandy Armstrong

unread,
Mar 13, 2008, 11:31:26 AM3/13/08
to ta...@googlegroups.com
Committed. Agree 100% about scrolling...no time to look at it right
now, though.

Sandy

Reply all
Reply to author
Forward
0 new messages