| 1 | BEP: 18 |
|---|
| 2 | Title: Search Engine Specificiation |
|---|
| 3 | Version: $Revision$ |
|---|
| 4 | Last-Modified: $Date$ |
|---|
| 5 | Author: Richard Choi <rchoi@bittorrent.com> |
|---|
| 6 | Status: Draft |
|---|
| 7 | Type: Standards Track |
|---|
| 8 | Content-Type: text/x-rst |
|---|
| 9 | Created: 12-Feb-2008 |
|---|
| 10 | Post-History: |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | Rationale |
|---|
| 14 | ========= |
|---|
| 15 | |
|---|
| 16 | The .btsearch file specifies the structure through which the |
|---|
| 17 | client can conduct searches on torrent search engines. By |
|---|
| 18 | publishing a simple .btsearch file, search engines can easily be |
|---|
| 19 | added to a client's built-in torrent search box. |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | Formatting |
|---|
| 23 | ========== |
|---|
| 24 | |
|---|
| 25 | The .btsearch file is based on a subset of the broader `OpenSearch |
|---|
| 26 | description document`_, and consists of the following elements. |
|---|
| 27 | |
|---|
| 28 | .. _`OpenSearch description document`: http://www.opensearch.org/Specifications/OpenSearch |
|---|
| 29 | |
|---|
| 30 | OpenSearchDescription element |
|---|
| 31 | ----------------------------- |
|---|
| 32 | |
|---|
| 33 | The root node of the .btsearch document:: |
|---|
| 34 | |
|---|
| 35 | Parent: None |
|---|
| 36 | Requirements: Must appear once as the root node |
|---|
| 37 | |
|---|
| 38 | ShortName element |
|---|
| 39 | ----------------- |
|---|
| 40 | |
|---|
| 41 | Contains a short human-readable name for the search engine:: |
|---|
| 42 | |
|---|
| 43 | Parent: OpenSearchDescription |
|---|
| 44 | Requirements: Must appear exactly once |
|---|
| 45 | |
|---|
| 46 | Description element |
|---|
| 47 | ------------------- |
|---|
| 48 | |
|---|
| 49 | Contains a human-readable description of the search engine:: |
|---|
| 50 | |
|---|
| 51 | Parent: OpenSearchDescription |
|---|
| 52 | Requirements: Must appear exactly once |
|---|
| 53 | |
|---|
| 54 | Url element |
|---|
| 55 | ----------- |
|---|
| 56 | |
|---|
| 57 | Describes structure through which search requests are made:: |
|---|
| 58 | |
|---|
| 59 | Parent: OpenSearchDescription |
|---|
| 60 | Requirements: Must appear exactly once |
|---|
| 61 | Attributes: template - specifies a parameterized template URL for the |
|---|
| 62 | search query, in which {searchTerms} is replaced by the user-supplied |
|---|
| 63 | query. |
|---|
| 64 | |
|---|
| 65 | Example |
|---|
| 66 | ======= |
|---|
| 67 | |
|---|
| 68 | :: |
|---|
| 69 | |
|---|
| 70 | <?xml version="1.0"?> |
|---|
| 71 | <OpenSearchDescription> |
|---|
| 72 | <ShortName>BitTorrent</ShortName> |
|---|
| 73 | <Description>Search torrents on BitTorrent.com</Description> |
|---|
| 74 | <Url template="http://www.bittorrent.com/search?q={searchTerms}&category=All"/> |
|---|
| 75 | </OpenSearchDescription> |
|---|
| 76 | |
|---|
| 77 | |
|---|
| 78 | |
|---|
| 79 | .. |
|---|
| 80 | Local Variables: |
|---|
| 81 | mode: indented-text |
|---|
| 82 | indent-tabs-mode: nil |
|---|
| 83 | sentence-end-double-space: t |
|---|
| 84 | fill-column: 70 |
|---|
| 85 | coding: utf-8 |
|---|
| 86 | End: |
|---|