TW5 version of TWc DailyTasks plugin?

279 views
Skip to first unread message

cmari

unread,
May 20, 2017, 10:40:00 PM5/20/17
to TiddlyWiki
Because everyone here is so clever and generous, I'm posting my wish: Does anyone have any suggestions for how to recreate the TWc DailyTasks plugin in TW5? I can't find the original plugin online, but it can still be found on this site:
http://jayfresh.tiddlyspot.com/. The results look something like this:

Each square is a date within the past 10 days. Clicking a square changes the color from red to yellow, so there's a visual tracking of progress. New tasks can be added from the display tiddler. I find this really useful and it's one of the few things I haven't been able to translate from TWc to TW5. Any ideas?
Thanks!
cmari

Auto Generated Inline Image 1

Stephen Kimmel

unread,
Jun 16, 2017, 2:35:01 PM6/16/17
to TiddlyWiki
That was an interesting challenge. The result of my effort is located at http://dailytasksk.tiddlyspot.com/

The results are less than perfect but similar enough to the original that I don't think you'll have any problem using it. With any luck, it will be close enough to what you want to carry you the rest of the way.

Stephen

cmari

unread,
Jun 17, 2017, 12:10:44 AM6/17/17
to TiddlyWiki
Wow, that is terrific, thank you so much! I will use this daily.
I especially appreciate the really clear comments. That made it easy for me to add a field that takes advantage of the tooltip and captures the running list of dates.
cmari

Stephen Kimmel

unread,
Jun 17, 2017, 8:20:05 AM6/17/17
to TiddlyWiki
On Friday, June 16, 2017 at 11:10:44 PM UTC-5, cmari wrote:
Wow, that is terrific, thank you so much! I will use this daily.
I especially appreciate the really clear comments. That made it easy for me to add a field that takes advantage of the tooltip and captures the running list of dates.
cmari

You are most welcome. It was my pleasure to work on it.

I am open to further modificatons so I would like to see the changes you made and hear any ideas for changes you'd like to see made.

Stephen

PLATO

unread,
Jun 17, 2017, 10:51:26 AM6/17/17
to TiddlyWiki
Thanks,i am use it !!
Tkank you so much.

在 2017年6月17日星期六 UTC+8上午2:35:01,Stephen Kimmel写道:
Message has been deleted

cmari

unread,
Jun 17, 2017, 12:19:33 PM6/17/17
to TiddlyWiki
Hi Stephen,
After I posted my modifications, I got the dreaded red javascript error. I then deleted my original message from Google Groups so as not to lead anyone astray.
But then I realized the error was the result of me failing to follow expected procedure (use the "Add a new Task" button). I had tried instead to simply insert <<dailytasks>> into an existing tiddler.
That does work, but one needs also to add the field "lastdate", with today's date (m/d/yy) as the contents.
Thanks again for a really useful tool!

Here are my crude copy/paste edits again. I liked the (Saturday) in the tooltip over the boxes but for my running list I only needed to capture m/d/yy. So I created a clone of var darray2 with the same initial definition as darray
var darray2= ["O","O","O","O","O","O","O","O","O","O"];
Then I could add a different date format to darray2:
darray2[10-i]=mon+"/"+day+"/"+yr;
With tip2=darray2[i], the buttons can append (or remove) m/d/yy in the field "datestamp".
(When adding multiple dates, they do need to be clicked in order from oldest to most recent - if that is what you want - since a sort[] would not treat them as actual dates.)
for (i=0 ; i<10 ; i++)
{
//set tooltip to matching darray entry
var tip=darray[i];
var tip2=darray2[i];
if (barray[i]=="X") {
// If it was an X then use the modified cancel button
   output += '<$button class="tc-btn-invisible tc-tiddlylink" tooltip="'+tip+'"><$action-listops $field="datestamp" $subfilter="-'+tip2+'"/><$action-setfield  $field="toggled" $value="'+i+'" />{{$:/core/images/done}}</$button> ' ;
} else {
// not an X so must be an O use modified circle
   output += '<$button class="tc-btn-invisible tc-tiddlylink" tooltip="'+tip+'"><$action-listops $field="datestamp" $subfilter="'+tip2+'"/><$action-setfield $field="toggled" $value="'+i+'" />{{$:/core/images/open}}</$button> ' ;}
} // end for i loop
cmari


My tiddler text:

Stephen Kimmel

unread,
Jun 18, 2017, 9:17:28 AM6/18/17
to TiddlyWiki
You mentioned sorting the list of dates. The problem with sorting dates is in the formatting. A date in the MM/DD/YY format won't sort properly but one in the YY/0MM/0DD format will. The zero's [0] are necessary so that the date right after July 1, 2017 is July 2, 2017 and not July 10, 2017. In first format this would be 7/1/17, 7/2/17 and 7/10/17 which would sort 7/1/17, 7/10/17, 7/2/17. In YY/0MM/0DD format this becomes 17/07/01, 17/07/02 and 17/07/10.

Changing the line building darray2 to create entries in that format should eliminate the need to click the buttons in order.

The barray preserves the history of whether you did the task each of the last 10 days and the routine creates the dates that go with each of those days. A bigger barray would preserve the data going further back. As we create a darray2, we could skip the days when the task wasn't done and the resulting array would be just your datestamps in order. Assuming we don't try to preserve this data back thousands of days, it should be very quick. Of course, you would want to limit the entries you display to the last ten or so since a screen full of hundreds of red and yellow squares might not be that useful. But a month's worth, especially if it is arranged in calendar format, might be useful.

Let's push this one step further. After you've used the tool for several months, you could have a list of dates that is hundreds of entries long. Now what do you do with it? I can see looking at the record for a longer time frame than ten days. The question "How well did I do with this task over the last month?" seems valid and possibly useful.I can also see value to preserving the data for some future date when you will think up some future use for it. Or perhaps a graph of how well I did of doing my daily task over the last several weeks, months, whatever. The data we store and how we store it will vary depending on what we want to do with it.

Wen-Ming Yang

unread,
Jun 19, 2017, 12:29:54 AM6/19/17
to TiddlyWiki
Hi, cmari,

Thank you for the DailyTaks. I love it. I am usint TW5 and Twc both in my sysetm. However, when I give the name with more than two words in Twc (http://jayfresh.tiddlyspot.com/. ), I have a problem in deleting it since it did not delete it. Can you help me with this issue? Thanks!

WM

Stephen Kimmel

unread,
Jun 19, 2017, 9:29:23 PM6/19/17
to TiddlyWiki
Wen-Ming,

I am no expert in Twc but I have observed the behavior you've described. It seems that when using the X button to delete the task, the program gets the name wrong. Note that the pop-up asking you to confirm that you want to delete the tiddler, it only gives the first word of the name.

My work-around would be to not use the X button but the click on the name of the task and then delete it directly.
Reply all
Reply to author
Forward
0 new messages