Jump to content

Java Alfred Workflow Framework


Recommended Posts

Hi,

 

I'd like to share my little Java framework that I use to write workflows. I'm open for ideas, suggestions, bug reports and pull requests. Have fun.

 

Download

 

https://github.com/visusnet/alfred-worker

 

Configuration Example

 

51zh.png

 

Code Example

package net.coffeedriven;

import net.coffeedriven.alfred.spi.AbstractWorkflowPlugin;
import net.coffeedriven.alfred.spi.Item;
import net.coffeedriven.alfred.spi.ItemManager;
import net.coffeedriven.alfred.spi.PluginException;

public class ExamplePlugin extends AbstractWorkflowPlugin {
    @Override
    public void run(String query) throws PluginException {
        Item item = new Item()
                    .setArg(query)
                    .setAutocomplete(query)
                    .setTitle(query)
                    .setValid(true)
                    .setUid(query);
        getItemManager().addItem(item);
    }
}

Preview

 

k90x.png

 

Best,

Alexander

Edited by Alexander Müller
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...