| [10856] | 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 | |
|---|
| [10858] | 16 | The .btsearch file specifies the structure through which the |
|---|
| [10856] | 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 | |
|---|
| [10858] | 33 | The root node of the .btsearch document:: |
|---|
| [10903] | 34 | |
|---|
| [10858] | 35 | Parent: None |
|---|
| 36 | Requirements: Must appear once as the root node |
|---|
| [10856] | 37 | |
|---|
| 38 | ShortName element |
|---|
| 39 | ----------------- |
|---|
| 40 | |
|---|
| [10858] | 41 | Contains a short human-readable name for the search engine:: |
|---|
| [10903] | 42 | |
|---|
| [10858] | 43 | Parent: OpenSearchDescription |
|---|
| 44 | Requirements: Must appear exactly once |
|---|
| [10856] | 45 | |
|---|
| 46 | Description element |
|---|
| 47 | ------------------- |
|---|
| 48 | |
|---|
| [10858] | 49 | Contains a human-readable description of the search engine:: |
|---|
| [10903] | 50 | |
|---|
| [10858] | 51 | Parent: OpenSearchDescription |
|---|
| 52 | Requirements: Must appear exactly once |
|---|
| [10856] | 53 | |
|---|
| 54 | Url element |
|---|
| 55 | ----------- |
|---|
| 56 | |
|---|
| [10858] | 57 | Describes structure through which search requests are made:: |
|---|
| [10903] | 58 | |
|---|
| [10858] | 59 | Parent: OpenSearchDescription |
|---|
| 60 | Requirements: Must appear exactly once |
|---|
| 61 | Attributes: template - specifies a parameterized template URL for the |
|---|
| [11009] | 62 | search query, in which {searchTerms} is replaced by the URL-encoded |
|---|
| 63 | user-supplied query. |
|---|
| [10856] | 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 | |
|---|
| [11031] | 77 | Copyright |
|---|
| 78 | ========= |
|---|
| [10856] | 79 | |
|---|
| [11031] | 80 | This document has been placed in the public domain. |
|---|
| 81 | |
|---|
| 82 | |
|---|
| [10856] | 83 | |
|---|
| 84 | .. |
|---|
| 85 | Local Variables: |
|---|
| 86 | mode: indented-text |
|---|
| 87 | indent-tabs-mode: nil |
|---|
| 88 | sentence-end-double-space: t |
|---|
| 89 | fill-column: 70 |
|---|
| 90 | coding: utf-8 |
|---|
| 91 | End: |
|---|
| 92 | |
|---|