Tasktimer plugin a few questions regarding this wonderful plugin

17 views
Skip to first unread message

Kashgarinn

unread,
Jun 22, 2007, 6:12:56 AM6/22/07
to TiddlyWiki
Hi there, I wanted to ask eric a few Q's about his lovely tasktime
macro, which is great!

I like keeping logs on what I do, so I'm seeing tasktimer as a
possible replacement for what I've been using, I'm wondering though
whether 2 things could be added to it?

I'd love to see a <<taskTimer today>> version of the button. I'm a
frequent user of calendarplugin for TW, and I'd love being able to
have the button in a tiddler by itself, and let it automatically
insert into the "today" tiddler in the same format as calendarplugin
uses, so I can browse in the calendar for the days.

I'd also be interested in having the time added which it takes you to
write the description into the window. I like doing time estimates of
what I do, that means normally I'd open up the window earlier than
when the project is complete. Is this possible?

extra fluff:
For me, the ability to add one or two extra column into the
description would be excellent, so I realized that I could actually do
a : "description of what I was doing|tag" into the short description
window and the extra column appeared into the table. I thought that
was cool. I like to add "tags" to the comments, plus I also like to
add time estimates for what I'm doing.

I'm also wondering if perhaps a new macro could be created which is a
bit related to this? I'd love to see a macro which can add up the
time in one column.

For time estimates I use the format 1 hour = 1, half an hour = 0,5, 15
minutes = 0,25 and so on (no idea what to call this type of definition
of time). So something like <<timecount column#>> would be great.

- Basically I'd like to document time estimates and realtime totals
for the day, so the ability to add upp other columns than just the
last one would be great.

This might be a silly thing to request.. but I'd love it :D I might
even try creating it if I can find the courage to try :P

K.

Message has been deleted

Eric Shulman

unread,
Jun 22, 2007, 6:57:50 AM6/22/07
to TiddlyWiki
> Hi there, I wanted to ask eric a few Q's about his lovely tasktime
> macro, which is great!

thanks. :-)

> I'd love to see a <<taskTimer today>> version of the button. I'm a

The first param of <<taskTimer>> is the name of the 'target tiddler'
in which to write the activity record. By default, if unspecified (or
if "ask" is used), you are prompted to enter a tiddler name whenever
you stop the timer. Otherwise, the plugin just writes the activity
data into the specified target tiddler.

To use a "dated tiddler title", you can use TW's 'computed parameter'
syntax, {{...}} to insert javascript code that **generates** the
tiddler title as the param value, using the current date:

<<taskTimer {{(new Date()).formatString("YYYY-0MM-0DD")}}>>

> I'd also be interested in having the time added which it takes you to
> write the description into the window. I like doing time estimates of
> what I do, that means normally I'd open up the window earlier than
> when the project is complete. Is this possible?

actually, that's how it worked originally: opening the tiddler as soon
as the timer was started... but I didn't like it as much because of
the prompting for a target tiddler that occurred as soon as the timer
was started. I found it disrupted my 'work flow' and seems out of
place... but how about a compromise?

If the target tiddler IS specified as a param (even a generated one,
such as your dated tiddlers), then the tiddler could be displayed as
soon as you *start* the timer button; however, when the plugin needs
to prompt for a target tiddlername, then it would work as it does now
(i.e., no tiddler would be displayed until you *stop* the timer button
and are then prompted for a target tiddler).

Give me a bit to make the changes and test it... perhaps a day or
two...

> extra fluff:
> For me, the ability to add one or two extra column into the
> description would be excellent, so I realized that I could actually do
> a : "description of what I was doing|tag" into the short description
> window and the extra column appeared into the table. I thought that
> was cool. I like to add "tags" to the comments, plus I also like to
> add time estimates for what I'm doing.

Hey, now that's a neat little trick! I'll have to add that to the
plugin documentation...

> I'm also wondering if perhaps a new macro could be created which is a
> bit related to this? I'd love to see a macro which can add up the
> time in one column.

Although it is purely experimental, and somewhat limited in ability,
check out:
http://www.TiddlyTools.com/#ColumnCalculatorPlugin

Note that it cannot add up time values written using hh:mm:ss
notation, but CAN add them up if you write them as decimal values (as
you indicated you are inclined to do anyway).

> This might be a silly thing to request.. but I'd love it :D

Obviously not so silly, since I've already thought about the same
thing... :-)

enjoy,
-e

Kashgarinn

