[tw] Re: Search duplicate caption-fields

2018-02-11 Thread HansWobbe

@Stef:  Elegantly simple.  It helped me clean up a bad practice.  Thanks 
for sharing. ~ Hans

On Saturday, February 10, 2018 at 4:50:06 PM UTC-5, ste...@gmail.com wrote:
>
>
> <$list filter="[each[caption]get[caption]]" variable="capt">
> <$list filter="[field:captionrest[1]limit[1]get[caption]]" 
> variable="capt2">
>
>
> !!! Caption "<>":
> 
> <$list filter="[field:caption]">
> <$link>{{!!title}}
> 
> 
> 
> 
>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/585adcb9-d99b-416d-ac16-a20baa9764c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Search duplicate caption-fields

2018-02-11 Thread magev958
Thanks I got it to work as expected :)
I haven't had time until yesterday today

@B 
urningTree
 
I tried your code to, but it made my browser to hang. I guess it was to 
complex :D

Thanks for your help
/Magnus

Den lördag 10 februari 2018 kl. 22:50:06 UTC+1 skrev ste...@gmail.com:
>
> Just noticed that my code above had a small bug - when one particular 
> caption appeared more than twice, the caption was listed multiple times. 
> I've fixed it here: 
>
> <$list filter="[each[caption]get[caption]]" variable="capt">
> <$list filter="[field:captionrest[1]limit[1]get[caption]]" 
> variable="capt2">
>
>
> !!! Caption "<>":
> 
> <$list filter="[field:caption]">
> <$link>{{!!title}}
> 
> 
> 
> 
>
> Cheers,
>
> Stef
>
> On Saturday, February 10, 2018 at 10:40:52 PM UTC+1, ste...@gmail.com 
> wrote:
>>
>>
>> I had success with the following code (seems to list all duplicates of 
>> two or more, no matter how many):
>>
>>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/4b64a6eb-27d3-454a-a4ff-0b6fc66e159f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Search duplicate caption-fields

2018-02-10 Thread stefct4
Just noticed that my code above had a small bug - when one particular 
caption appeared more than twice, the caption was listed multiple times. 
I've fixed it here: 

<$list filter="[each[caption]get[caption]]" variable="capt">
<$list filter="[field:captionrest[1]limit[1]get[caption]]" 
variable="capt2">


!!! Caption "<>":

<$list filter="[field:caption]">
<$link>{{!!title}}





Cheers,

Stef

On Saturday, February 10, 2018 at 10:40:52 PM UTC+1, ste...@gmail.com wrote:
>
>
> I had success with the following code (seems to list all duplicates of two 
> or more, no matter how many):
>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/3ef9ece9-e424-4aa6-b7fa-45bc9fc7d5b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Search duplicate caption-fields

2018-02-10 Thread stefct4
Hi Magnus,

On Thursday, February 8, 2018 at 6:17:28 PM UTC+1, magev958 wrote:
>
> Most of my tiddlers have a uuid-title and a caption-field. With the 
> collection of tiddler growing I have come across a couple of tiddler with 
> same caption. I would likt to find all duplicates but don't know how
>

I had success with the following code (seems to list all duplicates of two 
or more, no matter how many):

<$list filter="[each[caption]get[caption]]" variable="capt">
<$list filter="[field:captionrest[1]get[caption]]" variable="capt2">

!!! Caption "<>":

<$list filter="[field:caption]">
<$link>{{!!title}}



 

Cheers,

Stef

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/ccc431f8-b146-4c1f-9cc2-d8509b101e56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Search duplicate caption-fields

2018-02-09 Thread TonyM
Why not have a list of all captions wrapping a list of all Tiddlers that have 
the same caption. Most may have one tiddler with each caption but you can make 
it obviouse for captions who have more than one toddler.

Has[caption]

List all Tiddlers with each caption.

Tony

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/63a73f8e-b833-44e8-b7ba-015dbc2785d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Search duplicate caption-fields

2018-02-08 Thread 'Mark S.' via TiddlyWiki
Using only tools available in the core, this works:

<$list 
filter="[all[tiddlers]has[caption2]each[caption2]get[caption2]sort[caption2]]" 
variable="capt">
<$list filter="[field:caption2count[]prefix[2]suffix[2]] 
[field:caption2count[]prefix[3]suffix[3]]" >
Caption: <> used in
<$list filter="[field:caption2]">
<>





You will want to change "caption2" to "caption" (I needed a smaller data 
set for testing).
This checks for duplicates of 2 or 3. You can repeat the run for 4, 5 ... 
etc. However many duplicate captions you think you might have. The problem 
is that there are no number-manipulating functions in the core. Also, there 
is no equality filter in the core, so I'm using prefix/suffix which breaks 
down for higher numbers  with the same number on back and front (e.g. 22)

Good luck
-- Mark

On Thursday, February 8, 2018 at 9:17:28 AM UTC-8, magev958 wrote:
>
> Most of my tiddlers have a uuid-title and a caption-field. With the 
> collection of tiddler growing I have come across a couple of tiddler with 
> same caption. I would likt to find all duplicates but don't know how
> /Magnus
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/925bc803-aa48-45d5-912c-5a88a1154b38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Search duplicate caption-fields

2018-02-08 Thread BurningTreeC
hello Magnus,

this could do what you need:

\define compareCaptions()
<$list filter="[[$(firstTidCaption)$]regexp[^$(thisTidCaption)$$]]">

$(firstTiddler)$ and $(thisTiddler)$ have the same caption
<$button message="tm-edit-tiddler" param="""$(thisTiddler)$""">edit 
$(thisTiddler)$


\end
\define compareTiddlers()
<$list filter="[all[tiddlers]!is[current]has[caption]]">
<$set name="thisTiddler" value=<>>
<$list filter="[get[caption]]" variable="thisTidCaption">
<>



\end
<$list filter="[all[tiddlers]has[caption]]">
<$set name="firstTiddler" value=<>>
<$list filter="[get[caption]]" variable="firstTidCaption">
<>




Simon

Am Donnerstag, 8. Februar 2018 18:17:28 UTC+1 schrieb magev958:
>
> Most of my tiddlers have a uuid-title and a caption-field. With the 
> collection of tiddler growing I have come across a couple of tiddler with 
> same caption. I would likt to find all duplicates but don't know how
> /Magnus
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/8278dfb0-0296-4fd1-b600-bbd1e66acdcb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.