automatically generated smart folder out of openmeta

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

I'm really getting into OpenMeta right know and I do know the provisos, but I would like to imitate the "Tags-Folder" Feature from Punakea with Hazel. I wonder if Hazel can monitor the spotlight database for the "Tags" attributes, read them and create smart folders based on that input?

Regards

Tristan
La_Tristesse
 
Posts: 18
Joined: Sun Mar 21, 2010 4:42 pm

I'm not familiar with this feature but I'm guessing you'll need to write a script for this. This logic seems a bit specialized. Also, not sure what you mean by monitoring the spotlight db for tags attribute.
Mr_Noodle
Site Admin
 
Posts: 11259
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Punakea creates aliases for every file which is tagged with a openmeta attribute, this gives you the option to access your tagged files through a classical folder structure which is dynamically updated to the tags. I wonder if it is possible to do something like this with smart folders and hazel. Therefore hazel would have to monitor some file which keeps track of the openmeta tags. I discovered that there is folder a in

Code: Select all
/Users/USERNAME/Library/Application\ Support/OpenMeta


which contains *.omback plist-files of the already tagged files. Now there must be some way for hazel to read that plist-file for the actual tag and create a smart folder for it in some directory.

Here's an example of a plist-file, which I tagged with "openmeta":

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>bu_alias</key>
   <data>
   AAAAAAGOAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADL2bDlSCsAAAAFHWMR
   UHVuYWtlYV8xLjEuNi5kbWcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
   AAAAAAAAAAAAAAAAABvAUsnVz0wAAAAAAAAAAP////8AAAkgAAAAAAAAAAAAAAAAAAAA
   CURvd25sb2FkcwAAEAAIAADL2ZTFAAAAEQAIAADJ1bMsAAAAAQAMAAUdYwAFHQEAALmT
   AAIAOk1hY2ludG9zaCBIRDpVc2VyczoAdHJpc3Rhbms6AERvd25sb2FkczoAUHVuYWtl
   YV8xLjEuNi5kbWcADgAkABEAUAB1AG4AYQBrAGUAYQBfADEALgAxAC4ANgAuAGQAbQBn
   AA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIAKlVzZXJzL3RyaXN0YW5rL0Rv
   d25sb2Fkcy9QdW5ha2VhXzEuMS42LmRtZwATAAEvAAAVAAIAD///AAA=
   </data>
   <key>bu_date</key>
   <date>2012-06-07T17:20:00Z</date>
   <key>bu_path</key>
   <string>/Users/tristank/Downloads/Punakea_1.1.6.dmg</string>
   <key>omDict</key>
   <dict>
      <key>com.apple.metadata:kMDItemDownloadedDate</key>
      <array>
         <date>2012-06-07T17:10:01Z</date>
      </array>
      <key>com.apple.metadata:kMDItemOMUserTagTime</key>
      <date>2012-06-07T17:20:00Z</date>
      <key>com.apple.metadata:kMDItemOMUserTags</key>
      <array>
         <string>openmeta</string>
      </array>
      <key>com.apple.metadata:kMDItemWhereFroms</key>
      <array>
         <string>http://download.nudgenudge.eu/Punakea_1.1.6.dmg</string>
         <string>http://www.macupdate.com/app/mac/23401/punakea</string>
      </array>
      <key>org.openmetainfo.time:kMDItemOMUserTagTime</key>
      <date>2012-06-07T17:20:00Z</date>
      <key>org.openmetainfo.time:kMDItemOMUserTags</key>
      <date>2012-06-07T17:20:00Z</date>
      <key>org.openmetainfo:kMDItemOMUserTagTime</key>
      <date>2012-06-07T17:20:00Z</date>
      <key>org.openmetainfo:kMDItemOMUserTags</key>
      <array>
         <string>openmeta</string>
      </array>
      <key>org.openmetainfo:kOMUserTags</key>
      <array>
         <string>openmeta</string>
      </array>
   </dict>
</dict>
</plist>


Any suggestions?
La_Tristesse
 
Posts: 18
Joined: Sun Mar 21, 2010 4:42 pm

It's probably not a good idea to poke at the internal OM files like that. If you insist on going this route then you'd need to parse it yourself and do all the logic. I think this may be going outside of Hazel's scope. You might want to ask this on the OpenMeta forums as they would have more info on the file format.
Mr_Noodle
Site Admin
 
Posts: 11259
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support