unread,
Jun 22, 2007, 8:16:22 AM6/22/07
to TiddlyWiki
Thanks for the quick reply :D

> To use a "dated tiddler title", you can use TW's 'computed parameter'
> syntax, {{...}} to insert javascript code that **generates** the
> tiddler title as the param value, using the current date:
>
> <<taskTimer {{(new Date()).formatString("YYYY-0MM-0DD")}}>>

I had to change it to : <<taskTimer {{(new Date()).formatString("0DD/
0MM/YYYY")}}>> so that I could use the calendarplugin with it as well,
this means it automatically adds it to the right date, which is
awesome! :D I would though like to ask you if you can make it easier
for people by allowing a "today" tag which would do that
automatically.. but I'm not sure that just because I'd like it that
more people would. I love this solution though :D

> > I'd also be interested in having the time added which it takes you to
> > write the description into the window. I like doing time estimates of
> > what I do, that means normally I'd open up the window earlier than
> > when the project is complete. Is this possible?
>
> actually, that's how it worked originally: opening the tiddler as soon
> as the timer was started... but I didn't like it as much because of
> the prompting for a target tiddler that occurred as soon as the timer
> was started. I found it disrupted my 'work flow' and seems out of
> place... but how about a compromise?
>
> If the target tiddler IS specified as a param (even a generated one,
> such as your dated tiddlers), then the tiddler could be displayed as
> soon as you *start* the timer button; however, when the plugin needs
> to prompt for a target tiddlername, then it would work as it does now
> (i.e., no tiddler would be displayed until you *stop* the timer button
> and are then prompted for a target tiddler).
>
> Give me a bit to make the changes and test it... perhaps a day or
> two...

- actually, I think we're not talking about the same thing..
Ok, try this:
1) click the button.
2) wait 5 seconds
3) click the button again
4) type in a test remark into the description field
5) wait 5 seconds
6) click Ok

you should see that the total time is 5 seconds instead of 10+ seconds
which was the total time. I'm thinking that I might click early on
the button again to get the description window, and keep it up while
working on things, then when done , click ok. And the time then
wouldn't reflect total time.

> > extra fluff:
> > For me, the ability to add one or two extra column into the
> > description would be excellent, so I realized that I could actually do
> > a : "description of what I was doing|tag" into the short description
> > window and the extra column appeared into the table. I thought that
> > was cool. I like to add "tags" to the comments, plus I also like to
> > add time estimates for what I'm doing.
>
> Hey, now that's a neat little trick! I'll have to add that to the
> plugin documentation...

I actually was going to ask you do add something complicated which did
the same thing, but realised that this worked, so don't need to ask
for a more complex solution :)

> > I'm also wondering if perhaps a new macro could be created which is a
> > bit related to this? I'd love to see a macro which can add up the
> > time in one column.
>
> Although it is purely experimental, and somewhat limited in ability,
> check out:
> http://www.TiddlyTools.com/#ColumnCalculatorPlugin

I'll test it when I've gotten a few days worth of data into columns,
looks very interesting. Shame it isn't compatible with the time
format.... *hint*hint* ;P

K.

Eric Shulman

unread,
Jun 22, 2007, 12:10:18 PM6/22/07
to TiddlyWiki
> I had to change it to : <<taskTimer {{(new Date()).formatString("0DD/
> 0MM/YYYY")}}>> so that I could use the calendarplugin with it as well,
> this means it automatically adds it to the right date, which is
> awesome! :D I would though like to ask you if you can make it easier
> for people by allowing a "today" tag which would do that

I'll definitely consider it. Something like:
<<taskTimer today:0DD/0MM/YYYY>>
where the ":0DD/0MM/YYYY" part would be optional, and specifies the
format for the dated tiddler title. The default date format when none
is specified would be the same as calendar plugin (if installed), or
the same as <<newJournal>> (if CalendarPlugin is not installed)

> > > I'd also be interested in having the time added which it takes you to
> > > write the description into the window. I like doing time estimates of

> - actually, I think we're not talking about the same thing..
> Ok, try this:
> 1) click the button.
> 2) wait 5 seconds
> 3) click the button again
> 4) type in a test remark into the description field
> 5) wait 5 seconds
> 6) click Ok
>
> you should see that the total time is 5 seconds instead of 10+ seconds
> which was the total time. I'm thinking that I might click early on
> the button again to get the description window, and keep it up while
> working on things, then when done , click ok. And the time then
> wouldn't reflect total time.

