Attribute Browser is your friend here, especially as there (a) might not be much harm in tolerating duplicates for a day or two, and (b) it’s pretty easy to scan an attribute browser list for duplicates.
But, let’s say you want to detect duplicates. Let’s do it with some agents. First, we gather all the profiles.
name: /all profiles
query: $Prototype="profile"
sort: $URL
For the sake of argument, we’ll assume that two profiles are duplicates if they have the same $URL. Now, we’ve sorted the aliases inside the agent all profiles by URL. Let’s make a second agent that detects duplicates:
name: /duplicates
query: inside(/all profiles) & $URL==$URL(previousSibling)
This finds notes inside the existing agent in which the URL is the same as the preceding URL; since that agent is sorted by URL, those are duplicates.
Finally, if we want to know right away when an agent finds a duplicate, we could use some sort of dashboard relay:
name: duplicate alert
prototype: dashboard
rule: if($ChildCount(/duplicates)>0) {$Subtitle=$ChildCount(/duplicates);$Color=red;} else {$Subtitle="";$Color=;}
This turns the dashboard note red, and repeats the number of duplicates in the subtitle. If you really wanted to be notified, you could get your Tinderbox document to complain
speak(“There are duplicates! Oh dear!”)
or make a sound
play(“Morse”)
or send you a Tweet
twitter(“example”,"@example! You’ve got duplicates!")