[PD] Spotlight Importer for OS X

Hans-Christoph Steiner hans at eds.org
Sat Jun 28 13:03:45 CEST 2008


On Jun 27, 2008, at 11:23 PM, Luke Iannini wrote:

> On Fri, Jun 27, 2008 at 3:12 AM, Hans-Christoph Steiner  
> <hans at eds.org> wrote:
>>
>> On Jun 27, 2008, at 2:23 AM, Luke Iannini wrote:
>>
>>> On Fri, Jun 20, 2008 at 12:11 PM, Hans-Christoph Steiner
>>> <hans at eds.org> wrote:
>>>>
>>>> On Jun 20, 2008, at 2:34 PM, Luke Iannini wrote:
>>>>
>>>>> On Fri, Jun 20, 2008 at 5:15 AM, Hans-Christoph Steiner
>>>>> <hans at eds.org> wrote:
>>>>>>
>>>>>> On Jun 20, 2008, at 1:55 PM, Luke Iannini wrote:
>>>>>>
>>>>>>> On Fri, Jun 20, 2008 at 4:02 AM, Hans-Christoph Steiner
>>>>>>> <hans at eds.org> wrote:
>>>>>>>>
>>>>>>>> Does this work at all on 10.4/Tiger?
>>>>>>>>
>>>>>>> Yes, it's configured by default to work with both 10.4 and 10.5.
>>>>>>
>>>>>> Any idea whether it would cause problems on 10.3?  That's not a
>>>>>> make-
>>>>>> or-break thing, but it would be nice if it could still work on
>>>>>> 10.3.
>>>>>> As for including the Info.plist changes in v0-40, it would need
>>>>>> to be
>>>>>> throughly tested before including it.  Currently, there are  
>>>>>> only a
>>>>>> couple outstanding bugs that need to be fixed for this release
>>>>>> (AFAIK), so I am really hesitant to include something totally  
>>>>>> new.
>>>>>>
>>>>> According to this http://developer.apple.com/qa/qa2005/
>>>>> qa1406.html the
>>>>> public.plain-text UTI we're using existed in 10.3.  Also, this  
>>>>> seems
>>>>> to be a transitional document for 10.3>10.4, and doesn't  
>>>>> include any
>>>>> callouts except:  "Note: UTIs are available in Mac OS X v10.3
>>>>> Panther
>>>>> and later. Mac OS X v10.4 Tiger added many new types and  
>>>>> integrated
>>>>> support throughout the operating system."
>>>>>
>>>>> So I think it won't be a problem for the keys in the plist, and
>>>>> in the
>>>>> future, 10.3 should just ignore the
>>>>> Library/Spotlight/PureData.mdimporter file just as it would
>>>>> ignore any
>>>>> other file it didn't recognize in the bundle.
>>>>
>>>>
>>>> Ok, sounds like it is worth trying to add the Info.plist UTI  
>>>> stuff to
>>>> this release.  Feel free to add it now to branches/pd-extended/ 
>>>> v0-40,
>>>> but please test it.
>>>>
>>>> .hc
>>>>
>>> Yo, sorry I didn't read that closely and thought you were  
>>> comfortable
>>> with adding the whole kit n' kaboodle, sorry about that.
>>
>> It just seems to be a big unknown, and adding a big unknown in the
>> last days before releasing has bitten me before.
>>
>> Which reminds me: Could you give a specific example of what the
>> Spotlight Importer does?  I don't quite get it.
> Sure -
>
> Spotlight searches not only filenames but file contents for your
> search terms, so it would pull up "Theory and Techniques of Electronic
> Music"'s PDF if you searched for "Fourier", for example (since a PDF
> Spotlight importer is built in to OS X).  So, with the Pd file
> importer, it will pull up not only "I01.Fourier.analysis.pd", but
> "I02.Hann.window.pd", "I03.resynthesis.pd", etc. as well, since they
> contain the word "Fourier" in their comments.*
>
> It also works with objects, so you can find every patch containing  
> "fiddle~".
>
> And, as I mentioned, you can use it to implement, e.g. a "TODO/FIXME"
> tracker by creating a smart folder (aka saved search) that searches
> for Pd files containing those words.

Thanks, that was very helpful.  It makes sense to me.

> *It will only find files if they're outside of the Pd bundle, so I
> guess that's a drawback (but I'll see if I can find a way to force it
> to search within the bundle)

They just added these bundle restrictions in 10.3 or maybe 10.4.   
They are a pain.  I have seen some apps that allow you to use an  
OpenPanel to freely navigate into the .app bundle.  I have tried to  
find how to do that for Pd, but no luck.  Maybe you'll have better  
luck...

>
> Cheers
> Luke
>
> (and by the way, this is a common practice lest you think I'm doing
> something nutty : ); Apple includes source code importers for c,
> obj-c, ruby, python etc when you install XCode, and most OS X apps
> with a custom file format include a Spotlight importer.
>
> The next step would be to add real Quick Look support to show a
> preview of the patch's appearance as the icon and QL view (right now
> it just shows the plaintext version of the pd file).  Anyone have any
> insight on that?  Perhaps just a separate Tcl generator would work...

That sounds like a big project, but would be very cool.  Perhaps you  
could tap into Pd's print support, it outputs a .ps Postscript file.

.hc

>
>>
>>
>> .hc
>>
>>>
>>>>
>>>>>>>>
>>>>>>>> As for building it, how do you build it yourself?  That's
>>>>>>>> usually a
>>>>>>>> good starting point for adding it to the auto-build.  If it  
>>>>>>>> is an
>>>>>>>> xcode project, you can use the command line tool xcodebuild.
>>>>>>>>
>>>>>>> Yo,
>>>>>>> I just built in with the build button : ).  I like buttons...
>>>>>>> So yea, I have the project.  Looks like it builds aok with
>>>>>>> xcodebuild,
>>>>>>> thanks for the tip.  Where should I put the project folder?
>>>>>>
>>>>>> Good question. The first place I thought of is packages/ 
>>>>>> darwin_app
>>>>>> since it is only for things related to the Pd.app for Mac OS X.
>>>>>> Maybe:
>>>>>>
>>>>>> packages/darwin_app/spotlight_importer
>>>>>>
>>>>>> Then it probalby makes sense to make a separate
>>>>>> 'spotlight_importer:'
>>>>>> target in packages/darwin_app/Makefile to build and install it.
>>>>>>
>>>>>> .hc
>>>>>
>>>>> Will do.
>>>>> Cheers
>>>>> Luke
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------- 
>>>> --
>>>> ---
>>>> ----
>>>>
>>>> All information should be free.  - the hacker ethic
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Pd-list at iem.at mailing list
>>>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/
>>>> listinfo/pd-list
>>>>
>>>
>>> _______________________________________________
>>> Pd-list at iem.at mailing list
>>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/
>>> listinfo/pd-list
>>
>>
>>
>>
>>
>> --------------------------------------------------------------------- 
>> ---
>> ----
>>
>> 'You people have such restrictive dress for women,' she said,
>> hobbling away in three inch heels and panty hose to finish out
>> another pink-collar temp pool day.  - "Hijab Scene #2", by Mohja Kahf
>>
>>
>>
>> _______________________________________________
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/ 
>> listinfo/pd-list
>>
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/ 
> listinfo/pd-list



------------------------------------------------------------------------ 
----

                   ¡El pueblo unido jamás será vencido!






More information about the Pd-list mailing list