Extending FeedDemon: Creating "Search Definitions"

Last week’s posts which provided FeedDemon "search definitions" for FriendFeed and Tweet Scan were fairly well-received, so I figured it would be worthwhile describing how search definitions work.

If you open FeedDemon’s Data\Search\ subfolder in Windows Explorer you’ll find several FDSRCH2 files, each of which defines a separate search engine. 

 

The FDSRCH2 format is based on OpenSearch, which is the same XML format used by recent versions of Internet Explorer and Firefox for their search definitions.  Here’s the FDSRCH2 file for Google Blog search:

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
    <ShortName>Google Blog</ShortName>
    <Url type="application/rss+xml" template="http://blogsearch.google.com/blogsearch_feeds?q={searchTerms}&amp;num=10&amp;output=rss"/>
    <Url type="text/html" template="http://blogsearch.google.com/blogsearch?q={searchTerms}"/>
</OpenSearchDescription>

The ShortName element is simply the name that FeedDemon should display for the search engine.  The Url element defines the actual search interface, and contains two attributes:

  1. type: determines whether the search results are provided as an RSS feed or an HTML page
  2. template: the URL to use to retrieve the search results

If the search results are provided as an RSS feed, then type should be set to "application/rss+xml."  This tells FeedDemon to add the search engine to the keyword search page of the subscription wizard, as shown below: 

If the search results are provided as an HTML page, then type should be "text/html," which tells FeedDemon to add the search engine to its list of web search providers.  The current search provider – which is the search engine FeedDemon uses when you type a keyword rather than a URL into the address bar – can be changed by clicking the down arrow to the right of the search toolbutton:

Note that you may include two URL elements in the same FDSRCH2 file for search engines which provide both RSS and HTML results (such as the Google Blog example above).

The template attribute is the URL for the RSS feed or HTML page containing the search results.  FeedDemon replaces the {searchTerms} section of this URL with the actual keyword(s) you enter.

Related: Extending FeedDemon: Customize the "Send To" Menu

2 thoughts on “Extending FeedDemon: Creating "Search Definitions"

  1. You’ve come up with some pretty cool stuff for recent feedDemon releases, but all seem to be fringe stuff. I am surprised you are not working on some of the stuff that I see requested on the forums all the time. The two biggest ones being:
    1. Nested folders to organize feeds.
    2. A newspaper view for the “subscriptions” folder (all feeds) rather than a summary page.
    BOb

  2. @BOb: all this stuff I’m blogging about has existed in FeedDemon for quite some time – it’s nothing new, so it’s not taking my focus away from more popular requests.

Comments are closed.