Eric Shulman

Thank you! It worked!

I had tried "...tag<year>tag<month>tag<Journal>..." but didn't know about 
the [...] versus <...> syntax.

Is there any way to make lines 3 and 5 (the year headings and month 
headings) collapsible/expandable? (Click on the year and every thing under 
it appears, click again and it disappears.) 

On Saturday, September 19, 2020 at 8:09:42 AM UTC+8 TW Tones wrote:

> Sapphireslinger
>
> I see you have being on a journey to get here. I for one am trying to 
> persuade the modification of the Journal buttons to those attached, try 
> them and delete them if you don't like them.
>
> The New Journal and New Journal Here are altered to also set a 
> journal-date field with the tiddlywiki date stamp. Ten you can rely on this 
> regardless of the title name, last modified, even if the created date was 
> manipulated to provide a full data and time, from which it is easy to 
> extract any value as needed.
>
> Sorting is then done on the Journal-date field. even with just sort[] or 
> !sort[]
>
> So no need to "*My journal entries are also tagged with year and month"*
>
> Just saying
> Tones
>
>
> On Friday, 18 September 2020 at 23:39:50 UTC+10 Sapphireslinger wrote:
>
>> How do I tweak this for journal entries? My journal entries are also 
>> tagged with year and month and "Journal", so I tried to turn this into a 
>> table of contents for my journal entries like so:
>>
>> <$list filter="[range[2000,2021]]" variable="year">
>>    <$list filter="[tag<year>limit[1]]">
>>       <<year>><br>
>>
>>       <$list 
>> filter="[range[1,12]addprefix[$:/language/Date/Long/Month/]get[text]]" 
>> variable="month">
>>          <$list filter="[tag<year>tag<month>limit[1]]">
>>             &emsp;<<month>><br>
>>
>>             <$list filter="[tag<year>tag<month>has[tag="Journal"]sort[
>> title]]">
>>                &emsp;&emsp;<$link /> <br>
>>
>>             </$list>
>>          </$list>
>>       </$list>
>>    </$list>
>> </$list>
>>
>> But the results were clearly broken. 
>> On Thursday, August 27, 2020 at 7:56:11 PM UTC+8 Sapphireslinger wrote:
>>
>>> Eureka! It works! Thank you!!
>>>
>>> I will try to learn how to use those nested widgets for other purposes 
>>> as well, not just Reading History. 
>>>
>>> On Thursday, August 27, 2020 at 7:05:28 PM UTC+8 Eric Shulman wrote:
>>>
>>>> On Thursday, August 27, 2020 at 2:48:05 AM UTC-7, Sapphireslinger wrote:
>>>>>
>>>>> When I finish reading a book, what is the most elegant way to mark it 
>>>>> as read?
>>>>
>>>>
>>>> There are LOTS of ways to do this.  For this reply, let's just use the 
>>>> method you described...
>>>>  
>>>>
>>>>>
>>>>> *list ... all tiddlers possessing the field "finished-reading-date" 
>>>>> ... and sort them by that field ... sort under year headings (and) month 
>>>>> headings?*
>>>>
>>>> *They are already tagged with the year I finished reading them (i.e 
>>>>> 2020) and the month (i.e August).*
>>>>
>>>>
>>>> Here's a set of nested <$list> widgets to show the "Reading History":
>>>> <$list filter="[range[2018,2021]]" variable="year">
>>>>    <$list filter="[tag<year>limit[1]]">
>>>>       <<year>><br>
>>>>       <$list 
>>>> filter="[range[1,12]addprefix[$:/language/Date/Long/Month/]get[text]]" 
>>>> variable="month">
>>>>          <$list filter="[tag<year>tag<month>limit[1]]">
>>>>             &emsp;<<month>><br>
>>>>             <$list filter="[tag<year>tag<month>
>>>> has[finished-reading-date]sort[finished-reading-date]]">
>>>>                &emsp;&emsp;<$link /> (<$view 
>>>> field="finished-reading-date"/>)<br>
>>>>             </$list>
>>>>          </$list>
>>>>       </$list>
>>>>    </$list>
>>>> </$list>
>>>>
>>>> Notes:
>>>> * Line 1: $list iterates over a set of years using range[start,end] 
>>>> (adjust start and end values to fit your data)
>>>> * Line 2: $list checks to see if at least 1 tiddler is tagged with that 
>>>> year
>>>> * Line 3: displays the year
>>>> * Line 4: $list iterates over a set of month names using range[1,12], 
>>>> getting the month names from the TWCore shadows
>>>> * Line 5: $list checks to see if at least 1 tiddler is tagged with that 
>>>> year and month
>>>> * Line 6: displays the month, indented by &emsp; (an "em" space 
>>>> character)
>>>> * Line 7: $list finds all tiddlers with the year and month tags that 
>>>> also have a "finished-reading-date" field, and sorts by that field
>>>> * Line 8: displays a link to the matching tiddler and the value of the 
>>>> "finished-reading-date" field, indented by two $emsp;
>>>> * Lines 9-13: close the $list widgets
>>>>
>>>> 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/bca0a750-dbc8-427d-86fc-20e8465a22dbn%40googlegroups.com.

Reply via email to