Instantly share code, notes, and snippets.

Embed
What would you like to do?
This script converts OpenMeta to OS X Mavericks tags.
#!/bin/bash
#
# This script converts OpenMeta to OS X Mavericks tags.
#
# http://code2k.net
#
# Copyright © 2013 CODE2K:LABS. All Rights Reserved.
mdfind "kMDItemOMUserTags == *" | while IFS= read -r file; do
echo "$file"
plistTags=$(mdls -plist - -name kMDItemOMUserTags "$file"|grep -v "kMDItemOMUserTags\|dict")
xattr -w com.apple.metadata:_kMDItemUserTags "$plistTags" "$file"
done
@scottstanfield

This comment has been minimized.

Copy link

scottstanfield commented May 2, 2016

This works. Thanks!

@iandol

This comment has been minimized.

Copy link

iandol commented Jul 27, 2018

Still works on High Sierra, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment