Discussion:
[tw5] List and transclude today's tiddlers
(too old to reply)
JWHoneycutt
2018-07-28 16:46:21 UTC
Permalink
I want to transclude all the tiddlers that start with today's date. I
suspect I am handling the variable incorrectly.


<$set name="today" value="<<now YYYY-0MM-0DD >>"/> <!-- I want to set the
variable "today" to the day's date in this specific format ie. 2018-07-28
--> <$list filter="[prefix[$(today)$]]"> <$view field="title"/><br>
{{<<currentTiddler>>}}<br> </$list> <!-- I want to show title, then
transclude contents, if the title starts with today's date -->


Can you help me debug this?


JWHoneycutt
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/6b182967-e01e-4076-a63c-a941bf1da6ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
FrD
2018-07-28 18:37:05 UTC
Permalink
Hi,

This seems to work, although there may be a simpler solution :

\define day()
<$macrocall $name="now" format="YYYY-0MM-0DD"/>
\end

\define filter()
[prefix[$(today)$]]
\end

<$wikify name="today" text=<<day>>>
<$list filter=<<filter>>>

<$view field="title"/><br>
{{<<currentTiddler>>}}<br>
</$list>
</$wikify>



Regards

FrD
Post by JWHoneycutt
I want to transclude all the tiddlers that start with today's date. I
suspect I am handling the variable incorrectly.
<$set name="today" value="<<now YYYY-0MM-0DD >>"/> <!-- I want to set the
variable "today" to the day's date in this specific format ie. 2018-07-28
--> <$list filter="[prefix[$(today)$]]"> <$view field="title"/><br>
{{<<currentTiddler>>}}<br> </$list> <!-- I want to show title, then
transclude contents, if the title starts with today's date -->
Can you help me debug this?
JWHoneycutt
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4ea2bbc1-618a-49a6-be6a-828903829e90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
FrD
2018-07-28 18:39:40 UTC
Permalink
Sorry,

\define day()
<$macrocall $name="now" format="YYYY-0MM-0DD"/>
\end

\define filter()
[prefix[$(today)$]]
\end

<$wikify name="today" text=<<day>>>
<$list filter=<<filter>>>

<$view field="title"/><br>
{{<<currentTiddler>>}}<br>
</$list>
</$wikify>



Regards

FrD
Post by FrD
Hi,
\define day()
<$macrocall $name="now" format="YYYY-0MM-0DD"/>
\end
\define filter()
[prefix[$(today)$]]
\end
<$wikify name="today" text=<<day>>>
<$list filter=<<filter>>>
<$view field="title"/><br>
{{<<currentTiddler>>}}<br>
</$list>
</$wikify>
Regards
FrD
Post by JWHoneycutt
I want to transclude all the tiddlers that start with today's date. I
suspect I am handling the variable incorrectly.
<$set name="today" value="<<now YYYY-0MM-0DD >>"/> <!-- I want to set the
variable "today" to the day's date in this specific format ie. 2018-07-28
--> <$list filter="[prefix[$(today)$]]"> <$view field="title"/><br>
{{<<currentTiddler>>}}<br> </$list> <!-- I want to show title, then
transclude contents, if the title starts with today's date -->
Can you help me debug this?
JWHoneycutt
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1233152d-2280-4b62-b24c-54f9405f7a4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
HansWobbe
2018-07-28 20:40:16 UTC
Permalink
FrD:

That's quite a neat reminder mechanism. Thanks for sharing.

Regards,
Hans
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/6a5f2a1d-e499-4ab2-88d1-e9085f628168%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Eric Shulman
2018-07-28 22:46:42 UTC
Permalink
Post by JWHoneycutt
I want to transclude all the tiddlers that start with today's date. I
suspect I am handling the variable incorrectly.
Can you help me debug this?
1) To use the result of the <<now>> macro as a parameter value, omit the
quotes surrounding value=...
2) The <$set> widget should NOT use the "closing slash" syntax. Instead,
you need to use the matching </$set> at the end of the code. The variable
is only defined within the scope of the <$set>...</$set>
3) You can only use the $(today)$ syntax within a macro definition, so
filter="[prefix[$(today)$]" won't work. However, there is a direct filter
syntax for referencing values in variables, so you can write
filter="[prefix<today>]"
4) You can't combine the {{...}} transclusion syntax with the <<variable>>
reference. Instead, to transclude the content from the currentTiddler, use
the <$transclude> widget. You can omit the tiddler=... parameter from that
widget, since it defaults to the currentTiddler. Thus:

<$set name="today" value=<<now YYYY-0MM-0DD>>>
<$list filter="[prefix<today>]">
<$view field="title"/><br>
<$transclude /><br>
</$list>
<$set>

enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)
InsideTiddlyWiki: The Missing Manuals
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d047aed1-d455-4c60-befc-565f862c2472%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-07-29 00:32:54 UTC
Permalink
And for the listing of dates you can also use the sameday filter operator against othe date fields.

Sameday[-7] will show dates with the sameday or 7 days earlier.

Tony
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/56f4eb23-683b-460e-9564-8cdd52e329ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Mark S.' via TiddlyWiki
2018-07-29 00:39:31 UTC
Permalink
I think you mean the "days" operator. Remember that the sameday operator is
buggy when using hand-made local dates.

-- Mark
Post by TonyM
And for the listing of dates you can also use the sameday filter operator
against othe date fields.
Sameday[-7] will show dates with the sameday or 7 days earlier.
Tony
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/53959b99-08ae-4d8e-acd2-559c69d5d11f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-07-29 00:51:56 UTC
Permalink
Mark,

Thanks for pointing out my error, I should post from my desktop, not the
mobile.

"[!days:weekly-review[-7]]"

Also Rather than manual dates I tend to timestamp them with the full format
<$action-setfield $field=$fieldname$ $value=<<now
[UTC]YYYY0MM0DD0hh0mm0ssXXX>>/>

or use Pikaday https://github.com/dbushell/Pikaday and use the field format
fieldFormat="[UTC]YYYY0MM0DD0hh0mm0ssxxx"/>

Regards
Tony
Post by 'Mark S.' via TiddlyWiki
I think you mean the "days" operator. Remember that the sameday operator
is buggy when using hand-made local dates.
-- Mark
Post by TonyM
And for the listing of dates you can also use the sameday filter operator
against othe date fields.
Sameday[-7] will show dates with the sameday or 7 days earlier.
Tony
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/6113b9d7-d47d-4d85-803a-b498985c93a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Mark S.' via TiddlyWiki
2018-07-29 03:42:09 UTC
Permalink
Post by TonyM
Also Rather than manual dates I tend to timestamp them with the full format
<$action-setfield $field=$fieldname$ $value=<<now
[UTC]YYYY0MM0DD0hh0mm0ssXXX>>/>
Yes, that's probably the best way to use them. But the documentation does
"invite" the user to roll their own dates like YYYYMMDD, so it ought to
work (or the documentation should be changed).

Thanks!
-- Mark
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5f940a32-7c5d-40fb-9629-a5d8a282194f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-07-29 07:59:27 UTC
Permalink
Agreed and it does work but is fragile as far as i can see, and utc timezone format importiant to me at +10

Tony
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/421d54c4-710d-40f6-8733-08ab457bbe93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
JWHoneycutt
2018-08-04 13:15:38 UTC
Permalink
@ Eric Shulman - your work is always so elegant, I wish your missing manual
(for TW5) had more information about syntax, strings, variables, etc.

@ TonyM - you accurately predicted where I was going next. My ideal state
is "Today's tiddlers" listed, with the last X day's listings collapsed
above, and {{Due soon}} below.

I am using Eric's code for today's titled tiddlers:

<$set name="today" value=<<now YYYY-0MM-0DD>>
<$list filter="[prefix<today>]">
'' <$view field="title"/><br>''
<$transclude /><br><br>
</$list>
<$set>


How do I incorporate the filter operator you proposed ?

"[!days:weekly-review[-7]]"



Here is my latest attempt (to simply provide yesterday's tiddlers):

<$set name="today" value=<<now YYYY-0MM-0DD>>
<$list filter="<today>[days:title[-1]]">
'' <$view field="title"/><br>''
<$transclude /><br><br>
</$list>
<$set>

{{Due}}


In the filter run, I don't know how to "mix and match" the variable <today>
with the filter operator:suffix [parameter] days:title[-1] since <today> is
now a defined string, not a date

Any debug ideas?

JWHoneycutt

(and a pre-emptive Thank you)
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/2005b473-00a2-4958-b585-d81a342abd59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...