Well, for starters, when the browser's prompt() dialog (aka,
"description window") is displayed, you can't interact with the rest
of the page. The ONLY actions you can take are to press "cancel" or
enter some descriptive text and press "ok".

Also, I'm confused: currently, the timer starts counting when you
press the button once, and stops counting when you press the button
again. Using your steps described above, the total time is being
reported correctly as 5 seconds, regardless of how slowly you type in
the description.

Are you saying that you *want* to count the time it takes to type in
the description? I just don't think it makes as much sense as
"click... timer starts... click again... timer stops". There are so
many reasons why you might be slow to enter the description, and
*recording* the timer data and description just doesn't seem like part
of the task itself.

Sure, you could take a long time to think about the description, and
you *could* consider that as part of the task itself... but, then the
timing result would be inconsistent, depending upon how fast you can
type your input, or whether you get distracted by a question from a co-
worker, just as you are about to enter the description, or the phone
rings, or...

Note: if you do *cancel* from the prompt() dialog, the timer resumes
counting, and DOES include the time spent in the dialog box before
pressing cancel. This makes sense to me, since pressing cancel is
essentially reversing the decision to stop the timer in the first
place, so resuming the timer includes the time that elapsed while
changing your mind, and the result is as if you never pressed the
button to stop the timer in the first place.

> > http://www.TiddlyTools.com/#ColumnCalculatorPlugin


> looks very interesting. Shame it isn't compatible with the time
> format.... *hint*hint* ;P

It definitely "on the list" for enhancements, but not a really high
priority (but that could change :-)...

-e

Eric Shulman

unread,
Jun 22, 2007, 4:33:37 PM6/22/07
to TiddlyWiki

<<taskTimer today:0DD/0MM/YYYY>>
where the ":0DD/0MM/YYYY" part would be optional, and specifies the
format for the dated tiddler title. The default date format when none
is specified is the same as DatePlugin, CalendarPlugin or
<<newJournal "xxxxxx">> in SideBar (plugins not installed)

> > > > I'd also be interested in having the time added which it takes you to
> > > > write the description into the window.

After thinking about this some more, I decided that stopping the timer
either before or after the user input is really a matter of
preference. So, I started to implement it as an option that you could
enable if you choose to.

The tricky part was allowing the button to continue to update in the
background (via timeout interrupts) even while the "application-modal"
prompt() dialogs are displayed and then re-getting the updated button
info once the input is done and the timeout interrupt has been
cleared.

Curiously, once I got this behavior working, I decided that it works
better this way, so I decided to save myself a bit of work and skip
the code for making it an option, and have changed the plugin behavior
to *always* work as you have suggested (i.e., only stop the timer
after the user input is done).

Here's the update (v1.1.0)
http://www.TiddlyTools.com/#TaskTimerPlugin

enjoy!

-e

Kashgarinn

unread,
Jun 25, 2007, 6:58:15 AM6/25/07
to TiddlyWiki
The thing works nicely. However, does the tiddler it writes into
always have to pop up? I'd like it if I could turn off that the
tiddler it's writing into pops up after you've clicked ok.. it's fine
for verification but I'd like to turn it off if it's possible.


***extra fluff which is just me digressing really

BTW , have you checked out http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/d441759bb1458272
?

The idea of tasktimerplugin + calendarplugin + timelineplugin all
working together just sounds right :D probably hard to do though..
instead of a single XML it'd have to trawl through tables in lots of
tiddlers which might even have text as well either above or below the
table.

Would be fun to see it work though.

It's interesting that the best way probably to chop the information in
a dated calendar tiddler so that a timeline plugin would understand
when a tasktimer-table starts and ends would be to have the
information in tiddlers under the date.. but you wouldn't really want
it displayed as links or tiddlers under the date tiddler, but inside
the tiddler itself.

I'm wondering, can you display the whole content of one tiddler inside
another tiddler in an easily linkable way? If you could, and the link
in the dated tiddlers would be something like <<displaytiddler
"tasktimertable 25/06/2007">> then perhaps it would be easier to both
be able to have the table readable in the calendar date tiddler as
well as have text surrounding the table (if needed) without it
screwing with the information in timeline.

I could also see other cool uses for something like this, like an easy
way to add information from one tiddler to another, whether it's text,
or images, or links and still have it separated into their own
tiddlers.

