Need tiddler to pop up if selected or tagged with the curren tdate

145 views
Skip to first unread message

mervin mecklenburg

unread,
Aug 29, 2018, 12:40:12 PM8/29/18
to TiddlyWiki
I wish for a selected group of tiddlers to pop up if they are selected for the present date.  I know that there are some very good-time management programs out there that do this sort of thing, but I was hoping for a simple solution that can be easily incorporated into tiddlywikis that I have up and running.  I believe that this could be done by using the reveal widget with an appropriate filter, and configuring the control panel to display the revealing widget on startup.  This would be adequate for my purposes.  Does anyone have a solution?

Mervin Mecklenburg

Thomas Elmiger

unread,
Aug 29, 2018, 3:19:08 PM8/29/18
to TiddlyWiki
Hi Mervin

My solution is one of the complicated ones you don’t want ;–)

Simplified somewhat it would become something resembling this:

\define ldsbra() [[
\define rdsbra() ]]

\define reminderCheck(reminder-field,tiddler)
<$vars tid="""$tiddler$""" rmf="""$reminder-field$""">
<$wikify name="checkfilter" text='<<ldsbra>><<tid>>]days:<<rmf>>[0<<rdsbra>>'>
<$list filter=<<checkfilter>>>
<<tid>>
</$list>
</$wikify>
</$vars>
\end


Loop through all tiddlers with your specific tag here and then call the check macro:

<$macrocall $name=reminderCheck reminder-field=datefield tiddler=<<currentTiddler>>/>

[End of loop]

I assume the date is in a field named „datefield“ in a format starting with 20180829. Still too complicated?

Good luck!
Thomas

TonyM

unread,
Aug 29, 2018, 8:19:03 PM8/29/18
to TiddlyWiki
Mervin,

Let me restate what you want 

You want to indicate a date on given tiddlers such that when that date is the same as today you know. I am not sure what you mean by popup, I presume you mean will be listed "in your face".

  • I suggest creating a date field "selected-date" on the tiddlers you want selected. We can come to how do you enter the date below.
  • Then I would create a list in a tiddler that is in the default tiddlers such as home, that lists all of those selected-date tiddlers with a date of today.
    However you could make a sidebar tab or menu etc...
  • Then to help make it even clearer I would make a tiddler tagged $:/tags/ViewTemplate that will display a message on any tiddler who's selected-date equals today
How do you select the selected-date?
  • You could just enter a date of the form YYYYMMDD (technically YYYY0MM0DD)
  • Since when you enter the date they are likely to be future dated I think it would be much easier to install the date picker plugin
<$edit-date 
field="selected-date"
format="YYYY-MM-DD"
fieldFormat="YYYY0MM0DD"
firstday="1"
/>
You could place this any tiddler you what to select the date, or also put it in a tiddler tagged $:/tags/ViewTemplate with a condition that determins when it is shown. PS Firstday makes Monday the first day of the week. This utility shows a nicely formatted calendar to select from or you can enter directly.

<$list filter="[is[current]tag[task]]" variable=null>
<$edit-date 
field="selected-date"
format="YYYY-MM-DD"
fieldFormat="YYYY0MM0DD"
firstday="1"
/>

</$list>
You set the filter to suit. It determines on which tiddlers you can enter a selected date. 

Perhaps in the the same tiddler above you can add this code to indicate if any tiddler with the selected-date field is today or not. tagged $:/tags/ViewTemplate 
<$list filter="[is[current]has[selected-date]]" variable=null>
selected-date: <$view field=selected-date format=date template="YYYY-0MM-0DD"/>
<$wikify name=date-now text="<
<now YYYY0MM0DD>>">
  <$list filter="[{!!selected-date}prefix<date-now>]" variable=null emptyMessage="Not today">
    TODAY
  </$list>
</$wikify>
</$list>

Then finally in your home tiddler that comes up when you load the wiki your could list all tiddlers with a selected-date of today
 
<h3>Items with a selected-date of today</h3>
<$list filter="[has[selected-date]]">
<$wikify name=date-now text="<
<now YYYY0MM0DD>>">
  <$list filter="[{!!selected-date}prefix
<date-now>]" variable=null>
    <$link to=<
<currentTiddler>> tooltip="Open Tiddler"><<currentTiddler>></$link><br>
  </$list>
</$wikify>
</$list>

---


Let me know if you want something different.

Tony

mervin mecklenburg

unread,
Aug 31, 2018, 2:13:32 AM8/31/18
to TiddlyWiki
Thomas and Tony, both of you

Thanks for your suggestions.  I need to study them, and then I will get back to you.  Near as I can tell, both approaches will work, but I won't be able to tell which is preferrable until I experiment with them.  Again, thanks for your responses.

Merv

mervin mecklenburg

unread,
Oct 2, 2018, 9:03:21 AM10/2/18
to tiddl...@googlegroups.com
Thank you Thomas and Tony. What I came up with combines some of the inherent powers contained in the Tiddywiki core with other aspects that my personal Tiddlywiki.  I found the following code:

<$set name="myVariable" value=<<now MM-DD-YYYY>> >

<$list filter="[tag<myVariable>suffix[Tickler]]">
<$transclude tiddler={{!!title}} mode="block" />
</$list>

</$set>

I place this code in a tiddler, which is then listed in the Control Pannel as one of the tiddlers that open upon the Tiddlywiki's startup.  That way the specified tiddlers called by the list are present in the morning when I start working, or during the day if I hit the home button to open the default tiddlers.

This is supported by attributes already present in Tiddlywiki.  My tiddlywiki contains a group of tiddlers that apper in the journal if they are tagged with a specific dates having the format contained in the Tiddlywiki journal,  These tiddlers have the suffix "Tickler," so they are easy to identify.  The filter contained above relies upon this feature.

Merv
Reply all
Reply to author
Forward
0 new messages