Re: [Pyobjc-dev] iPhoto export plugin...
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2004-05-25 04:59:08
|
On 24-mei-04, at 22:37, Jonathan LaCour wrote: > I am interested in writing a plugin for iPhoto using PyObjC to > "export" my images. I will be making it general purpose enough to > upload to a variety of locations through python extensions. > Initially, I am looking to have it export entire albums to my blog, > which runs on the great TextPattern content management system > (www.textpattern.com). > > I found this article about the necessary steps to write an iPhoto > export plugin in Objective-C: > > http://www.stone.com/The_Cocoa_Files/Writing_PlugIns.html > > I have a decent, but limited, understanding of Objective-C, but a very > healthy understanding of Python. After reading this article, my > question is: would it be possible for me to implement such a plugin on > top of PyObjC without having to write any Objective-C? > > Any guidance would be appreciated. In theory this should be possible, see Examples/EnvironmentPrefs for an example of a System Preferences plugin. I'm not entirely sure this will work because creating Interface Builder palettes does not work (yet...), but that's probably because IB does some low-level stuff itself. What I'd do: - Create iphoto_protocols.py, containing a definition of an objc.informal_protocol for ExportPluginProtocol. See Lib/Foundation/protocols.py for an example, or create an objective-C protocol definition and use Scripts/gen_protocols. - Write a translation into python of the ObjC code on the webpage you referenced - adapt buildplugin.py from the EnvironmentPrefs example - build the plugin and try if it works. Ronald -- X|support bv http://www.xsupport.nl/ T: +31 610271479 F: +31 204416173 |