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: <email@hidden>
- Date: Tue, 10 May 2005 13:09:52 +0200
- Thread-topic: Add metadata to my files for Spotlight
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:
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