tagging part of tiddler

216 views
Skip to first unread message

Wim

unread,
May 20, 2012, 5:40:36 AM5/20/12
to tiddl...@googlegroups.com
Hello,

I'm (successfully) working with Udo Borkowski's  PartTiddlePlugin.

Now, I want to know if it's possible to tag each part seperately.

If so, how do you do this AND  how can I select (in another tiddler) all the parts FROM DIFFERENT "main-tiddlers" with a specified tag?

Thanks in advance

Wim

whatever

unread,
May 21, 2012, 5:52:13 AM5/21/12
to TiddlyWiki
Hi!

Using Udo's forEachTiddler plugin, you can do this:

<<forEachTiddler where 'tidder.tags.contains("YourTag")' write
'"<<tiddler [["+tiddler.title+"/YourPartName]]>\>\n"'>>

w

Måns

unread,
May 21, 2012, 7:29:15 AM5/21/12
to TiddlyWiki
Hi Wim and whatever

> Using Udo's forEachTiddler plugin, you can do this:
>
> <<forEachTiddler where 'tidder.tags.contains("YourTag")' write
> '"<<tiddler [["+tiddler.title+"/YourPartName]]>\>\n"'>>

Using only macros provided by the core you can do this:

[[SomeTiddler]]
<<list filter [tag[YourTag]]
template:SomeTiddler##ShowSectionTemplate>>/%
!ShowSectionTemplate
<<view ##Section1 text>>
!end %/

Btw.. What are the advantages of using PartTiddlerPlugin compared to/
instead of standard sections?

Cheers Måns Mårtensson

Wim

unread,
May 21, 2012, 9:29:38 AM5/21/12
to tiddl...@googlegroups.com
Hi Måns,

thanks for your suggestion with forEachTiddler plugin; this could help me.

I use PartTiddlerPlugin instead of the standard sections because I want to add sections to a <part>; in the example below, nothing of the content of section1 is displayed when referring to tiddler##section1, because it "stops" at the next section !!heading1 :

