Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thingpedia - Consider support for generic opensearch discovery / translation to thingpedia query devices #795

Open
CloCkWeRX opened this issue Aug 11, 2020 · 0 comments
Labels

Comments

@CloCkWeRX
Copy link

CloCkWeRX commented Aug 11, 2020

Not sure if there is a better place for ideas/discussion.

https://almond.stanford.edu/doc/thingpedia-intro.md talks about the support for RSS

https://developer.mozilla.org/en-US/docs/Web/OpenSearch is an existing standard for discovering simple search controls; autocomplete suggestions and similar.

An example use case: openfoodfacts.org provides a simple opensearch implementation.

Web UX:
image

Opensearch:

<link rel="search" href="https://world.openfoodfacts.org/cgi/opensearch.pl" type="application/opensearchdescription+xml" title="Open Food Facts">

which produces:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Open Food Facts</ShortName>
<LongName>Open Food Facts EN</LongName>
<Description>Open Food Facts product search</Description>
<Contact>contact@openfoodfacts.org</Contact>
<SyndicationRight>open</SyndicationRight>
<AdultContent>false</AdultContent>
<Language>en</Language>
<OutputEncoding>UTF-8</OutputEncoding>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">https://static.openfoodfacts.org/images/favicon/favicon.ico</Image>

<Url type="text/html" method="GET" template="https://world.openfoodfacts.org/cgi/search.pl?search_terms={searchTerms}&amp;search_simple=1&amp;action=process" />
<Url type="application/rss+xml" method="GET" template="https://world.openfoodfacts.org/cgi/search.pl?search_terms={searchTerms}&amp;search_simple=1&amp;action=process&amp;page={startPage?}&amp;page_size={count?}&amp;rss=1" />
<Url type="application/opensearchdescription+xml" rel="self" template="https://world.openfoodfacts.org/cgi/opensearch.pl" />
</OpenSearchDescription>

The individual search results tend to be very basic, but are presented in an RSS like structure.
https://world.openfoodfacts.org/cgi/search.pl?search_terms=cadbury+chocolate&search_simple=1&action=process&page=1&page_size=1&rss=1

It's not clear just how widely spread implementations of Opensearch are, but off the top of my head it would be:

Having support to create a thingpedia device that supports a basic query from an opensearch description would lower the barrier to entry

@nrser nrser added the question label Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants