You are not logged in.

#1 2011-03-31 05:46:34

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

todd - a lightweight cli to-do list program

Introduction
I've been kind of shocked by the lack of to-do list managers in the world, particularly lightweight ones (or I'm just not searching enough). Why was it so hard to find an unobtrusive to-do program? So I decided to whip out the ol' C compiler and see what I could do; todd was born! smile

What is it?
Todd is, as hinted to by the title, a command-line program for managing to-do lists. No GTK, no ncurses, no nothing.

Why would you want to use it?
With todd, you can keep track of all the activities in your hectic life. So if you ever feel the need to mow the lawn after you finish your important university essay, or maybe just shave your rare Swedish goat, todd can help you remember what you have done and what you still need to do.

Why would Al Gore want to use it?
No more pads of paper, man.

Can I have a demonstration?
Certainly! I'll use my example above:

$ todd add "Finish paper"
$ todd add "Mow lawn"
$ todd add "Shave goat"

Todd now has a list of your newly added activities, which you can view:

$ todd
1 [ ] Finish paper
2 [ ] Mow lawn
3 [ ] Shave goat

So although you've had many distractions along the way, your paper is finally done! Let's mark that off the list:

$ todd mark 1

Let's see what our list looks like now:

$ todd
1 [*] Finish paper
2 [ ] Mow lawn
3 [ ] Shave goat

Wait! We don't want to display our already-completed tasks, right? I mean, we're busy people, and we just don't have time to sift through all of our tasks. Let's narrow it down to the things we still need to do:

$ todd list incomp
2 [ ] Mow lawn
3 [ ] Shave goat

Unfortunately, our goat is getting a little squirmy, so let's shave some of that hair off of the little guy. [buzz] That's completely done, let's just remove it from the list:

$ todd rm 3

So now we have:

$ todd
1 [*] Finish paper
2 [ ] Mow lawn

Uh-oh! While you were you shaving your beloved goat-friend, you remembered an important part of your paper that you had neglected. Time to mark that as incomplete:

$ todd unmark 1

This gives you a running total of:

$ todd
1 [ ] Finish paper
2 [ ] Mow lawn

How does it work?
Todd has a special format for storing tasks in text files. When the todd program is called, these normally cryptic text files are parsed and displayed on the screen in the format of a to-do list. Because of this, todd lists are very portable. This means that you can attach a to-do list to an email to the freelancer that you are hiring to write your university paper in the first place. tongue

Where can I get it?
I currently have it placed in the AUR:
http://aur.archlinux.org/packages.php?ID=47826

You can download the PKGBUILD yourself or use your favorite AUR helper.

