On Sunday, October 18, 2020 at 1:44:28 AM UTC-7, Anthony wrote:
> Unfortunately, my 'On This Day' calendar seems to have stopped working.
> Using my TW with a version of TiddlyTools/Time/Calendar from 12th October
> 2020 at 4:39am works fine but having updated to yesterday's version (17th
> October 2020 at 1:22pm) none of my events now show on the calendar. This is
> probably my fault as the tidders tagged with the event tag are not of type
> 'text/plain' so that I can get the 'date;detail' information from tiddler
> fields using, for example, the following where the information is taken
> from a tiddler for a particular person in the project:
>
> ....<$view tiddler="Frances Hamilton Arnold (1956-)" field="birth-date"
> format="date" template="0MM0DD" />;Frances Hamilton Arnold (1956-)
>
> My reasoning for doing this is so that I only need to input details once
> in one place, using fields and then it's available elsewhere in the
> project. Maybe this is a bad approach but seemed logical to me. If I create
> a tidder tagged with the event tag making it 'text/plain' then it seems to
> work fine. I can send you the file to your gmail account if that helps?
>
Up until now *(see below!) *an EventList tiddler (tagged with "events") had
to contain ONLY lines of plain text, each with a format of:
"YYYYMMDD;Description" (or "....MMDD;Description" for "perpetual" annual
events). This was because the tiddler text content was just read into the
Calendar code as-is, so it couldn't use wiki syntax to generate output
that, when *rendered*, appears to produce the desired text format.
However... with just TWO lines of code, the Calendar now allows EventList
tiddlers to generate their content, using any syntax that results in
"YYYYMMDD;Description" output, which is then processed as before!
For the technically-minded, I changed this line in getevents_listed() from
this:
<$list filter="[{!!text}splitregexp[\n]trim[]!match[]]" variable="line">
to this:
<$wikify name="eventdata" text={{!!text}} mode="inline">
<$list filter="[<eventdata>splitregexp[\n]trim[]!match[]]" variable="line">
With this new Calendar code in place, you can now create an EventList
tiddler (tagged with "events"), containing wiki syntax like this:
<$list filter="[has[birth-date]]">
<$view field="birth-date" format="date" template="YYYY0MM0DD" />;<
<currentTiddler>><br>
</$list>
To use this new ability, just import the latest update of
TiddlyTools/Time/Calendar from http://TiddlyTools.com/timer.html
Let me know how it goes...
enjoy,
-e
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/286fc1d3-2017-4d20-9f34-741b243d902ao%40googlegroups.com.