Skip to content

Instantly share code, notes, and snippets.

@scottstanfield
Forked from code2k/convertOM2OSXTags.sh
Created May 2, 2016 03:51
Show Gist options
  • Save scottstanfield/683fcf4a16ed39ff4e0711be05e5d77a to your computer and use it in GitHub Desktop.
Save scottstanfield/683fcf4a16ed39ff4e0711be05e5d77a to your computer and use it in GitHub Desktop.

Revisions

  1. scottstanfield revised this gist May 2, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion convertOM2OSXTags.sh
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    #
    # Copyright © 2013 CODE2K:LABS. All Rights Reserved.

    mdfind "kMDItemOMUserTags == *" | while IFS= read -r file; do
    mdfind "kMDItemOMUserTags == *" -onlyin "." | 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"
  2. @code2k code2k created this gist Oct 23, 2013.
    13 changes: 13 additions & 0 deletions convertOM2OSXTags.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/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