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: Fri, 31 May 2013 23:21:33 -0700
I think I've got some of it figured out now. But not yet tested.
TO SET:
xattr -w com.mybookstring.mainsection WHEELS myfile; xattr -w com.mybookstring.subsection Housetrucks myfile
TO GET:
xattr -p com.mybookstring.subsection
-> (returning) Housetrucks
Does that seem on track?
Rick Gordon
------------------
On 5/31/13 at 10:50 PM -0700, Rick Gordon wrote in a message entitled
"Using xattr to Add Arbitrary Metadata to a File":
>I was wondering about some way to add arbitrary metadata to a set of InDesign docs, for the purpose of classifying them into a section structure that is larger than individual file chapters but essentially main- and sub-sections of the book structure.
>
>I've tagged the documents with key:value labels for the two section levels, but accessing them that way requires that the documents be opened in InDesign, which seems ass-backwards if I just wanted to open documents with a particular subsection value.
>
>So I was thinking of some sort of arbitrary metadata scheme that didn't require that. Googling around, it looks like extended attributes managed by the xattr shell command might do the trick and be much faster.
>
>So far I haven't come across a clear explanation of how to configure the command, or whether there might be other caveats.
>
>But assuming that I would set up a repeat loop with System Events, how would I configure an xattr command to add two bits of metadata, "MainSection" and "Subsection" with an associated value.
>
>And how could I retrieve them? Or is this no better than opening each do in InDesign without showing window to get the labels?
>
>Thanks for any advice.
--
___________________________________________________
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