My goal is to create a script based Service in Automator that I can post
for non-developers - so everything I use has to be on a base Snow
Leopard or even Lion machine sans Xcode.
The script will at the end crop an image to get just a portion of the
left side of the image. sips cannot do this - it only crops from the
middle.
It appears that at least one scripting language, Python, can load
Quartz, and then let me access the functionality from that language.
However, the only "Quartz" I can find on my system in a Python folder in
/Developer (using Spotlight)?
I did see that the load took a few seconds (from Quartz import *
), and so I suppose that the script, having to load Quartz at each
invocation, is going to be slower than it would be using an executable
(like sips) - but at least it would be possible!
Sooooo - a few questions for the audience:
1) Is the Quartz plugin for Python on a base system? If so where is it?
2) What other scripting language options do I have, and are there
example scripts anywhere to be found (or readmes etc) on using Quartz?
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (Quart...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/quartz-dev-garchive-50095%40googlegroups.com
This email sent to quartz-dev-g...@googlegroups.com
> My goal is to create a script based Service in Automator that I can post for non-developers - so everything I use has to be on a base Snow Leopard or even Lion machine sans Xcode.
Is there a reason you can't just build an executable and bundle it in your action? What's the real goal here: to have a service that does your cropping, or to have a service whose implementation can be read and understood by non-developers?
>
> It appears that at least one scripting language, Python, can load Quartz, and then let me access the functionality from that language. However, the only "Quartz" I can find on my system in a Python folder in /Developer (using Spotlight)?
Quartz.framework lives in /System/Library/Frameworks. It is a core component of Mac OS X that is installed on all machines. /Developer might contain symlinks to it in the current platform SDK, or it can contain shell copies of the header files from previous OS's versions of Quartz.framework in their SDKs to facilitate writing backwards-compatible code.
>
> I did see that the load took a few seconds (from Quartz import *
> ), and so I suppose that the script, having to load Quartz at each invocation, is going to be slower than it would be using an executable (like sips) - but at least it would be possible!
>
> Sooooo - a few questions for the audience:
>
> 1) Is the Quartz plugin for Python on a base system? If so where is it?
There is no Quartz plugin, per se. `import Quartz` loads Quartz.framework and creates a module containing functions for all the functions found in Quartz.framework. There is some glue code that makes this possible, and this glue code relies on BridgeSupport. But conceptually speaking, you should think of `import Quartz` as the Python equivalent of `dlopen("/System/Library/Frameworks/Quartz.framework/Quartz")`.
>
> 2) What other scripting language options do I have, and are there example scripts anywhere to be found (or readmes etc) on using Quartz?
Ruby was mentioned previously.
--Kyle Sluder _______________________________________________
The last thread was starting to go all over the place, so thought I'd
refocus it on my specific task.
My goal is to create a script based Service in Automator that I can post
for non-developers - so everything I use has to be on a base Snow
Leopard or even Lion machine sans Xcode.
The script will at the end crop an image to get just a portion of the
left side of the image. sips cannot do this - it only crops from the
middle
It appears that at least one scripting language, Python, can load
Quartz, and then let me access the functionality from that language.
However, the only "Quartz" I can find on my system in a Python folder in
/Developer (using Spotlight)?
I did see that the load took a few seconds (from Quartz import *
), and so I suppose that the script, having to load Quartz at each
invocation, is going to be slower than it would be using an executable
(like sips) - but at least it would be possible!
Sooooo - a few questions for the audience:
1) Is the Quartz plugin for Python on a base system? If so where is it?
2) What other scripting language options do I have, and are there
example scripts anywhere to be found (or readmes etc) on using Quartz?
Answering my own question here: I'm conflating Automator actions with
Automator workflows. I don't actually know if you can bundle an
executable as part of a workflow.