Miro allows users to do searches against sites that return RSS data for search queries.
Search engine data is stored in .xml files in resources/searchengines/. Here’s an example search engine:
<searchengine>
<id>5min</id>
<displayname>5min</displayname>
<url>http://www.5min.com/Rss/Search/%s</url>
<sort>11</sort>
</searchengine>
id
A unique id string that identifies this specific search engine.
displayname
The name that appears in Miro in the search engine drop down.
url
The url to use to do the search. There are several things that can be expanded in the search url:
- %s expands to the search terms
- %a expands to 1 or 0 regarding whether or not to filter adult content
- %l expands to the number of search results to return
sort
This is the integer denoting the position this search engine takes in the list of search engines.
To create a new search engine, do the following:
miro.searchengines – This module holds SearchEngineInfo and related helper functions.
Defines a search engine in Miro.
Note
Don’t instantiate this yourself–search engines are defined by .xml files in the resources/searchengines/ directory.