I have a problem with it!
I have done a pretty thorough job (in my opinion) of weeding out all bugs in the software (there can't be too many in only ~600 SLOC). However, if you happen to find one, please (pretty please) add a post to this thread.

Usage instructions
These can be found using:

$ todd help

Usage: todd [FILE] [ACTION] [PARAMETERS]...

[FILE] points to a local todo list somewhere on your system
* If you do not include this option, the default todo list is used

[ACTION] is one of the following actions you can execute:
  add            add an entry (or entries) to your loaded todo list
  remove, rm        remove an entry (or entries)
  clear                clear the currently-loaded list
  mark            mark an entry (or entries) as completed
  unmark        unmark an entry (or entries) as completed
  tier, rank        place an importantance ranking on a task
  list            print a list of your current todo list
  create        create a new todd todo list
  delete, del        delete a todo list
  version        print the current version of todd
  help            display this list

[PARAMETERS] are additional sets of information given to each action:
  add [ENTRY's]
  remove, rm [ENTRY #'s] or [STRING's]
  mark [ENTRY #'s] or [STRING's]
  unmark [ENTRY #'s] or [STRING's]
  tier, rank [ENTRY #'s] [RANK]
  list [FILTER]
  create [NAME] [OPTION]
  delete, del [NAME]

  * The [RANK] flag for the 'tier/rank' option accepts
    a ranking using the numbers 1-5
  * The [OPTION] flag for the 'create' action can be set
    to 'int' to create an internal list (in ~/.todd), or left
    blank for a local list
  * The 'delete/del' action will search and delete lists
    in the current directory before looking at the lists
    stored in the ~/.todd directory
  * The 'remove/rm', 'mark', and 'unmark' actions accept
    more than one number and/or search string at once
  * If no actions are selected, the currently-loaded
    todo list will be printed.

The [FILTER] parameter to the 'list' action accepts a few options:
  list comp        list only completed tasks
  list incomp        list only incomplete tasks
  list gt [RANK]    list only tasks that have a greater rank than [RANK]
  list lt [RANK]    list only tasks that have a lesser rank than [RANK]
  list [RANK]        list only tasks with a rank of [RANK]
  list byrank        list all tasks in order by rank (1-5)

  * If no parameters are passed to the 'list' action,
    both complete and incomplete tasks will be shown.
  * You may combine filters for this action. For example, to display
    only those incomplete tasks with an importance greater than 3, you
    can do 'todd list incomp gt 3'

What do I need?
Todd depends on no external software/libraries. smile

EDIT (04/01/2011): Version 0.2.1 has been released. It is strongly recommended that you update to this version, as a major problem was solved. The software may not always function correctly if you decide not to update.

Last edited by cesura (2011-05-02 21:57:44)

Offline

#2 2011-03-31 09:51:13

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: todd - a lightweight cli to-do list program

Installed and ready to be tested. Thanks for the contribution!

Offline

#3 2011-03-31 13:59:25

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: todd - a lightweight cli to-do list program

Good stuff
Enhancement request : Can you mark with something other than numbers? What if I don't remember whether saving the goat was task 1 or 500? Do I have to skim through 500 tasks to find out the number and then mark it?

So I propose a grep like function --  which will show me

$ todd --grep "Shave goat"
375 [] Shave goat

then I can

todd mark 375

Even better if you can do it in the same command by merging them both.

$ todd mark $(todd --grep "Shave goat")

PS: Yes... My bash skills are shitty.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#4 2011-03-31 16:31:29

Stalafin
Member
From: Berlin, Germany
Registered: 2007-10-26
Posts: 617

Re: todd - a lightweight cli to-do list program

Why would you want him to implement that into todd? You can already just pipe todd's output into grep:

$ todd | grep "Shave goat"
1 [ ] Shave goat

Offline

#5 2011-03-31 17:15:34

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: todd - a lightweight cli to-do list program

Oh I know that...but the main aim was to see it and mark/remove it in a single command and I know that can be done as well.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#6 2011-03-31 17:24:47

Stalafin
Member
From: Berlin, Germany
Registered: 2007-10-26
Posts: 617

Re: todd - a lightweight cli to-do list program

Inxsible wrote:

Oh I know that...but the main aim was to see it and mark/remove it in a single command and I know that can be done as well.

$ todd rm $( todd | awk '/Shave goat/ {print $1; exit}' )

EDIT: But yeah, you might have a point. I think what one could implement is todd either accepting strings or ints, and behaving accordingly. :-)

Last edited by Stalafin (2011-03-31 17:26:31)

Offline

#7 2011-03-31 18:58:37

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: todd - a lightweight cli to-do list program

Army wrote:

Installed and ready to be tested. Thanks for the contribution!

Of course! Thank you. smile

Inxsible wrote:

Good stuff
Enhancement request : Can you mark with something other than numbers? What if I don't remember whether saving the goat was task 1 or 500? Do I have to skim through 500 tasks to find out the number and then mark it?

So I propose a grep like function --  which will show me

$ todd --grep "Shave goat"
375 [] Shave goat

then I can

todd mark 375

Even better if you can do it in the same command by merging them both.

$ todd mark $(todd --grep "Shave goat")

PS: Yes... My bash skills are shitty.

Stalafin wrote:

EDIT: But yeah, you might have a point. I think what one could implement is todd either accepting strings or ints, and behaving accordingly. :-)

Good ideas! I had actually planned on making a search function before, but then remembered that grep would work just fine, as you pointed out.

I suppose something like this would work well, marking all items with the word "Shave" in them:

$ todd mark "Shave"
$ todd list comp
375 [*] Shave goat

Offline

#8 2011-04-01 15:02:32

frostyfrog
Member
From: Utah, USA
Registered: 2011-03-27
Posts: 42

Re: todd - a lightweight cli to-do list program

Looks nice and easy. I'll have to try it out when I get home, and I'll try to compare against http://aur.archlinux.org/packages.php?ID=7673 and see which is better smile


{arch32} {subtlewm}{Acer Aspire One AO532h}
{arch64} {Headless Server}
Grrr! 400 char limit sad

Offline

#9 2011-04-01 15:52:57

ga01f4733
Member
From: NYC
Registered: 2008-12-05
Posts: 117

Re: todd - a lightweight cli to-do list program

Nice app itsbrad212,

let's see if it can hold my never ending pending list! wink

thanks,


There are no foreign lands. It is the traveler only who is foreign. --R.L Stevenson

Offline

#10 2011-04-01 16:19:33

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: todd - a lightweight cli to-do list program

ga01f4733 wrote:

Nice app itsbrad212,

let's see if it can hold my never ending pending list! wink

thanks,

Thanks. smile I've actually just recently noticed a bug in todd that occurs occasionally when long-winded tasks are added and then marked. I suppose I'll spend my day figuring that out.

EDIT: Should be fixed in todd version 0.2. Tell me if you experience any problems with it.

frostyfrog wrote:

Looks nice and easy. I'll have to try it out when I get home, and I'll try to compare against http://aur.archlinux.org/packages.php?ID=7673 and see which is better smile

Ah, I never noticed todotxt. Looks very useful, although I tried it and it seemed to be over-complicating things.

Last edited by cesura (2011-04-01 16:53:19)

Offline

#11 2011-04-10 04:20:40

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: todd - a lightweight cli to-do list program

Version 0.2.3 has been released, which fixes some rare occurances due to improper initialization of variables (many thanks to olcc).

Changelog 0.2.3 wrote:

* Fixed variable initialization issue

Offline

#12 2011-04-10 07:12:39

Haptic
Member
Registered: 2009-09-03
Posts: 149

Re: todd - a lightweight cli to-do list program

Would it be possible for this to allow some sort of a deadline for each task? I don't know if that would defeat the 'lightweightedness' of the program, but I would find that really useful.

Offline

#13 2011-04-10 14:25:19

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: todd - a lightweight cli to-do list program

Haptic wrote:

Would it be possible for this to allow some sort of a deadline for each task? I don't know if that would defeat the 'lightweightedness' of the program, but I would find that really useful.

Hmm, interesting idea. I am definitely interested in implementing that into todd in the near future. Would it be more beneficial to have the deadline be a day, or a particular time within a day (or both)?

Offline

#14 2011-04-10 14:29:17

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: todd - a lightweight cli to-do list program

Version 0.3 has been released. In this version, I have added the ability to mark/unmark tasks by a search string. Now, you have the option to enter a task number or a string. Todd will parse through your list and perform the selected action on all tasks that contain that string.

Changelog 0.3 wrote:

* Added the ability to mark/unmark items by search string

Offline

#15 2011-04-10 17:54:57

Haptic
Member
Registered: 2009-09-03
Posts: 149

Re: todd - a lightweight cli to-do list program

itsbrad212 wrote:
Haptic wrote:

Would it be possible for this to allow some sort of a deadline for each task? I don't know if that would defeat the 'lightweightedness' of the program, but I would find that really useful.

Hmm, interesting idea. I am definitely interested in implementing that into todd in the near future. Would it be more beneficial to have the deadline be a day, or a particular time within a day (or both)?

It wouldn't affect me either way, but maybe other people might.

I have some comments about custom lists. One, when you're adding stuff to you own list, why do you have to have the .todd extension on it? Two, isn't it a little inconvenient that the custom list has to be in the current working directory?

Also, maybe it would be a good idea if you could export the default todo list to a custom list.

Offline

#16 2011-04-11 19:20:53

chris-kun
Member
From: SF Bay Area
Registered: 2010-09-07
Posts: 235
Website

Re: todd - a lightweight cli to-do list program

I was thinking of making a program just like this. Looks like you beat me to it! A neat idea I had for mine (if you want to implement it in todd) was a sort of dynamic priority system. Basically, each task would have a completion date and a priority modifier, and based on this modifier the actual priority of the task would increase based on how close it is to the completion date. For example, with a priority modifier of one, and the task being due in a week, it might be six days before the priority increases at all, since you've deemed it as a 'small task' that doesn't need to be done until last minute. However, if you marked it higher, the sooner the priority would increase. Wha'cha think? tongue

Last edited by chris-kun (2011-04-11 19:21:06)


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you." -- Bregol

Offline

#17 2011-04-11 19:26:26

Stalafin
Member
From: Berlin, Germany
Registered: 2007-10-26
Posts: 617

Re: todd - a lightweight cli to-do list program

Btw ... have a look at task warrior. I think you are getting to a point where you implement more stuff and eventually start to converge to that program...

Offline

#18 2011-04-12 02:33:31

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: todd - a lightweight cli to-do list program

Haptic wrote:

One, when you're adding stuff to you own list, why do you have to have the .todd extension on it?

Very good point. You don't have to have it, but todd creates its lists like that by default. I'll change that in the next version.

Haptic wrote:

Two, isn't it a little inconvenient that the custom list has to be in the current working directory?

You don't have to. wink Just use a full path.

chris-kun wrote:

I was thinking of making a program just like this. Looks like you beat me to it! A neat idea I had for mine (if you want to implement it in todd) was a sort of dynamic priority system. Basically, each task would have a completion date and a priority modifier, and based on this modifier the actual priority of the task would increase based on how close it is to the completion date. For example, with a priority modifier of one, and the task being due in a week, it might be six days before the priority increases at all, since you've deemed it as a 'small task' that doesn't need to be done until last minute. However, if you marked it higher, the sooner the priority would increase. Wha'cha think? tongue

That's actually a really nice idea (seriously, I like it!). However, I'm going to have to agree with Stalafin on this one: the main focus of todd was to make a lightweight, out-of-your-face to-do list manager, and I don't want to stray far from that. I think someone forking todd and adding additional features would be more beneficial to the project.

Offline

#19 2011-04-12 09:39:17

JHeaton
Member
From: United Kingdom
Registered: 2009-05-16
Posts: 158

Re: todd - a lightweight cli to-do list program

Looks pretty cool, very similar to something I've been working on for the past few months (albeit using Perl instead of C); this might just put an end to that project, however! tongue

Will be installing it and having a play as soon as I get home. smile

Offline

#20 2011-04-13 12:13:03

Zyhael
Member
From: Philippines
Registered: 2010-10-22
Posts: 13

Re: todd - a lightweight cli to-do list program

This is just what i'm looking for.. thanks for the great lightweight app! smile

Offline

#21 2011-04-13 14:40:19

Grinch
Member
Registered: 2010-11-07
Posts: 265

Re: todd - a lightweight cli to-do list program

This is a sweet tool, so much better than all my 'todo.txt' files that I seem to scatter everywhere. Thanks!

Offline

#22 2011-04-13 19:04:07

JHeaton
Member
From: United Kingdom
Registered: 2009-05-16
Posts: 158

Re: todd - a lightweight cli to-do list program

itsbrad212 wrote:
chris-kun wrote:

I was thinking of making a program just like this. Looks like you beat me to it! A neat idea I had for mine (if you want to implement it in todd) was a sort of dynamic priority system. Basically, each task would have a completion date and a priority modifier, and based on this modifier the actual priority of the task would increase based on how close it is to the completion date. For example, with a priority modifier of one, and the task being due in a week, it might be six days before the priority increases at all, since you've deemed it as a 'small task' that doesn't need to be done until last minute. However, if you marked it higher, the sooner the priority would increase. Wha'cha think? tongue

That's actually a really nice idea (seriously, I like it!). However, I'm going to have to agree with Stalafin on this one: the main focus of todd was to make a lightweight, out-of-your-face to-do list manager, and I don't want to stray far from that. I think someone forking todd and adding additional features would be more beneficial to the project.

I've only just noticed this, but I think it might be something I would consider doing because I really like the sound of that priority system and it would certainly be of use to me. smile

Offline

#23 2011-04-13 22:55:12

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: todd - a lightweight cli to-do list program

Version 0.4 is finally complete, and it's the largest release so far (and removed the libconfig dependency)!

Changelog 0.4 wrote:

* Migrated from sprintf() to a faster malloc()/strcpy()
* Removed the need for a todd.conf
* Removed libconfig dependency
* Moved the list directory from /usr/share/todd/ to ~/.todd/
* Removed the requirement of having a ".todd" extension
* Organized source and refactored code
* Allowed the addition of "internal" lists (in ~/.todd/) by passing
an extra option to the "create" action
* Added extra flags to the Makefile

Offline

#24 2011-04-13 23:01:31

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: todd - a lightweight cli to-do list program

JHeaton wrote:

Looks pretty cool, very similar to something I've been working on for the past few months (albeit using Perl instead of C); this might just put an end to that project, however! tongue

Aww. It's always nice to have a little competition. wink

Grinch wrote:

This is a sweet tool, so much better than all my 'todo.txt' files that I seem to scatter everywhere. Thanks!

Zyhael wrote:

This is just what i'm looking for.. thanks for the great lightweight app! smile

Thank you both! I'm glad that it's of use to you. big_smile

JHeaton wrote:
itsbrad212 wrote:
chris-kun wrote:

I was thinking of making a program just like this. Looks like you beat me to it! A neat idea I had for mine (if you want to implement it in todd) was a sort of dynamic priority system. Basically, each task would have a completion date and a priority modifier, and based on this modifier the actual priority of the task would increase based on how close it is to the completion date. For example, with a priority modifier of one, and the task being due in a week, it might be six days before the priority increases at all, since you've deemed it as a 'small task' that doesn't need to be done until last minute. However, if you marked it higher, the sooner the priority would increase. Wha'cha think? tongue

That's actually a really nice idea (seriously, I like it!). However, I'm going to have to agree with Stalafin on this one: the main focus of todd was to make a lightweight, out-of-your-face to-do list manager, and I don't want to stray far from that. I think someone forking todd and adding additional features would be more beneficial to the project.

I've only just noticed this, but I think it might be something I would consider doing because I really like the sound of that priority system and it would certainly be of use to me. smile

I suppose that would be a bit helpful, now that I think about it. If I can find a lightweight method of implementing this into todd, then I'll definitely go for it! Do you think something such as a "tier system" work well for you/other users (i.e. tasks can be marked as 1st tier for most important and, say, 5th tier for least important)?

Offline

#25 2011-04-13 23:07:50

chris-kun
Member
From: SF Bay Area
Registered: 2010-09-07
Posts: 235
Website

Re: todd - a lightweight cli to-do list program

I understand wanting to keep todd lightweight and will probably start working on my program soon so anyone wanting that functionality have that to look forward to.


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you." -- Bregol

Offline

Board footer

Powered by FluxBB