Re: [ANN] Yojimbo Tag Cleanup

2008-04-01 Thread Steven Huey
I debugged this a bit with Doug's help and it appears his Spotlight  
index was out of sync with Yojimbo.


Yojimbo Tag Cleanup basically does the following:

1. Using AppleScript asks Yojimbo for a list of all tags

2. For each tag it calls the mdfind command as:

mdfind -count keyword:TAG kind:yojimbo item

3. List all the tags whose count was 0 as returned from the mdfind  
command


Doug provided an example where he had a note tagged as backup, and  
yet the mdfind command was returning a count of 0 for that note. He re- 
added the tag and the mdfind command then returned a non-zero count,  
as expected.


Other than iterating through each database item using AppleScript and  
searching manually through it's list of tags to find abandoned tags,  
does anyone have any other AppleScript suggestions for how to find  
unused tags? Or any ideas why his Spotlight index wasn't up to date  
with Yojimbo's tags?


Thanks,
Steve


From: Douglas Stetner [EMAIL PROTECTED]
Date: March 30, 2008 6:42:09 AM EDT
Subject: Re: [ANN] Yojimbo Tag Cleanup

Steven,

I have posted you an example of it incorrectly showing a used tag as  
deletable.


On 28/03/2008, at 07:35, Steven Huey wrote:
I just posted a simple app that displays a list of your Yojimbo  
tags that aren't assigned to any of your Yojimbo database items,  
and then lets you delete those tags. It's kind of a hack, and is a  
mix of Cocoa, AppleScript, and some calls to mdfind using NSTask,  
but it works well for me and saves a lot of time compared to how I  
used to do it by hand.

--
Steven Huey Software - http://www.stevenhuey.com






Re: [ANN] Yojimbo Tag Cleanup

2008-04-01 Thread Steve Kalkwarf
Other than iterating through each database item using 
AppleScript and searching manually through it's list of tags to 
find abandoned tags, does anyone have any other AppleScript 
suggestions for how to find unused tags? Or any ideas why his 
Spotlight index wasn't up to date with Yojimbo's tags?


tell application Yojimbo
set everyTag to every tag
set emptyTags to {}
repeat with aTag in everyTag
if (count of (every database item whose tags contains 
aTag)) is 0 then

set emptyTags to emptyTags  {contents of aTag}
end if
end repeat
end tell


--
--
This message is sent to you because you are subscribed to
 the mailing list yojimbo-talk@barebones.com.
To unsubscribe, send mail to: [EMAIL PROTECTED]
List archives:  http://www.listsearch.com/yojimbotalk.lasso
Have a feature request, or not sure if the software's working 
correctly? Please send mail to: [EMAIL PROTECTED]


Re: [ANN] Yojimbo Tag Cleanup

2008-04-01 Thread Steven Huey

Steve,

That works perfectly - thanks! I'll update the app to use that instead  
of mdfind. I'll send out another announcement when I've got it running.


- Steve

On Apr 1, 2008, at 10:12 AM, Steve Kalkwarf wrote:
Other than iterating through each database item using AppleScript  
and searching manually through it's list of tags to find abandoned  
tags, does anyone have any other AppleScript suggestions for how to  
find unused tags? Or any ideas why his Spotlight index wasn't up to  
date with Yojimbo's tags?


tell application Yojimbo
   set everyTag to every tag
   set emptyTags to {}
   repeat with aTag in everyTag
   if (count of (every database item whose tags contains aTag))  
is 0 then

   set emptyTags to emptyTags  {contents of aTag}
   end if
   end repeat
end tell


--
--
This message is sent to you because you are subscribed to
the mailing list yojimbo-talk@barebones.com.
To unsubscribe, send mail to: [EMAIL PROTECTED]
List archives:  http://www.listsearch.com/yojimbotalk.lasso
Have a feature request, or not sure if the software's working  
correctly? Please send mail to: [EMAIL PROTECTED]


--
Steven Huey Software - http://www.stevenhuey.com





--
--
This message is sent to you because you are subscribed to
 the mailing list yojimbo-talk@barebones.com.
To unsubscribe, send mail to: [EMAIL PROTECTED]
List archives:  http://www.listsearch.com/yojimbotalk.lasso
Have a feature request, or not sure if the software's working 
correctly? Please send mail to: [EMAIL PROTECTED]


[ANN] Yojimbo Tag Cleanup 1.1

2008-04-01 Thread Steven Huey
I just released Yojimbo Tag Cleanup 1.1 that uses the AppleScript  
Steve Kalkwarf provided for finding abandoned tags instead of the  
mdfind command. If you downloaded 1.0, I really recommend downloading  
the new version since it's much more reliable.


Thanks again to Doug Stetner and Steve Kalkwarf for all their help.

Weblog Entry: http://stevenhuey.com/projects/yojimbo-tag-cleanup-11
Download Page: http://stevenhuey.com/yojimbo-tag-cleanup

- Steve

--
Steven Huey Software - http://www.stevenhuey.com





--
--
This message is sent to you because you are subscribed to
 the mailing list yojimbo-talk@barebones.com.
To unsubscribe, send mail to: [EMAIL PROTECTED]
List archives:  http://www.listsearch.com/yojimbotalk.lasso
Have a feature request, or not sure if the software's working 
correctly? Please send mail to: [EMAIL PROTECTED]