Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Set StarRating from CLI ' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Set StarRating from CLI
Authored by: patpro on Mar 16, '11 04:49:57AM
Awesome. I'm using Bridge (CS3) to manage my picture collection. I rate picts to sort them, but this rating is not recorded is the Spotlight Metadata. Thanks to you, I've been able to create a small script to export the rating from the Adobe XMP file to picture's Spotlight metadata:
for XML in $(find . -name IMG_*xmp); do 
rating=$(awk '/xap:Rating/ {gsub(/ *<[^>]*>/,"",$0); print $0}' $XML)
[ -f ${XML/xmp/CR2} ] && xattr -w "" $rating ${XML/xmp/CR2}

[ Reply to This | # ]