TobiasBielefeld / Simple-Search

[Android] Simple search app with a widget
GNU General Public License v3.0
41 stars 15 forks source link

[Feature request] Add install by OpenSearch #15

Open georgjaehnig opened 5 years ago

georgjaehnig commented 5 years ago

First thanks a lot for this great little app!

Right now, adding a custom search engine means

I'd suggest to make adding possible via the OpenSearch protocol. Many websites already use it: they have a HTML tag on their main page, like here:

<link 
  rel="search" 
  type="application/opensearchdescription+xml" 
  href="https://www.findfind.it/opensearch/n/de.deu"
  title="FindFind.it: de.deu"
/>

This tag refers to an XML file which then contains a search template URL:

<Url
  xmlns:s="http://serchilo.net/opensearchextensions/1.0/"
  type="text/html"
  method="get"
  template="https://www.findfind.it/n/de.deu?query={searchTerms}"
/>

So this can be then used to add the search engine to Simple Search.

Even more the OpenSearch protocol also can specify a tag for the suggestions, as requested in #11:

<Url
  type="application/x-suggestions+json"
  template="https://www.findfind.it/opensearch-suggestions/n/de.deu?query={searchTerms}"
/>

So implementing this feature would allow users to simply drop to Simple Search the main URL of any search engine.

What do you think? Let me know if you need any help to implement this. :)