scheuer.

I am building extensive public documentation, based on others work as 
well,  on the details of many things including the """ see here 
<https://anthonymuscio.github.io/#Standard%20Nomenclature>

Tones 

On Friday, 27 November 2020 at 20:29:14 UTC+11 [email protected] wrote:

> Thank you so much for this detailed example!
>
> I have two questions:
> 1) What do the three """ mean? Could you also just use one " or do the 
> three have a special function?
> 2) I never really understood what the syntax <__pfx__> does. I get the 
> $name$ and $(name)$ - but the other macro notations don´t come easily to me.
>
> Mark S. schrieb am Donnerstag, 26. November 2020 um 19:53:22 UTC+1:
>
>> Something like the code below can do what you seem to want. But it's kind 
>> of complicated and
>> messy, requiring helper macros and the wikify widget. It's much easier if 
>> construct your tiddlers 
>> according to basic database design principles.
>>
>> The first principle of database design is that you don't store multiple 
>> pieces of information in a 
>> single field. Unfortunately TW gets you off to a bad start, with the 
>> title field already performing at
>> least 3 different functions.
>>
>> If you put year, month, week, and day all into their own fields, then it 
>> becomes much easier 
>> and understandable to create report tiddlers. It could probably be done 
>> in one or two list
>> widgets in 5.1.23prerelease using the new sortsub operator.
>>
>> Ok, here's the code using your existing setup:
>>
>> \define listdays(pfx)
>> <$list filter="""[prefix<__pfx__>]""" variable="thing1">
>> <$list filter="""[<thing1>split[-]nth[5]]"""/>
>> </$list>
>> \end
>>
>> \define listweek2(pfx daynum)
>> <td>
>> <$list filter="""[prefix[$pfx$$daynum$]]""" >
>>
>> </$list>
>> </td>
>> \end
>>
>> \define listweek(pfx)
>> <tr><td>$pfx$</td>
>> <$wikify text="""<<listdays '$pfx$'>>""" name=daylist>
>> <$list filter="""[enlist<daylist>sort[]]""" variable=daynum>
>> <$macrocall $name=listweek2 pfx=<<__pfx__>> daynum=<<daynum>> />
>> </$list>
>> </$wikify>
>> </tr>
>> \end
>>
>> <<listweek """$:/weekplan-2020-11-48-""">>
>>
>>
>> On Thursday, November 26, 2020 at 6:17:53 AM UTC-8 [email protected] 
>> wrote:
>>
>>>
>>> Hello everyone,
>>>
>>> I just can´t wrap my head around this one, now have been trying 
>>> different things for a couple of hours :(
>>>
>>> I have several tiddlers with the name scheme:
>>> *$:/weekplan-2020-11-48-23-Monday-1*
>>>
>>> * $:/weekplan-2020-11-48-23-Monday-2*
>>>
>>> * $:/weekplan-2020-11-48-23-Monday-3 *
>>>
>>> * $:/weekplan-2020-11-48-24-Wednesday-1 *
>>>
>>> * $:/weekplan-2020-11-48-24-Wednesday-2 *
>>>
>>> * $:/weekplan-2020-11-48-25-Thursday-1 *
>>> * $:/weekplan-2020-11-48-23-Thursday-2*
>>> *...*
>>>
>>> The numbers are: Year, Month, Week number, day of month, day of week, 
>>> number counting
>>>
>>> I now want to show in a table all the tiddlers with year 2020, month 11, 
>>> week 48 and the ones with the same day should be in one table row in 
>>> different columns.
>>>
>>> I manage to filter all the tiddlers with the matching year, month and 
>>> week by the *prefix/removeprefix* filter operator. Now I don´t get it 
>>> how to group these tiddlers with the same day by removing the suffix number 
>>> counting resulting in something like this:
>>>
>>>
>>> *23-Monday-1 23-Monday-2 23-Monday-3 *
>>>
>>> * 24-Wednesday-1 24-Wednesday-2 *
>>> * 25-Thursday-1 23-Thursday-2*
>>>
>>> Can I use the subfilter operator for that? Or is there a filter operator 
>>> I am missing?
>>>
>>> Thank you!
>>> Christoph
>>>
>>>

-- 
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/c41afe78-a74a-4e50-8b5a-364ee4feaedan%40googlegroups.com.

Reply via email to