Re: Using xattr to Add Arbitrary Metadata to a File
Re: Using xattr to Add Arbitrary Metadata to a File
- Subject: Re: Using xattr to Add Arbitrary Metadata to a File
- From: Rick Gordon <email@hidden>
- Date: Sat, 01 Jun 2013 12:16:37 -0700
You're right, Shane. It appears to be the difference between a normal Save and a Save As. I just tried it on the same file in CS5.5, made a change and did a Save As, and the attributes disappeared.
------------------
On 6/1/13 at 6:13 PM +1000, Shane Stanley wrote in a message entitled
"Re: Using xattr to Add Arbitrary Metadata to a File":
>On 01/06/2013, at 5:10 PM, Rick Gordon <email@hidden> wrote:
>
>> I just tried it (CS5.5) and it seems to survive InDesign edits.
>
>You're in luck. FWIW, the reason I was suspicious is that I've coincidentally been fiddling with setxattr to set attributes of .applescript files, and modifying them in ASE/Xcode/SD results in each app overwriting with their own attributes. It may well be that your attributes are intact because InDesign doesn't write any.
>
>Then again, maybe you're not...
>
>I just found an ID file that has been emailed to me, so it had a com.apple.quarantine value:
>
>Shane-iMac:~ shane$ xattr -l /Users/shane/Desktop/LagerfieldBevMenu_APR13/LagerfieldBevMenu_APR13.indd
>com.apple.quarantine: 0043;51944a0f;Mail;DC4AEF4E-05B7-4B85-8796-75BFB994CCE7
>
>I added an attribute:
>
>Shane-iMac:~ shane$ xattr -w com.shelterpub-thom.mainsection WHEELS /Users/shane/Desktop/LagerfieldBevMenu_APR13/LagerfieldBevMenu_APR13.indd
>Shane-iMac:~ shane$ xattr -l /Users/shane/Desktop/LagerfieldBevMenu_APR13/LagerfieldBevMenu_APR13.indd
>com.apple.quarantine: 0043;51944a0f;Mail;DC4AEF4E-05B7-4B85-8796-75BFB994CCE7
>com.shelterpub-thom.mainsection: WHEELS
>
>I then opened the document in InDesign and did a save (which turned into a Save As because of ID version differences), and got the attributes again:
>
>Shane-iMac:~ shane$ xattr -l /Users/shane/Desktop/LagerfieldBevMenu_APR13/LagerfieldBevMenu_APR13.indd
>com.apple.FinderInfo:
>00000000 49 44 64 38 49 6E 44 6E 00 00 00 00 00 00 00 00 |IDd6InDn........|
>00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
>00000020
>
>So it looks like whatever removed the quarantine info also stomped on the other stuff.
--
___________________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________
WWW: http://www.shelterpub.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden