Hey Tony,

Maybe I'm not understanding what you just said, but I thought that's 
basically what I did with the last macro iteration. Are you suggesting that 
I do something different than my last iteration? 

Damon

On Wednesday, July 1, 2020 at 4:51:26 PM UTC-7, TW Tones wrote:
>
> Damon,
>
> Do remember that the kin filter is ideal for subtracting one list (or 
> more) lists from another so if you list the children of a father and 
> subtract the children of other mothers the remaining will be the only the 
> children of the remaining mother. However with the kin filter you could 
> list the children of a mother where the father equals the person who's 
> children you wish to list you are after.
>
> Regards
> Tony
>
> On Thursday, July 2, 2020 at 3:04:53 AM UTC+10, Damon Pritchett wrote:
>>
>> After some more playing around, I discovered that there was still a bug. 
>> In one of my previous posts, I should some pictures of a couple of the 
>> outputs of my macro. If you look at Carl Anders Fehr, you will notice that 
>> he had two spouses and children by both. They macro worked great when he 
>> was the starting person, but if one of his spouses were the starting 
>> person, the macro would show all of Carl's children and not just the 
>> children of that particular spouse. After noodling it for a while and 
>> sleeping on it, I realized what the problem was. I needed to subtract the 
>> children that didn't belong. The following new macro fixes that problem:
>> \define each-other-level()
>> <$list filter="[all[current]]" variable="Parent">
>>   <ol>
>>     <$list filter=
>> "[title<currentTiddler>tagging[]sortan[birth]tags[]!title<currentTiddler>]"
>> >
>>       <li>
>>         with: <$link><$view field='caption'><$view field='title'/></$view
>> ></$link>
>>         <$list filter=
>> "[title<currentTiddler>tagging[]limit[1]has[parents-marriage]]">
>>           -> married: <$macrocall $name="date-str" date={{!!parents-
>> marriage}}/>
>>         </$list>
>>         <ol>
>>           <$list 
>> filter="[title<currentTiddler>kin:tags:to:1[]sortan[birth]!title<currentTiddler>]
>>                          -[!kin:tags:to<Parent>]">
>>             <li>
>>               <$link><$view field='caption'><$view field='title'/></$view
>> ></$link> -> born: <$macrocall $name="date-str" date={{!!birth}}/>
>>               <<each-other-level>>
>>             </li>
>>           </$list>
>>         </ol>
>>       </li>
>>     </$list>
>>   </ol>
>> </$list>
>> \end
>>
>>
>> \define descendants()
>>   ''Descendants of <$view field='caption'><$view field='title'/></$view>
>> ''
>>   <<each-other-level>>
>> \end
>>
>> Assuming I don't find any bugs in this one, then it's off to investigate 
>> using fields instead of tags as Tony has suggested
>>
>>
>>
>>
>>
>>
>> On Saturday, June 27, 2020 at 4:27:54 PM UTC-7, Damon Pritchett wrote:
>>>
>>> All,
>>>
>>> I've spent the last few days working on a new wiki for use with my 
>>> family history. I'm going to use it, not as a substitute for my genealogy 
>>> program, but as a supplement to keep track of documentation and such. In so 
>>> doing, I've managed to figure out a nice way of using tidgraph to generate 
>>> my pedigree chart and I've written a "children of" using nested list 
>>> widgets. I have tiddlers for each person with that person's parents as 
>>> tags. With tidgraph, I was able to get the desired behavior by using 
>>> mode="tags[]" instead of tagging which is the default. Tidgraph is a 
>>> wonderful plugin and it's too bad that it doesn't seem to be supported any 
>>> longer. I'm still learning Javascript, so am a long way from making any 
>>> changes to it myself.
>>>
>>> I've created a ViewTemplate that I've included here:
>>> \import [title<currentTiddler>]
>>>
>>> <$list filter="[all[current]search:description[People]]">
>>>
>>> <div class="tc-tiddler-body" style="border: none;">
>>>
>>>
>>> <$tidgraph start=<<currentTiddler>> mode="tags[]sort[sex]reverse[]" 
>>> maxdepth="2" nocollapse />
>>>
>>> <$list filter="[all[current]has:field[birth]] 
>>> [all[current]has:field[death]]">
>>> <table class="highlight1">
>>>   <caption style="text-align: left; font-weight: bold; caption-side: 
>>> top;">Birth / Death:</caption>
>>>   <tr>
>>>     <td>Birth</td>
>>>     <td><$macrocall $name="date-str" date={{!!birth}}/></td>
>>>     <td><<birthplace>></td>
>>>   </tr>
>>>   <tr>
>>>     <td>Death</td>
>>>     <td><$macrocall $name="date-str" date={{!!death}}/></td>
>>>     <td><<deathplace>></td>
>>>   </tr>
>>> </table>
>>> </$list>
>>>
>>> <$list filter="[all[current]]" variable="Parent">
>>>
>>> <$list 
>>> filter="[all[current]tagging[]search:description[People]limit[1]]" 
>>> variable=null>
>>>
>>> <div class="list-tree">
>>>   Children of <<currentTiddler>>:
>>>   <ol>
>>>     <$list 
>>> filter="[title<currentTiddler>tagging[]sortan[birth]tags[]!title<Parent>]">
>>>       <li>with: <$link><$view field='caption'><$view 
>>> field='title'/></$view></$link>
>>>         <$list 
>>> filter="[title<currentTiddler>tagging[]limit[1]has[parents-marriage]]">
>>>           -> married: <$macrocall $name="date-str" 
>>> date={{!!parents-marriage}}/>
>>>         </$list>
>>>         <ol>
>>>           <$list filter="[title<currentTiddler>tagging[]sortan[birth]]">
>>>             <li><$link><$view field='caption'><$view 
>>> field='title'/></$view></$link> -> born: <$macrocall $name="date-str" 
>>> date={{!!birth}}/></li>
>>>           </$list>
>>>         </ol>
>>>       </li>
>>>     </$list>
>>>   </ol>
>>> </div>
>>>
>>> </$list>
>>>
>>> </$list>
>>>
>>> <$list 
>>> filter="[all[current]backlinks[]!search:description[People]!is[missing]limit[1]]"
>>>  
>>> variable=null>
>>>
>>> <<table-dynamic 
>>> filter:"[title<currentTiddler>backlinks[]!search:description[People]]" 
>>> fields:"tbl-expand record-date description title" sortOp:sortan 
>>> stateTiddler:"recordsearch" class:"highlight1" editButton:no 
>>> caption:"''Mentioned or connected with the following records:''">>
>>>
>>> </$list>
>>>
>>>
>>> </div>
>>>
>>> </$list>
>>>
>>>
>>> The result is this:
>>>
>>>
>>>
>>> I'm suing the class "list-tree" which has been around for quite a while 
>>> and created by Mat. There's also a dynamic table called out from the Shiraz 
>>> plugin that I use to show any documents that the person is listed in.
>>>
>>> This all works just how I want it to work, but being that my skills at 
>>> Tiddlywiki are still forming, I'm wondering if there might be a more 
>>> efficient or effective way of doing the same thing. I am definitely open to 
>>> any better ways of doing things.
>>>
>>> I'm also thinking of expanding the "children of" code to a recursive 
>>> macro to get multiple generations, but I don't know exactly how to proceed 
>>> down that path. Any suggestions would be highly appreciated.
>>>
>>> Feel free to use this code if you think you'd find it useful. I only ask 
>>> that, if you make any improvements or additions, that you let me know so I 
>>> might incorporate those.
>>>
>>> Thanks,
>>>
>>> Damon
>>>
>>>
>>>
>>>
>>>
>>>

-- 
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/8fdbc2c4-dd8b-4936-81dc-9f9a9a636ff2o%40googlegroups.com.

Reply via email to