Jump to content

Get all OpenMeta tags on a machine?


Recommended Posts

Hey guys,

I'm at my absolute wit's end about this, and figured that maybe someone wiser and Alfred-connected would have some idea. I'm trying to come up with a scriptable way to reveal all the OpenMeta tags being used on a machine. I know that it must be possible, since Leap, Yep, and Tags all do it to varying extents, I just can't work out how. The only thing that's come to mind so far is getting the results of mdfind "kMDItemOMUserTags == *" and passing each one to xattr, but that just seems patently ridiculous and inefficient. So I'm hoping against hope that someone in here will have a better suggestion.

 

Thanks!

Link to comment

One way you can do is to read openmeta backups "~/Library/Application Support/OpenMeta/backups.noindex/".

 

And the brutal way is not that bad since you only need to do it once. After that, you only need to get the recent used tags. I recently ported the OpenMeta to (mac)ruby (https://github.com/zhaocai/openmeta.rb). it has a command `tag recent` to show recent tags.

 

Hey guys,

I'm at my absolute wit's end about this, and figured that maybe someone wiser and Alfred-connected would have some idea. I'm trying to come up with a scriptable way to reveal all the OpenMeta tags being used on a machine. I know that it must be possible, since Leap, Yep, and Tags all do it to varying extents, I just can't work out how. The only thing that's come to mind so far is getting the results of mdfind "kMDItemOMUserTags == *" and passing each one to xattr, but that just seems patently ridiculous and inefficient. So I'm hoping against hope that someone in here will have a better suggestion.

 

Thanks!

Link to comment

One way you can do is to read openmeta backups "~/Library/Application Support/OpenMeta/backups.noindex/".

 

And the brutal way is not that bad since you only need to do it once. After that, you only need to get the recent used tags. I recently ported the OpenMeta to (mac)ruby (https://github.com/zhaocai/openmeta.rb). it has a command `tag recent` to show recent tags.

 

Thanks for the suggestion! I wound up going through PyObjC, after discovering that Objective-C has an NSMetadataQuery object perfectly suited to my needs.

Link to comment
  • 5 years later...

@phyllisstein @zhaowu By chance, would you guys be willing to share your Alfred workflows for listing the tags used on a machine?

 

I've been searching for tools to help me use tags more efficiently, and one of the principal issues I keep running into is how to quickly show all of the tags that are being used on my machine (since they tend to grow complex, rather quickly). I wish there was an app that would easily display them, allowing for hierarchies, etc ... but I'd settle for a tool that just displayed them in an easily viewable way - like through the use of Alfred.

 

Thanks for your help!

Edited by Jasondm007
typo
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...