I'm just thinking out loud, timelinerplugin would be just gravy on top
of an already cool working couple of plugins, but not really necessary
in and of itself, also too much would need to be changed with it for
it to actually work with information inside tiddlers.

K.

Eric Shulman

unread,
Jun 25, 2007, 12:50:16 PM6/25/07
to TiddlyWiki
> I'm wondering, can you display the whole content of one tiddler inside
> another tiddler in an easily linkable way? If you could, and the link
> in the dated tiddlers would be something like <<displaytiddler
> "tasktimertable 25/06/2007">> then perhaps it would be easier to both
...

> way to add information from one tiddler to another, whether it's text,
> or images, or links and still have it separated into their own
> tiddlers.

The TW core includes a built-in macro that does exactly what you
describe:
<<tiddler TiddlerName>>
causes the entire content of TiddlerName to be displayed in the
current tiddler.

You can also use "tiddler slice" references:
<<tiddler "TiddlerName::slicename">>
which will insert the value of the indicated slice name into the
current tiddler. Slices are defined by putting a two-column table
into TiddlerName, where the first column contains the slice name, and
the second column contains the slice value.

The <<tiddler>> macro also supports additional parameters that can be
used to automatically substitute values into the output, by using
special "marker" sequences, $1 through $9 in the source tiddler
content.

For example, suppose you want to make a quick way to insert "mailto:"
email links into your content while obscuring the email addresses to
defeat "spam harvesters" that look for text of the form: "name@sys".

First, create a tiddler called MailTo, which contains:
[[send email to $1@$2|mailto:$1@$2]]
Then, to use it, enter:
<<tiddler MailTo with: "someone" "somewhere">>

HTH,
-e

Kashgarinn

unread,
Jun 25, 2007, 4:05:54 PM6/25/07
to TiddlyWiki
*Regarding Tiddler macro
- Sweet mammy-O-Jammy, that's excellent. Not sure what I could use
the tiddlerslicer thing for, but thanks for letting me know that this
is available and works.

Now all I'd want is to be able to expand/minimize the information from
the other tiddler, as the main reason I see that I'd just link into
another tiddler is that I could expand/minimise the information, but
at least now I can just create the images like I wanted in their own
tiddlers, and link to those tiddlers, so thanks for the tip!

- I'm basically interested in simplifying how I display images in my
TW.. and I'm right now using a single tiddler to "upload" the image to
a folder, with your information, perhaps I can finally add a simple
"add tiddler title" - "add tag" - and it'll automatically upload the
image to the folder, create a tiddler with the [img[image.jpg]] in it,
and name it the tiddler name and tag it properly.. that'd be very
sweet, because then I could just link it <<tiddler Tiddlertitle>>

*Regarding ColumnCalc plugin:
- Right now it needs a |0| field at the least to work, I'd love to see
being able to use || or if the column you're counting is at the end of
the table, that you could skip the last "|" (as in you only need to
make the rows you need to make.. and not fill the end of maybe tens of
rows with "0|" - You understanding what I mean?

Let's use your example:

| foo | 3.2 |
| bar | 1.1 |
| baz | 2.9 |
| gronk | 4.3 |
| snork | 5.5 |
| count| <<columncalc count 1 -1>> |
| total| <<columncalc sum 1 -2>> |
| avg | <<columncalc average 1 -3>> |

I'd like if this would work for all columns:

| foo ||
| bar || 1.1 |
| baz ||
| gronk | 4.3 |
| snork | 5.5 |
| count| <<columncalc count 1 -1>> |
| total| <<columncalc sum 1 -2>> |
| avg | <<columncalc average 1 -3>> |

and this:

| foo | 3.2 |
| bar |
| baz | 2.9 |
| gronk |
| snork | 5.5 |
| count| <<columncalc count 1 -1>> |
| total| <<columncalc sum 1 -2>> |
| avg | <<columncalc average 1 -3>> |

- when the column you're counting is the last column in the table.

*Regarding Tasktimerplugin
- I just wanted to verify, there isn't a possibility to add a second
description box into the "short description" box? I'm finding myself
always forgetting adding the "|tag" which I thought I'd be using,
would be a nice thing to have.

Just wanted to give you some feedback :)

K.

Eric Shulman

unread,
Jun 25, 2007, 4:27:55 PM6/25/07
to TiddlyWiki
> Now all I'd want is to be able to expand/minimize the information from
> the other tiddler, as the main reason I see that I'd just link into
> another tiddler is that I could expand/minimise the information, but

