--
You received this message because you are subscribed to the Google Groups "Quicksilver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blacktree-quicks...@googlegroups.com.
To post to this group, send email to blacktree-...@googlegroups.com.
Visit this group at http://groups.google.com/group/blacktree-quicksilver.
For more options, visit https://groups.google.com/groups/opt_out.
»Lucas Garron
To unsubscribe from this group and stop receiving emails from it, send an email to blacktree-quicksilver+unsub...@googlegroups.com.
Yes, that is really what I would like to do. Better script support could open up QS to a much wider range of developers. While optimally I would like to have ruby/python/bash, really just better AppleScript would be a great step since developers can then use it as a bridge to other languages.
On 12 Jan 2014, at 17:49, David Rees wrote:
Yes, that is really what I would like to do. Better script support could open up QS to a much wider range of developers. While optimally I would like to have ruby/python/bash, really just better AppleScript would be a great step since developers can then use it as a bridge to other languages.
I’d be far more interested in the ability to add to the catalog and write actions using one of those other languages.
Most of what you see in the interface can be expressed as a property list. So there could be some new thing that just needs the path to a command (or it could just run every script in a particular directory). You write the command and have it spit out a property list.
Here’s an example (in Python) that uses actual items from Quicksilver’s catalog and turns them into something you can manipulate.
import os
import plistlib
from pprint import pprint
catalog_entry_id = 'QSPresetHome'
index_path = os.getenv('HOME') \
+ '/Library/Caches/Quicksilver/Indexes/' \
+ catalog_entry_id + '.qsindex'
tag_objects = plistlib.readPlist(index_path)
pprint(tag_objects)
So you’d just reverse the process in your script. That is, do what needs to be done to create an array of objects and dump it out as a property list.
Actions can also be defined in this way, including the types that should be allowed in the first and third panes. (In fact, most of them are defined in property lists.) But then what would the action do and how? Getting it to run some arbitrary code in a script is a bit trickier.
There’d be a similar problem when it came time to actually get objects for the third pane. How would it ask for a list and how would you build up the list? More often that not, you want to use existing objects from Quicksilver’s catalog, but an external script wouldn’t have access to them since they’re only in memory. That would be a problem for AppleScript as well.
It used to be possible to create plug-ins that used Python for most things. I’ll see if I can find some and figure out how it worked.
--
Rob McBroom
http://www.skurfer.com/
--
You received this message because you are subscribed to a topic in the Google Groups "Quicksilver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/blacktree-quicksilver/lUmYHXEaGvs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to blacktree-quicks...@googlegroups.com.
--You received this message because you are subscribed to a topic in the Google Groups "Quicksilver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/blacktree-quicksilver/lUmYHXEaGvs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to blacktree-quicks...@googlegroups.com.
I am suggesting a third action type "get catalog" which would be called each time QS does a catalog scan. So there would actually be three different ways the script is called, all within the same AppleScript.
Most of what you see in the interface can be expressed as a property list. So there could be some new thing that just needs the path to a command (or it could just run every script in a particular directory). You write the command and have it spit out a property list.