Using property lists sounds like a cool approach if that is how QS already thinks. And data formats are even easier than defining an API/data format. Perhaps the catalog source could just define a directory where QS could find the files. And as you said, the scripts are run on their own using cron or whatever is appropriate.
For third pane my thinking was that 3rd pane objects can be in two categories. Some are arbitrary, but some are tied to the first pane object in a way the script could figure out the options. On Mon, Jan 13, 2014 at 11:29 AM, Rob McBroom <[email protected]>wrote: > 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 > [email protected]. > To post to this group, send email to > [email protected]. > Visit this group at http://groups.google.com/group/blacktree-quicksilver. > For more options, visit https://groups.google.com/groups/opt_out. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/blacktree-quicksilver. For more options, visit https://groups.google.com/groups/opt_out.
