|
|
Use the RichText.mdimporter instead
Yeah but HTML and PHP and Python are dissimilar enough that one parser probably won't be able to parse all three. Heck why not get the SourceCode file to parse MS Word files - it's all just bytes at the end of the day... Clearly that isn't correct. I'm not saying that changing the Info.plist around will necesarily break anything - in fact it is pretty clear that SourceCode importer can probably do a very basic import on any text file. But the point is - you're taking a risk. Don't worry about dyn.* files. They're dynamic UTI types and should not be persistent between reboots. Not sure exactly what causes them (possibly caused by files that are not matched by any UTI description). But Spotlight is smart enough to realise that the dynamic UTI type is actually mapped to a real UTI type.
Use the RichText.mdimporter instead
Thanks for the reply.
Regarding files with type dyn.*: I want to index my httpd.conf file and a few other "generic" system files. mdls /etc/httpd/httpd.conf returns:
Provided I add /etc/httpd to the Spotlight index path list, how do I get SL to index this file? What importer will be used? AFAIK Spotlight needs a recognized extension, or a recognized file type to index.
Any suggestions?
Use the RichText.mdimporter instead
From the terminal:
mdimport -d2 /etc/httpd/httpd.conf If you get NO output it means that Spotlight _cannot_ import the file. Which means it could either have no valid mdimporter which claims to be able to understand that file - or it might not be able to index it because Spotlight has been configured not to index files in /etc You can fix the later by modifying the hidden Spotlight config files - other hints show how to do that. Again I wouldn't recommend it (but I'm dull & boring). If you're sure Spotlight should be able to import the file (because you have modified the config files) then you also need to write an mdimporter to import config files. ;-) Of course you could modify SourceCode.mdimporter to handle .conf files but that will be a bit tricky. But as a favour to you personally (because we go back so far now) I'll take my Python importer and use it to create a .conf file importer. Expect it within the next 24hours or so. Check out http://toxicsoftware.com/blog/ for progress. Feel free to continue this thread on my blog.
Use the RichText.mdimporter instead
Code written (not actually based on my Python code):
http://toxicsoftware.com/blog/index.php/weblog/creating_a_generic_config_file_spotlight_importer/
Use the RichText.mdimporter instead
Wow--thanks. Im downloading now and will try ASAP.
Use the RichText.mdimporter instead
There's a new version online now that imports .conf, .log and .plist. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.12 seconds |
|