Jump to content

Get autocomplete suggestions from external source?


Recommended Posts

Posted

Hi there

 

I am web developer and would like to do something along the following lines:

 

* Set up a website which is just a list of labels and URLs (in JSON format or something)

* Have my Alfred draw on that list and have it periodically cached

* When I start typing, it offers autocomplete options from the list - if I click any of those suggestions taken from the list, I am taken the corresponding URL found in the list

 

Is this viable in any way? Does it make sense?

Posted

@Ben Hull Take a look at the Script Filter workflow object which is designed for this purpose:

https://www.alfredapp.com/help/workflows/inputs/script-filter/

 

The JSON format to show items in Alfred is defined here:

https://www.alfredapp.com/help/workflows/inputs/script-filter/json/

 

Your script would be responsible for caching the data from your website, but you could select the option to have Alfred filter the results, which would leave you with simply loading the JSON, saving it locally, and then returning it to Alfred.

 

Cheers,

Andrew

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...