[tw] Re: How do I filter by date (of creation) for transclusion list?
The semi-new 'days' filter is helpful. You can try this on tiddlywiki.com: <> Shows the 8 most recently modified tiddlers (non-draft,non-system) from the last 30 days. -- Mark On Monday, December 4, 2017 at 9:00:28 AM UTC-8, Lost Admin wrote: > > Hi all, > > I started using TiddlyWiki as a tool to quickly make a small website. I > would like to make an announcements/news section. I figured using the > Journal tiddler technique would make a good way to generate a news list. It > sorts by date and I can easily use the table-of-contents macro to generate > a page listing all the news tiddlers. > > I would also like to have a subset of the most recent news show up on the > default tiddler (transcluding them). I can't figure out how to make a > filter to generate the list of tiddlers to transclude. Is there an easy way > to do this? I'm thinking something like: > > All journal tiddlers that were created in the last month. Possibly further > filtered by only displaying the most recent 3 in that list if there are > more than 3 entries in that list. > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@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/e7dc2918-7d2b-4010-95b4-74716db2b78c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How do I filter by date (of creation) for transclusion list?
Ok, I'll explain: The macro *doesn't *get called first. first the currentMonth and currentYear variables are defined. Then the filter [all[tiddlers]!has[draft.of]!sort[created]get[created]removeprefixremoveprefixlimit[3] does: 1: all tiddlers not currently open 2: !sort[created] ... sort by creation date but in reverse order - so the last created are on top of the list. Now the filter shows the creation dates of the tiddlers, not the names. The creation dates have the form: 201712053: removeprefix ... removes the prefix "2017" from the creation dates. if the prefix is not 2017 the tiddler doesn't pass the filter. removeprefix then removes the prefix "12" . Every tiddler that doesn't have "12" as prefix at that point doesn't pass. then limi[3] chooses the last three. 4. now you have the last three creation dates but without 201712 at the beginning. Just 5. <> now calls the macro that is defined on top (macros have to be defined on top of the tiddler). 6. the filter [all[tiddlers]field:created[$(currentYear)$$(currentMonth)$$(currentTiddler)$]] now filters all tiddlers with creation date $(currentYear)$$(currentMonth)$$(currentTiddler)$ ... currentYear=2017 currentMonth=12 currentTiddler=the filter result from the removeprefix-filter. that is just the creation date without year and month. This filter makes a puzzle. Am Dienstag, 5. Dezember 2017 20:36:15 UTC+1 schrieb Lost Admin: > > I understand some of what is going on there. You define a macro that > prints the titles of all tiddlers with a creation date that matches 3 > variables (currentYear, currentMonths, and currentTiddler). > > Then you define currentYear and currentMonth to be (as the name suggests) > the current year and current month. > > The last filter loses me bit. It starts out building a list of all non > draft (not being edited) tiddlers, all[tiddlers]!has[ > draft.of] > > Then, I think it sorts by the created field (so I get most recent at the > top of the list). The removeprefix loses me. > The limit[3], I understand. That says only give the first three results. > > I'm not sure how this works for notices that went up on say the 30th of > the previous month when it is the 1st. Those would be less than a month old > but aren't in the current month. > > > > > On Tuesday, December 5, 2017 at 12:17:02 PM UTC-5, BurningTreeC wrote: >> >> \define getTiddlerTitle() >> <$list >> filter="[all[tiddlers]field:created[$(currentYear)$$(currentMonth)$$(currentTiddler)$]]"> >> >> {{!!title}} >> >> >> \end >> >> <$vars currentMonth=<> currentYear=<>> >> >> <$list >> filter="[all[tiddlers]!has[draft.of]!sort[created]get[created]removeprefixremoveprefixlimit[3]]"> >> <> >> >> >> >> >> Am Montag, 4. Dezember 2017 18:00:28 UTC+1 schrieb Lost Admin: >>> >>> Hi all, >>> >>> I started using TiddlyWiki as a tool to quickly make a small website. I >>> would like to make an announcements/news section. I figured using the >>> Journal tiddler technique would make a good way to generate a news list. It >>> sorts by date and I can easily use the table-of-contents macro to generate >>> a page listing all the news tiddlers. >>> >>> I would also like to have a subset of the most recent news show up on >>> the default tiddler (transcluding them). I can't figure out how to make a >>> filter to generate the list of tiddlers to transclude. Is there an easy way >>> to do this? I'm thinking something like: >>> >>> All journal tiddlers that were created in the last month. Possibly >>> further filtered by only displaying the most recent 3 in that list if there >>> are more than 3 entries in that list. >>> >> -- 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+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@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/2d61603b-60b2-4aaf-9dae-ec237a8f5f73%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How do I filter by date (of creation) for transclusion list?
I understand some of what is going on there. You define a macro that prints the titles of all tiddlers with a creation date that matches 3 variables (currentYear, currentMonths, and currentTiddler). Then you define currentYear and currentMonth to be (as the name suggests) the current year and current month. The last filter loses me bit. It starts out building a list of all non draft (not being edited) tiddlers, all[tiddlers]!has[ draft.of] Then, I think it sorts by the created field (so I get most recent at the top of the list). The removeprefix loses me. The limit[3], I understand. That says only give the first three results. I'm not sure how this works for notices that went up on say the 30th of the previous month when it is the 1st. Those would be less than a month old but aren't in the current month. On Tuesday, December 5, 2017 at 12:17:02 PM UTC-5, BurningTreeC wrote: > > \define getTiddlerTitle() > <$list > filter="[all[tiddlers]field:created[$(currentYear)$$(currentMonth)$$(currentTiddler)$]]"> > > {{!!title}} > > > \end > > <$vars currentMonth=<> currentYear=<>> > > <$list > filter="[all[tiddlers]!has[draft.of]!sort[created]get[created]removeprefixremoveprefixlimit[3]]"> > <> > > > > > Am Montag, 4. Dezember 2017 18:00:28 UTC+1 schrieb Lost Admin: >> >> Hi all, >> >> I started using TiddlyWiki as a tool to quickly make a small website. I >> would like to make an announcements/news section. I figured using the >> Journal tiddler technique would make a good way to generate a news list. It >> sorts by date and I can easily use the table-of-contents macro to generate >> a page listing all the news tiddlers. >> >> I would also like to have a subset of the most recent news show up on the >> default tiddler (transcluding them). I can't figure out how to make a >> filter to generate the list of tiddlers to transclude. Is there an easy way >> to do this? I'm thinking something like: >> >> All journal tiddlers that were created in the last month. Possibly >> further filtered by only displaying the most recent 3 in that list if there >> are more than 3 entries in that list. >> > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@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/e2a81aac-8615-4fa3-9c79-59e807eefded%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How do I filter by date (of creation) for transclusion list?
\define getTiddlerTitle() <$list filter="[all[tiddlers]field:created[$(currentYear)$$(currentMonth)$$(currentTiddler)$]]"> {{!!title}} \end <$vars currentMonth=<> currentYear=<>> <$list filter="[all[tiddlers]!has[draft.of]!sort[created]get[created]removeprefixremoveprefixlimit[3]]"> <> Am Montag, 4. Dezember 2017 18:00:28 UTC+1 schrieb Lost Admin: > > Hi all, > > I started using TiddlyWiki as a tool to quickly make a small website. I > would like to make an announcements/news section. I figured using the > Journal tiddler technique would make a good way to generate a news list. It > sorts by date and I can easily use the table-of-contents macro to generate > a page listing all the news tiddlers. > > I would also like to have a subset of the most recent news show up on the > default tiddler (transcluding them). I can't figure out how to make a > filter to generate the list of tiddlers to transclude. Is there an easy way > to do this? I'm thinking something like: > > All journal tiddlers that were created in the last month. Possibly further > filtered by only displaying the most recent 3 in that list if there are > more than 3 entries in that list. > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@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/f5cccd2c-aa80-4203-a79b-b7d37b282c8b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How do I filter by date (of creation) for transclusion list?
Thanks. Not quite what I wanted, but still a good way to handle it. On Monday, December 4, 2017 at 6:08:19 PM UTC-5, TonyM wrote: > > Lost Admin, > > A quick answer thus not comprehensive, if you create a list that shows the > tiddlers you want in the order you want you can then use limit[3] the > filter operand to show the first three. > https://tiddlywiki.com/#limit%20Operator%20(Examples) > > <$list filter="[tag[ScratchPads]limit[2]]"> > {{!!title}} > <$transclude mode=block/> > > > The above also creates a title for each tiddler and transcludes it. > > Regards > Tony > > > On Tuesday, 5 December 2017 04:00:28 UTC+11, Lost Admin wrote: >> >> Hi all, >> >> I started using TiddlyWiki as a tool to quickly make a small website. I >> would like to make an announcements/news section. I figured using the >> Journal tiddler technique would make a good way to generate a news list. It >> sorts by date and I can easily use the table-of-contents macro to generate >> a page listing all the news tiddlers. >> >> I would also like to have a subset of the most recent news show up on the >> default tiddler (transcluding them). I can't figure out how to make a >> filter to generate the list of tiddlers to transclude. Is there an easy way >> to do this? I'm thinking something like: >> >> All journal tiddlers that were created in the last month. Possibly >> further filtered by only displaying the most recent 3 in that list if there >> are more than 3 entries in that list. >> > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@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/16728a0a-3c01-4d31-838d-69e8ce740566%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How do I filter by date (of creation) for transclusion list?
Lost Admin, A quick answer thus not comprehensive, if you create a list that shows the tiddlers you want in the order you want you can then use limit[3] the filter operand to show the first three. https://tiddlywiki.com/#limit%20Operator%20(Examples) <$list filter="[tag[ScratchPads]limit[2]]"> {{!!title}} <$transclude mode=block/> The above also creates a title for each tiddler and transcludes it. Regards Tony On Tuesday, 5 December 2017 04:00:28 UTC+11, Lost Admin wrote: > > Hi all, > > I started using TiddlyWiki as a tool to quickly make a small website. I > would like to make an announcements/news section. I figured using the > Journal tiddler technique would make a good way to generate a news list. It > sorts by date and I can easily use the table-of-contents macro to generate > a page listing all the news tiddlers. > > I would also like to have a subset of the most recent news show up on the > default tiddler (transcluding them). I can't figure out how to make a > filter to generate the list of tiddlers to transclude. Is there an easy way > to do this? I'm thinking something like: > > All journal tiddlers that were created in the last month. Possibly further > filtered by only displaying the most recent 3 in that list if there are > more than 3 entries in that list. > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@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/29416991-0b31-4418-ad03-c0446e9ced35%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.