ummm.. that would be another TW core built-in macro:
<<slider chkCookieName TiddlerName label title>>
where:
chkCookieName
is used to remember the open/closed state of the slider panel
TiddlerName
is the tiddler content to display in the slider panel
label
is the text that is displayed as the slider "button" link
title
is the tooltip (or "mouseover title") for the slider button

note: normally, when a slider is rendered, it uses the previous
display state (opened/closed), as stored in the chkCookieName browser
cookie. However, if you want the slider to always start closed, you
can leave the 'chk' off of the CookieName, and the slider will still
track its state *during* the current session, but will NOT actually
create a cookie. Each time you reload the document the slider will be
closed.

HTH,
-e

Eric Shulman

unread,
Jun 25, 2007, 5:02:07 PM6/25/07
to TiddlyWiki
> *Regarding Tasktimerplugin
> - I just wanted to verify, there isn't a possibility to add a second
> description box into the "short description" box? I'm finding myself
> always forgetting adding the "|tag" which I thought I'd be using,
> would be a nice thing to have.

The "short description" box is actually a browser-provided "modal
dialog" that is invoked via the prompt("message","defaultvalue")
javascript function. Unfortunately, the implementation of the prompt
box is browser-dependent, and does not have any options for changing
button text or adding extra input fields. The only things you can
specify are the message that appears above the single-line edit field,
and the default value for that input field.

One possible tweak that may help your specific problem would be to
change the prompt text so that it reminds you to enter the "|tag"
input. For example:

<<taskTimer today "|%0|%1|%2|%3|" "Enter description... and don't
forget the |tag">>

I've also updated the plugin so you can specify the default text for
the input field.

<<taskTimer today "|%0|%1|%2|%3|" "Enter description... and don't
forget the |tag" "description|tag">>

You can get the lastest update (v1.2.0) here:
http://www.TiddlyTools.com/#TaskTimerPlugin

HTH,
-e

Eric Shulman

unread,
Jun 25, 2007, 5:10:47 PM6/25/07
to TiddlyWiki
> - Right now it needs a |0| field at the least to work, I'd love to see
> being able to use || or if the column you're counting is at the end of
> the table, that you could skip the last "|" (as in you only need to
> make the rows you need to make.. and not fill the end of maybe tens of
> rows with "0|" - You understanding what I mean?

hmmm... ok... I think I see what's going on here....

the current code doesn't handle empty cells, resulting in "NaN"
values, and it also doesn't handle missing cells (at the end of a
row), resulting in a fatal error. I think I can fix both of these
cases... give me a few...


-e


Kashgarinn

unread,
Jun 25, 2007, 5:11:12 PM6/25/07
to TiddlyWiki
wooow.. I actually jumped for joy when I saw that :D

but I don't understand why I need to add the chkCookiename.. can't it
just be a part of the macro itself? bit silly for users to have to
remember that in my humble opinion.

Also, the columncalculator.. in a perfect world, I'd like that 0,25
would work as well as 0.25 if at all possible :D

K.

Eric Shulman

unread,
Jun 25, 2007, 5:20:17 PM6/25/07
to TiddlyWiki
> but I don't understand why I need to add the chkCookiename.. can't it
> just be a part of the macro itself? bit silly for users to have to
> remember that in my humble opinion.

The cookiename enables each slider instance to remember its state
separately:
<<slider chkFirstSlider ...>>
<<slider chkSecondSlider .. >>
<<slider chkThirdSlider... >>
etc.

(as an interesting experiment, try using the *same* cookie name in
several sliders. Then, they will all track the same state, so if any
one of them is opened/closed, then they are all opened/closed (next
time they are rendered)... a little odd, and perhaps not so useful...
but it does demonstrate how the slider cookies work...

-e

Kashgarinn

unread,
Jul 1, 2007, 7:39:34 AM7/1/07
to TiddlyWiki
Greetings Eric, o great inventor of tiddly tools :D

I just got an interesting idea popping into my head regarding the
tasktimer.

What if instead of just a line in a journal, a tiddler would be
designated to the task as well? So the "description" in the journal
table would be the title of the tiddler?

Could that tiddler also be opened when you click on the "start timer"
button? And if you've already filled in the title, when you click the
timer button again, the "description" would already be filled and no
popup would have to appear.

I think that would be excellent, would really open up the power of the
TW for tasks :D

K.

Reply all
Reply to author
Forward
0 new messages