ToDo List Formatter Idea

7 views
Skip to first unread message

bugeats

unread,
Jun 17, 2008, 2:34:14 AM6/17/08
to TiddlyWikiDev
I'm seriously considering diving in and creating my first plugin, but
my time is at a premium these days and I thought I'd gauge the
interest before I do.

I want to create a minimal "todo list" formatter. Unlike the ones
associated with GTD TiddlyWiki and others, I don't want the items in
the list to be new tiddlers (it gets cluttered fast). I want it to be
simple and formatter-based.

Example:

{{{
- Uncompleted ToDo Item
+ Completed ToDo Item
- All the normal WikiFormatters will just _work normally_
-- Nested lists should work as well
+ And if you complete a parent
++ The children
++ will be marked as complete as well
}}}

When rendered, it would just add a checkbox element, and possibly a
"completed" class on the list item element. The rest would be up to
CSS. Changing the state of the checkbox would re-format the contents
of the tiddler in place (BTW, is this easy/possible?).

Thoughts? Somebody else wanna do it for me? :)

FND

unread,
Jun 17, 2008, 2:57:47 AM6/17/08
to Tiddly...@googlegroups.com
> I'm seriously considering diving in and creating my first plugin

Go for it! We're here to assist you, and there are also some resources
on the community wiki:
http://www.tiddlywiki.org/wiki/Dev:Plugins

> I want to create a minimal "todo list" formatter. Unlike the ones
> associated with GTD TiddlyWiki and others, I don't want the items in
> the list to be new tiddlers (it gets cluttered fast). I want it to be
> simple and formatter-based.

Sounds good - a bit like todotxt:
http://tinyurl.com/4qa52t
(http://todotxt.tiddlyspot.com/#Overview%20%5B%5BGTD%20Components%5D%5D)

> Changing the state of the checkbox would re-format the contents
> of the tiddler in place (BTW, is this easy/possible?).

I guess story.refreshTiddler() would do the job.


-- F.

Eric Shulman

unread,
Jun 17, 2008, 5:10:15 AM6/17/08
to TiddlyWikiDev
> I want to create a minimal "todo list" formatter. Unlike the ones
> associated with GTD TiddlyWiki and others, I don't want the items in
> the list to be new tiddlers (it gets cluttered fast). I want it to be
> simple and formatter-based.
>
> When rendered, it would just add a checkbox element, and possibly a
> "completed" class on the list item element. The rest would be up to
> CSS. Changing the state of the checkbox would re-format the contents
> of the tiddler in place (BTW, is this easy/possible?).
>
> Thoughts? Somebody else wanna do it for me? :)

http://www.TiddlyTools.com/#CheckboxPlugin

does pretty much all you describe, and more... it has a variety of
ways to store the true/false 'state' of any given checkbox, including:

[x=chkSomething] - track state in config.options.chkSomething
[x(tagname)] - tag current tiddler when checked, remove tag when
unchecked
[x(tiddlername|tagname)] - tag the specified tiddler
[x(@fieldname)] - track state as a field stored in the current tiddler
[x(@fieldname)] - write field into the specfied tiddler

In addition, you can also specify bits of javascript code to invoke
custom onInit, onBeforeClick, and onAfterClick handlers that can
perform side-effects whenever the checkbox state changes. For
example, you could probably use the onAfterClick handler to add the
"auto-change the child checkboxes" handling that you described.

The plugin also automatically handles the 'refresh the display' logic,
with 3 possible target tiddlers to be re-rendered
* container: the tiddler in which the checkbox is displayed
* tagged: the tiddler that is being tagged
* tagging: the tiddler that *is* the tag (if it exists)

Using CheckboxPlugin, it is very straigtforward to create a simple to-
do list, where the states are tracked as tags on the current tiddler:

[x(foo)] foo description
[x(bar)] bar description
[x(baz)] baz description

simply setting/clearing a checkbox adds/removes the "foo", "bar", or
"baz" tags from the tiddler.

enjoy,
-e

bugeats

unread,
Jun 18, 2008, 2:35:57 PM6/18/08
to TiddlyWikiDev
I'm glad I asked. Looks like the CheckboxPlugin will work for now.
Thanks. -C
Reply all
Reply to author
Forward
0 new messages