!section1
!!heading1
     [[test1a|http://www.test.be]]
!!heading2
     [[test1b|http://www.test.be]]
!section2
     [[test2|http://www.test.be]]

Wim




Op maandag 21 mei 2012 13:29:15 UTC+2 schreef Måns het volgende:

whatever

unread,
May 21, 2012, 9:34:33 AM5/21/12
to TiddlyWiki
The advantages are you can use parts in the middle of a sentence, plus
a simple syntax. Also, you can easily hide a part without having to
wonder if you used the normal hiding syntax correctly. Incidentally,
if you hide a section the normal way (/%...%/), the various ToC
plugins still show a link to the hidden section, if I'm not mistaken.

w

Måns

unread,
May 21, 2012, 9:51:41 AM5/21/12
to TiddlyWiki
Hi Wim

> thanks for your suggestion with forEachTiddler plugin; this could help me.

Whatever suggested using foreachtiddlerplugin...
I suggested using the core <<list>> macro.

> I use PartTiddlerPlugin instead of the standard sections because I want to
> add sections to a <part>; in the example below, nothing of the content of
> section1 is displayed when referring to tiddler##section1, because it
> "stops" at the next section !!heading1 :
>
> !section1
> !!heading1
>      [[test1a|http://www.test.be]]
> !!heading2
>      [[test1b|http://www.test.be]]
> !section2
>      [[test2|http://www.test.be]]

Aah - That makes sense.

There is a work-around using HTML syntax:

!Section1
<html><h2>heading1</h2></html>
[[test1a|http://www.test.be]]
<html><h2>heading2</h2></html>
[[test1b|http://www.test.be]]
!Section2
[[test2|http://www.test.be]]
!End Section

It's not very pretty but it does avoid the conflict with the section
boundary.

http://groups.google.com/group/tiddlywiki/browse_thread/thread/429483e48fe3f929/f6b13b2abd812b0a

Cheers Måns Mårtensson

Wim

unread,
May 21, 2012, 10:15:19 AM5/21/12
to tiddl...@googlegroups.com
Hi Måns,

I'm trying the forEachTiddler suggestion and it works if I use this : 

forEachTiddler where 'tiddler.title.contains("ABC")' write  ...


BUT > only the content of "real" tiddlers with a title containing "ABC" are displayed, NOT the content of the <part>-tiddlers.
So a <part partnameABC> content </part>  is not displayed.

I tried to change the "where" with  ... 'part.title.contains("ABC")', but without result.

Can someone help me?

Thanks.



Op maandag 21 mei 2012 15:51:41 UTC+2 schreef Måns het volgende:

whatever

unread,
May 21, 2012, 10:36:50 AM5/21/12
to TiddlyWiki
Well, parts are a part of the real tiddlers. The write
'"<<tiddler [["+tiddler.title+"/YourPartName]]>\>\n"'>> uses this
normal transclusion:
<<tiddler [[YourTiddler/YourPartName]]>> which shows only the
YourPartName of YourTiddler.

In your case:
<<forEachTiddler where 'tidder.title.contains("ABC")' write
'"<<tiddler [["+tiddler.title+"/partnameABC]]>\>\n"'>>
would show all the partnameABC part in all tiddlers containing ABC in
the their title.

Unless I'm not understanding your use case, in which case, a sample of
your actual tiddler content would be helpful.

w
> >http://groups.google.com/group/tiddlywiki/browse_thread/thread/429483...
>
> > Cheers Måns Mårtensson
Message has been deleted

Wim

unread,
May 21, 2012, 11:14:04 AM5/21/12
to tiddl...@googlegroups.com
Hi "whatever",

thanks for your answer and I will try to explain what I want.  It's a long explanation...
I want a TW  (kind of knowledge base) that can be used in different departments (office); each of those departments can have documents and presentations (both stored locally - TW is also local).
Some of those documents can be used in one department, others in all the departments.

Suppose I have 2 tiddlers, one for all the documents, one for all the presentations.  Each tiddler is divided into parts, where the name contains alle the POSSIBLE departments for that document/presentation.

TIDDLER1
<part doc_depA_depB_depC> [[itemA1|file:///doc1.doc]] </part> <part doc_depA_depB> [[itemB1|file:///doc2.doc]] - [[itemB2|file:///doc3.doc]] </part>
<part doc_depA_depC> [[itemC1|file:///doc4.doc]] - [[itemC2|file:///doc4.doc]] </part>

TIDDLER2
<part pres_depA_depB_depC> [[itemA1|file:///pres1.ppt]] </part> <part pres_depA_depB> [[itemB1|file:///pres2.ppt]] - [[itemB2|file:///pres3.ppt]] </part>
<part pres_depA_depC> [[itemC1|file:///pres4.ppt]] - [[itemC2|file:///pres4.ppt]] </part>

Now...
I would like to "filter" (in a new tiddler) all the docs and/or presentations for one department
 like  (I know, this doesn't work,and that's my problem):
 forEachTiddler where  part.title.contains("depC") would give me  [[itemA1|file:///doc1.doc]] + [[itemC1|file:///doc4.doc]] - [[itemC2|file:///doc4.doc]] + [[itemA1|file:///pres1.ppt]] + [[itemC1|file:///pres4.ppt]] - [[itemC2|file:///pres4.ppt]] (that is all the doc and all the pres for depC!!)

or

forEachTiddler where part.title.contains("pres")&&part.title.contains("depB") would give me [[itemA1|file:///pres1.ppt]] + [[itemB1|file:///pres2.ppt]] - [[itemB2|file:///pres3.ppt]] (that is all the all the pres for depB!!)

I hope that's clear and... that someone has a solution...

Thanks a lot!!

Wim


Op maandag 21 mei 2012 16:36:50 UTC+2 schreef whatever het volgende:

Måns

unread,
May 21, 2012, 3:02:35 PM5/21/12
to TiddlyWiki
Hi Wim

> Suppose I have 2 tiddlers, one for all the documents, one for all the
> presentations.  Each tiddler is divided into parts, *where the name
> contains alle the POSSIBLE departments for that document/presentation*.
>
> *TIDDLER1*
> <part doc_depA_depB_depC> [[itemA1|file:///doc1.doc]] </part> <part
> doc_depA_depB> [[itemB1|file:///doc2.doc]] - [[itemB2|file:///doc3.doc]]
> </part>
> <part doc_depA_depC> [[itemC1|file:///doc4.doc]] -
> [[itemC2|file:///doc4.doc]] </part>
>
> *TIDDLER2*
> <part pres_depA_depB_depC> [[itemA1|file:///pres1.ppt]] </part> <part
> pres_depA_depB> [[itemB1|file:///pres2.ppt]] - [[itemB2|file:///pres3.ppt]]
> </part>
> <part pres_depA_depC> [[itemC1|file:///pres4.ppt]] -
> [[itemC2|file:///pres4.ppt]] </part>
>
> *Now...*
> I would like to "filter" (in a new tiddler) all the docs and/or
> presentations for one department
>  like  (I know, this doesn't work,and that's my problem):
>  forEachTiddler where  *part.title.contains("depC")* would give me  [[itemA1|file:///doc1.doc]]
> + [[itemC1|file:///doc4.doc]] - [[itemC2|file:///doc4.doc]] +
> [[itemA1|file:///pres1.ppt]] + [[itemC1|file:///pres4.ppt]] -
> [[itemC2|file:///pres4.ppt]] (that is all the doc and all the pres for
> depC!!)
>
> or
>
> forEachTiddler where part.title.contains("pres")&&part.title.contains("depB")
> would give me [[itemA1|file:///pres1.ppt]] + [[itemB1|file:///pres2.ppt]] -
> [[itemB2|file:///pres3.ppt]] (that is all the all the pres for depB!!)
>

I would create a spreadsheet and prepare it to output a csv-file:

title,tags,text,customfield1,customfield2,...
MyTiddler,tag1 [[tag 2]] tag3,"This is ""quoted"" content, with a
comma",value,value,...
MyTiddler2,tag1 [[tag 2]] tag3,"This is ""quoted"" content, with a
comma",value,value,..

Every "MyTiddler" would/should contain a link and/or an iframe for
docs and/or presentations.
Tags would reflect for which departments the content is relevant..

Save the spreadsheet to a csv-file.
Then use Eric's http://www.tiddlytools.com/#CreateTiddlersFromCSV to
create tiddlers - one tiddler for each content.

(I've used CreateTiddlersFromCSV to create more than 3000 tiddlers in
less than 3 seconds ... it's pretty effective, however you'll need to
prepare the csv-file with correct tags and text content)

Now it should be quite easy to create lists - one for each department,
using the core's list macro.

<<list filter [tag[departmentname]]>> where departmentname is
equivalent to a tagname...

It all boils down to the fact, that you need to tag content and you
can't tag part of a tiddler, however you can tag individual tiddlers
with all kinds of tag combinations - and create all kinds of lists
retrieving tiddler titles or content from tiddlers ....

Good luck...

Cheers Måns Mårtensson

Eric Shulman

unread,
May 21, 2012, 6:32:45 PM5/21/12
to TiddlyWiki
> I would create a spreadsheet and prepare it to output a csv-file:
>
> title,tags,text,customfield1,customfield2,...
> MyTiddler,tag1 [[tag 2]] tag3,"This is ""quoted"" content, with a
> comma",value,value,...
> MyTiddler2,tag1 [[tag 2]] tag3,"This is ""quoted"" content, with a
> comma",value,value,..
>
> Save the spreadsheet to a csv-file.
> Then use Eric'shttp://www.tiddlytools.com/#CreateTiddlersFromCSVto
> create tiddlers - one tiddler for each content.

You can also import CSV file content to TiddlyWiki using
http://www.TiddlyTools.com/#ImportTiddlersPlugin
or http://www.TiddlyTools.com/#LoadTiddlersPlugin

You can write CSV file output from TiddlyWiki using
http://www.TiddlyTools.com/#ExportTiddlersPlugin
or http://www.TiddlyTools.com/#SaveAsPlugin

enjoy
-e

Cyrill

unread,
May 22, 2012, 9:01:48 AM5/22/12
to tiddl...@googlegroups.com
Hi whatever,

this initial problem to tag only sections or parts of a tiddler cause  interest to me.
I install the FET Plugin an make several tests of these lines of code and get all times a Referance Error.
Where is my fault ?
I understand this answer in that way that the tag refer only to the specially part of this tiddler. Is it also possible to show this tag only there / or beside the position of this part of tiddler.

Best regards

whatever

unread,
May 23, 2012, 9:50:45 AM5/23/12
to TiddlyWiki
Hi!

@Cyrill.
Did you also install the PartTiddlerPlugin (1)?
(1) http://tiddlywiki.abego-software.de/#PartTiddlerPlugin

Well, you can only tag tiddlers, not sections, slices or parts. Each
tiddler, on the other hand, can contain multiple sections, slices or
parts. The code calls up all tiddlers which are tagged with your tag
and which contain a part with a certain name. So if instead of parts
you'd be using sections, the only thing that you'd need to change in
the code is "/" with "##". For PartTiddlerPlugin syntax, see its
documentation.

Otherwise, can you post the content of your tiddlers?


@Wim
Well, that cleared it up.:D Anyway, I see your problem. You're using
part name as sort of tags. I think this problem can be solved using
regular expressions (provided you use a standardized naming
convention), but I'd have to look into it. I'll give it a shot when I
have the time, unless a regexp wizard has a ready solution.

w

whatever

unread,
May 26, 2012, 10:26:18 AM5/26/12
to TiddlyWiki
Hi, Wim!
I looked into your problem and came up with a solution. I wrote the
GetPartsPlugin (1), which enables you to set the tag of the tiddlers,
through which the plugin should search for parts, to specify one more
more comma-separated values and to sort the results.

So in your case, assuming your TIDDLER1 and TIDDLER2 are tagged
"files", you could write:
<<getparts filter:"files" match:"pres,depA">>
The result would be a list of all the presentations for depA.
If the files are unsorted, you can sort them like this:
<<getparts sort:"a" filter:"files" match:"pres,depA">>

<<getparts filter:"files" match:"pres,depA,depB">>
This would give a list of presentations for depA and depB

Note that the plugin uses AND for the match values, so all values must
be present for the entry to be displayed.

(1) http://getparts.tiddlyspot.com/

w

Wim

unread,
May 27, 2012, 1:53:21 AM5/27/12
to tiddl...@googlegroups.com
Hi Whatever,

wooooow!!  What an elegant solution. THANKS A LOT !!!

Just one suggestion for the explanation on tiddlyspot: mention the used syntax in the examples, like : 

Empty sort value, 1 match value :  <<getparts sort:"" filter:"area" match:"doc">>
Area A Book 3 - excluded
Area B Book 1 - excluded
Area B Book 2  ....


Once again, thanks for helping; I think a lot of people can/will use this plugin!

Wim

Op zaterdag 26 mei 2012 16:26:18 UTC+2 schreef whatever het volgende:

whatever

unread,
May 27, 2012, 6:50:43 AM5/27/12
to TiddlyWiki
Glad you like.:D I updated the examples, as you suggested.

w

On 27 maj, 07:53, Wim <w...@zeggetwaalf.be> wrote:
> Hi Whatever,
>
> wooooow!!  What an elegant solution. THANKS A LOT !!!
>
> Just one suggestion for the explanation on tiddlyspot: mention the used
> syntax in the examples, like :
>
> *Empty sort value, 1 match value* :  <<getparts sort:"" filter:"area"
> match:"doc">>
> Area A Book 3 - excluded
> Area B Book 1 - excluded
> Area B Book 2  ....
>
> Once again, thanks for helping; I think a lot of people can/will use this
> plugin!
>
> Wim
>
> Op zaterdag 26 mei 2012 16:26:18 UTC+2 schreef whatever het volgende:
>
>
>
>
>
> > Hi, Wim!
> > I looked into your problem and came up with a solution. I wrote the
> > GetPartsPlugin (1), which enables you to set the tag of the tiddlers,
> > through which the plugin should search for parts, to specify one more
> > more comma-separated values and to sort the results.
>
> > So in your case, assuming your TIDDLER1 and TIDDLER2 are tagged
> > "files", you could write:
> > <<getparts filter:"files" match:"pres,depA">>
> > The result would be a list of all the presentations for depA.
> > If the files are unsorted, you can sort them like this:
> > <<getparts sort:"a" filter:"files" match:"pres,depA">>
>
> > <<getparts filter:"files" match:"pres,depA,depB">>
> > This would give a list of presentations for depA and depB
>
> > Note that the plugin uses AND for the match values, so all values must
> > be present for the entry to be displayed.
>
> > (1)http://getparts.tiddlyspot.com/

Cyrill

unread,
May 29, 2012, 6:33:59 AM5/29/12
to tiddl...@googlegroups.com
TX whatever, yes this Plugin was installed and worked, I will send a link to the file.

I confirm that until now it will not be possible to join Tags only to section or parts of tiddler...
I make some experience with the Linkify und Hashtag-Plugins without succes.

Regards

whatever

unread,
Jun 9, 2012, 7:12:44 AM6/9/12
to TiddlyWiki
Hi!

I've pimped up the GetPartsPlugin (1).

Here's the basic rundown:
You can now specify more than one tag for filter
You can now specify what text the part must contain
You can now use both OR and AND booleans for filter, match and text
parameters
You can now use exclusion by adding an exclamation mark (!) in front
of a parameter value
Updated examples

(1) http://getparts.tiddlyspot.com/

w

On May 27, 7:53 am, Wim <w...@zeggetwaalf.be> wrote:
> Hi Whatever,
>
> wooooow!!  What an elegant solution. THANKS A LOT !!!
>
> Just one suggestion for the explanation on tiddlyspot: mention the used
> syntax in the examples, like :
>
> *Empty sort value, 1 match value* :  <<getparts sort:"" filter:"area"
> match:"doc">>
> Area A Book 3 - excluded
> Area B Book 1 - excluded
> Area B Book 2  ....
>
> Once again, thanks for helping; I think a lot of people can/will use this
> plugin!
>
> Wim
>
> Op zaterdag 26 mei 2012 16:26:18 UTC+2 schreef whatever het volgende:
>
>
>
>
>
> > Hi, Wim!
> > I looked into your problem and came up with a solution. I wrote the
> > GetPartsPlugin (1), which enables you to set the tag of the tiddlers,
> > through which the plugin should search for parts, to specify one more
> > more comma-separated values and to sort the results.
>
> > So in your case, assuming your TIDDLER1 and TIDDLER2 are tagged
> > "files", you could write:
> > <<getparts filter:"files" match:"pres,depA">>
> > The result would be a list of all the presentations for depA.
> > If the files are unsorted, you can sort them like this:
> > <<getparts sort:"a" filter:"files" match:"pres,depA">>
>
> > <<getparts filter:"files" match:"pres,depA,depB">>
> > This would give a list of presentations for depA and depB
>
> > Note that the plugin uses AND for the match values, so all values must
> > be present for the entry to be displayed.
>
> > (1)http://getparts.tiddlyspot.com/

TonyM

unread,
Jun 14, 2012, 2:36:36 AM6/14/12
to tiddl...@googlegroups.com
I use the parts tiddler to combine tiddlers into one, such as to use multiple ForEachTiddler loops in a single tiddler. That great.

I just want to suggest however the basic piece or grain of info is the tiddler. I would consider having your different departments in different tiddlers and bring them together using tags and other tiddlywiki tools because you are forcing yourself against the smallest piece of tiddlywiki the tiddler.

You could have a cookie or use the whowwhentagged in templates to control which department is visible. There are also name spaces and UserID's that could be used to do this.

Otherwise the solution you have here demonstrates the power and adaptability in tiddlywiki

TonyM
Reply all
Reply to author
Forward
0 new messages