Simple/best approach for a diary?

Hello Tiddlywiki community members,

I have a new idea for a Tiddlywiki application and it is some kind of journal/diary to keep track of how much liquid I am drinking throughout the day. I don’t need detailed instructions of how to create such a thing, I rather like to discuss some ways which it could be realized.

My first thought was to create a Tiddler every time I drink something. There should be a also central tiddler which lists all these single “drink-Tiddlers” ordered by creation date, grouped by day date. In this central tiddler there should be also a button (e.g. labeled “drink”) which creates a new “drink-tiddler”.
The “drink-Tiddler” contains a field for the mug with a description of the mug and a numeric value. This numeric value resolves to a list of mugs where the numeric value is linked to the capacity of the mug.

Is it better to create a tiddler for each mug (with fields for name and capacity) or have some data tiddlers which holds the name in one list and the capacity in another list?

Which is the easiest way to link the mug-data (especially the capacity) to the central tiddler and calculate a sum of all mugs from a day?

Which title should be given for each “drink-Tiddler” to have an unique name to avoid naming conflicts? In another application I used the Unix time stamp for the title.

Your “drink-Tiddler” could use a rangeWidget to set the size of the drink and store it in the Size field of the tiddler.

Drink Size:  {{!!Size}}ml

<$range field="Size" min="1" max="1000" default="1" increment="1"/>
1 Like

I have done something similar, that saves the amount drunk in a field of todays Journal tiddler. However since I drink out of some insulated bottles with a known capacity 750mls or 1 litre (1,000mls), Instead I created buttons in the sidebar that on click, add that volume to the field in the journal (I did create a negative if I needed to reverse it)

  • So basically I maintain a running total, no need to review or sum separately.
  • I also set a target that could help me by showing if I had reached my target or how much to go.
  • If I wanted to do this for coffees, since I have a standard coffee I would just count them.
  • You could create week number, or month name tiddlers, to add this number or count to to get a longer term figure, although it can be calculated from the field in the journal tiddler for any range of days, including averages etc…

Use a different field for each drink type, if desired a different button for each and the alternative volumes.

You can simultaneously add the details of every click to a named and timestamped data tiddler for a comprehensive record.

1 Like

There has been a discussion at the GoogleGroups which also can be found here [tw5] Re: Daily Task Macro - buttons no longer change color in 5.2.0-prerelease

It talks about an old wiki / macro which needs a workaround after upgrading the wiki. Full info at: [tw5] Re: Daily Task Macro - buttons no longer change color in 5.2.0-prerelease - #16 by pmario

The old wiki can be found at: http://dailytasksk.tiddlyspot.com/
It can be upgraded with the TW upgrader: https://tiddlywiki.com/upgrade

As far as I can remember it’s needed, when you use the macro. You should be good, if you use the following wrapper code for both macros
<<dailytask>> and <<togglers>>

In the mean time you should use the $let-widget instead of the $vars-widget.

<$let x={{!!toggled}} y={{!!barray}}>
<!-- your macro call comes here -->

</$let>

Screenshot taken with upgraded wiki v5.3.3 – It may still be interesting, but should be rewritten

2 Likes

Good idea for a flexible approach.
I was thinking of several drink mugs with a fixed capacity for each one. Maybe I should use the rangewidget as another type for allowing more flexible input.

Very nice idea @TW_Tones - using several buttons seems to be the simplest solution. I will go for that to have a quick solution along with a separate tiddler for every day.

Basically I use a bottle of 600ml at work, but at home I use several glasses with different capacities.

1 Like

That looks like a very interesting idea.
I bookmark this for a future, better version.
What I especially like are the graphical buttons for the drinks, very nice done.