Ok, I think I understand what you want. You have some tiddlers that are categories of skills (OS, programming). You have other tiddlers that are tagged with the categories and that ARE the possible skills. You want a macro where you can pass a list of skills and get back a listing by category of those same skills. BUT you only want to see the categories that those skills use (not the unused categories).
I've attached a JSON with the sample data I used and a tiddler
(skillsfilter2). Inside the tiddler, I call
<<showSkillParent "windows-7 linux-admin" >>
and get back:
os
- windows-7
- linux-admin
Only "os" shows up, because only "os" is used by the items I passed.
If I invoke:
<<showSkillParent "windows-7 sql" >>
Then the output is :
- os
- windows-7
- programming-lang
- sql
Here both "os" and "programming-lang" show up because both are required.
The compromise is that you can't use any skills names with spaces in them.
But it didn't seem like you were using spaces anyways.
HTH,
Mark
On Thursday, November 10, 2016 at 12:26:15 PM UTC-8, leeand00 wrote:
>
> Well in actuality there are alot more tiddlers both categories and skills.
>
> dasJobItemSkillTagsNot is the contents of jobitemsskilltagsnot.
>
> My objective is to input a set of skills that I've used to filter a list
> of experience, and then use the same list of skills to generate a list of
> skills and which categories they are in.
>
> On Thursday, 10 November 2016 15:09:35 UTC-5, Mark S. wrote:
>>
>> I'm confused about your objectives. You mention only four tiddlers. So,
>> what are the contents of "jobitemskilltagsnot" ?
>>
>> On Thursday, November 10, 2016 at 11:26:57 AM UTC-8, leeand00 wrote:
>>>
>>> Alright, let me try this again..
>>>
>>> So to be clear:
>>>
>>> - The "os" and "programming-lang" tiddlers are tagged with the
>>> "skill-cat" tag.
>>> - The "windows-7" and "sql" tiddlers are tagged with the "skill" tag.
>>> - The "windows-7" tiddler is tagged with the "os" tag.
>>> - The "sql" tiddler is tagged with the "programming-lang" tag.
>>>
>>> So then in the meantime...I came up with something here that works
>>> correctly, but it's too complicated:
>>>
>>> \define showSkillParent()
>>>
>>> <ul>
>>> <!-- BEGIN: Get a list of skill-categories. -->
>>> <$list filter=
>>> "$(dasJobItemSkillsTags)$+[tags[]tag[skill-cat]]+[tagging[]]+[tags[]tag[skill-cat]]"
>>> >
>>> <li><$view field="title"/>
>>> <$set name="dasTitle" value={{!!title}}>
>>> <<showParentChildren>>
>>> </$set>
>>> </li>
>>> </$list>
>>> <!-- END: Get a list of skill-categories. -->
>>> </ul>
>>> \end
>>>
>>> \define showParentChildren()
>>> <ul>
>>>
>>> <$list
>>> filter="[title[$(dasTitle)$]]+[tagging[]]-$(dasJobItemSkillTagsNot)$">
>>> <li><$view field="title"/></li>
>>> </$list>
>>>
>>>
>>> </ul>
>>> \end
>>>
>>>
>>> <$vars dasJobItemSkillsTags={{!!jobitemsskilltags}}
>>> dasJobItemSkillTagsNot={{!!jobitemskilltagsnot}}>
>>> <<showSkillParent>>
>>> </$vars>
>>>
>>> The only problem with it is, that I have to generate two sets of fields
>>> with generally the same skill values in them....
>>>
>>> The first one (dasJobItemSkillsTags) is used to determine which parent
>>> skill-categories are involved...via:
>>>
>>> \define showSkillParent()
>>>
>>> <ul>
>>> <!-- BEGIN: Get a list of skill-categories. -->
>>> <$list filter=
>>> "$(dasJobItemSkillsTags)$+[tags[]tag[skill-cat]]+[tagging[]]+[tags[]tag[skill-cat]]"
>>> >
>>> <li><$view field="title"/>
>>> <$set name="dasTitle" value={{!!title}}>
>>> <<showParentChildren>>
>>> </$set>
>>> </li>
>>> </$list>
>>> <!-- END: Get a list of skill-categories. -->
>>> </ul>
>>> \end
>>>
>>>
>>>
>>> The second one (dasJobItemSkillTagsNot) removes any of the non-matched
>>> skills from the list...via:
>>>
>>> \define showParentChildren()
>>> <ul>
>>>
>>> <$list filter=
>>> "[title[$(dasTitle)$]]+[tagging[]]-$(dasJobItemSkillTagsNot)$">
>>> <li><$view field="title"/></li>
>>> </$list>
>>>
>>>
>>> </ul>
>>> \end
>>>
>>>
>>> but on the whole they're a list of the same skills..so it would be nice
>>> to be able to generate them inputing just one list somehow...for example:
>>>
>>> dasJobItemSkillTagsNot: [!title[windows-7]!title[sql]]
>>> dasJobItemSkillsTags: [title[sql]][title[windows-7]]
>>>
>>> by inputting something like "windows-7, sql"
>>>
>>> Does that make more sense? I hope so.
>>>
>>> On Thursday, 10 November 2016 13:46:00 UTC-5, Mark S. wrote:
>>>>
>>>> I don't understand what's supposed to be going on in your filters. They
>>>> seem to be complicated and I couldn't get them to work without your data.
>>>> Since I don't have access to your sample data tiddlers, I guessed at what
>>>> was needed. Here is my simplified version, which I generated with 2
>>>> tiddlers, sql & windows-7:
>>>>
>>>> \define showSkillParent()
>>>> $(dasSkillsCompanyIsLookingFor)$
>>>> <hr/>
>>>> $(dasJobItemSkillsTags)$<br/>
>>>>
>>>>
>>>> <ul>
>>>> <!-- BEGIN: Get a list of skill-categories. -->
>>>> <$list filter="$(dasJobItemSkillsTags)$">
>>>> <li><$view field="title"/>
>>>> <ul>
>>>> <$list filter="[tag<currentTiddler>]">
>>>> <li>
>>>> <$view field="title"/>
>>>> </li>
>>>> </$list>
>>>> </ul>
>>>> </li>
>>>> </$list>
>>>> <!-- END: Get a list of skill-categories. -->
>>>> </ul>
>>>> \end
>>>>
>>>>
>>>> The main functional change was in the second list, where I used "
>>>> [tag<currentTiddler>]" to just bring in items tagged according to the
>>>> first (outer) list.
>>>>
>>>> HTH
>>>> Mark
>>>>
>>>> On Thursday, November 10, 2016 at 10:04:46 AM UTC-8, leeand00 wrote:
>>>>>
>>>>> Using the macro below I get the following text when I set the field
>>>>> "jobitemsskilltags"
>>>>> to "[title[sql]][title[windows-7]]"
>>>>>
>>>>>
>>>>> - programming-lang
>>>>> - sql
>>>>> - windows-7
>>>>> - os
>>>>> - sql
>>>>> - windows-7
>>>>>
>>>>> It works pretty good..but I'd like only the titles of skills tagged
>>>>> with os to show up under os...and only the skills tagged with
>>>>> programming-lang to show up under programming-lang for instance:
>>>>>
>>>>>
>>>>> - programming-lang
>>>>> - sql
>>>>> - os
>>>>> - windows-7
>>>>>
>>>>>
>>>>>
>>>>> \define showSkillParent()
>>>>> $(dasSkillsCompanyIsLookingFor)$
>>>>> <hr/>
>>>>> $(dasJobItemSkillsTags)$<br/>
>>>>> [title[sql]][title[windows-7]]
>>>>>
>>>>> <ul>
>>>>> <!-- BEGIN: Get a list of skill-categories. -->
>>>>> <$list filter=
>>>>> "$(dasJobItemSkillsTags)$+[tags[]tag[skill-cat]]+[tagging[]]+[tags[]tag[skill-cat]]"
>>>>> >
>>>>> <li><$view field="title"/>
>>>>> <ul>
>>>>> <$list filter=
>>>>> "$(dasJobItemSkillsTags)$+[tags[]tag[skill-cat]]+[tagging[]]+[tags[]tag[skill-cat]]+$(dasJobItemSkillsTags)$"
>>>>> >
>>>>> <li>
>>>>> <$view field="title"/>
>>>>> </li>
>>>>> </$list>
>>>>> </ul>
>>>>> </li>
>>>>> </$list>
>>>>> <!-- END: Get a list of skill-categories. -->
>>>>> </ul>
>>>>> \end
>>>>>
>>>>>
>>>>>
>>>>> <$vars dasJobItemSkillsTags={{!!jobitemsskilltags}}
>>>>> dasSkillsCompanyIsLookingFor={{!!skillscompanyislookingforfilter}}>
>>>>> <<showSkillParent>>
>>>>> </$vars>
>>>>>
>>>>>
>>>>>
>>>>> I think this has something to do with the nested $list's filter which
>>>>> reads:
>>>>> "
>>>>> $(dasJobItemSkillsTags)$+[tags[]tag[skill-cat]]+[tagging[]]+[tags[]tag[skill-cat]]+$(dasJobItemSkillsTags)$
>>>>> "
>>>>>
>>>>> but I'm not sure how to filter it down to JUST the skills that are in
>>>>> that category.
>>>>>
>>>>> P.S. And yes, I am aware of the TOC macro thank you.
>>>>>
>>>>> Thank you,
>>>>> Andrew J. Leer
>>>>>
>>>>
--
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 post to this group, send email to [email protected].
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/1e8c3245-02b6-43cc-ab4f-291150e27eb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
SkillManager.json
Description: application/json

