Re: Add metadata to my files for Spotlight
Re: Add metadata to my files for Spotlight
- Subject: Re: Add metadata to my files for Spotlight
- From: Lorenzo <email@hidden>
- Date: Tue, 10 May 2005 16:03:31 +0200
It would sound better. But please let me know, if you copy your file on a
Panther fileSystem, then copy back on a Tiger fileSystem, will you lose your
metadata?
As I know today many files have metadata embedded (AAC, MP3, pictures,...)
This ensures that other fileSystems can read your metadata.
And, how do you retrive your metadata later?
Do you create a metadata file within
~/Library/Caches/Metadata
any time you create a new file with your app? Is something like a parallel
folders/files tree? Or do you link data and metadata files through an ID?
:-0
Best Regards
--
Lorenzo
email: email@hidden
> From: Pierre Bernard <email@hidden>
> Date: Tue, 10 May 2005 15:33:23 +0200
> To: email@hidden
> Cc: email@hidden, email@hidden
> Subject: Re: Add metadata to my files for Spotlight
>
> Hi!
>
> I have meanwhile changed my mind. I am working on changing my
> application to store data files and meta data separately. Meta data
> will go into ~/Library/Caches/Metadata. The distinct advantages being
> that my files are not "polluted" by metadata and that the Spotlight
> importer does not need to read the full file.
>
> Pierre
>
> On May 10, 2005, at 1:09 PM, email@hidden wrote:
>
>> Hi!
>>
>> 1. I took exactly the same approach. My metadata comes from a
>> CoreData database managing many documents. I tuck metadata inside
>> the files which are in PLIST format. The importer merely extracts
>> the metadata dictionary from the file.
>>
>> 2. Use whatever you use to laod your file from within your
>> application.
>>
>> 3.To use Cocoa: rename the source code file from .c to .m, ste it's
>> type to obj-c in xCode, add the Cocoa framework to your project
>>
>> Pierre
>>
>> -----Original Message-----
>> From: cocoa-dev-bounces+pierre.bernard=email@hidden
>> [mailto:cocoa-dev-bounces+pierre.bernard=email@hidden]On
>> Behalf Of Lorenzo
>> Sent: Tuesday, May 10, 2005 12:27 PM
>> To: email@hidden
>> Subject: Add metadata to my files for Spotlight
>>
>>
>> Hi,
>> I am trying to add metadata to the files saved by my application
>> and I have
>> some question. Actually my file is an XML file I save from a
>> NSMutableDictionary, so I thought it should be easy to add the
>> metadata
>> therein as a dictionary that I can recall later from the metadata
>> importer
>> using the key @"metadata". Then I can search within this dictionary
>> for each
>> key like "kMDItemAuthors".
>>
>>
>> 1.__________
>> First of all I don't know whether the method I mentioned above is
>> the right
>> one. I have not seen any documentation about writing metadata but only
>> documentation on how to write an importer. Any link to the docs or
>> some
>> sample code would be appreciated.
>>
>>
>> 2.__________
>> Second, I have seen a sample code on how to write an importer,
>> which uses
>> this statement within the call GetMetadataForFile.
>>
>> tempDict = [[NSDictionary alloc]
>> initWithContentsOfFile:(NSString*)pathToFile];
>>
>> So I suppose that, if my file is large 1GB, the whole file should
>> be loaded
>> within the variable tempDict...
>> If so, the method I mentioned above is not the right one. Any
>> suggestion?
>>
>>
>> 3.__________
>> When I try to reproduce the sample at the point 2, using Cocoa
>> APIs, the
>> metadata importer template requires the Cocoa framework. I linked
>> that and I
>> added the line
>> #import <Cocoa/Cocoa.h>
>> But now it won't compile. It says "Undefined
>> symbols:_GetMetadataForFile".
>> Any idea?
>> Thank you.
>>
>>
>>
>> Best Regards
>> --
>> Lorenzo
>> email: email@hidden
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Cocoa-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>> 40bcl.lu
>>
>> This email sent to email@hidden
>>
>>
>>
>>
>> **********************************************************************
>> This email and any files transmitted with it are intended solely for
>> the use of the individual or entity to whom they are addressed.
>> If you have received this email in error please notify the sender
>> of this message. (email@hidden)
>> This email message has been checked for the presence of computer
>> viruses; however this protection does not ensure this message is
>> virus free.
>> Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
>> **********************************************************************
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Cocoa-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden