update redirect.md
[uweb.git] / en / searchcat / index.html
blob76a505f103dc55b85eaa3e6da4bbd2063e24e330
1 <!doctype html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1" />
7 <link rel="stylesheet" href="../style.css#" type="text/css" />
8 <title>Search engine files</title>
9 <script type="text/javascript">
10 function findLang(){
11 let href = location.href;
12 for(let i=href.length-1;i>0;i--){
13 if('/'==href.charAt(i) && '/'==href.charAt(i-3))
14 return i;
16 return 0;
18 function nav2(page){
19 let i = findLang();
20 location.href = location.href.substring(0,i+1)+page;
22 function nav2Lang(lang){
23 let i = findLang();
24 let href = location.href;
25 location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
27 </script>
28 </head>
29 <body>
30 <header class='header'>
31 <a class="logo" href="javascript:void(0)" onclick="return nav2('index.html#')">Home</a> <a class="logo" href="javascript:void(0)" onclick="return nav2('tags/index.html#')">Tags</a>
34 <a class="logo" href="javascript:void(0)" onclick="return nav2Lang('zh')">简体中文</a>
37 <nav>
38 </nav>
39 </header>
40 <br />
42 <div class="container">
43 <h1 class="title">Search engine files
44 <br>
45 <span class="subtitle"></span>
46 </h1>
47 <ul class="tags">
49 <li><a href="../tags/search%20engine/index.html#">search engine</a> </li>
51 </ul>
52 <p>Search engine file names have &quot;.search&quot; as postfix. When they are clicked, the associated bookmark files with postfix &quot;.search.html&quot; would be appended. Ex: the associated bookmark for &quot;foo.search&quot; is &quot;foo.search.html&quot;.</p>
53 <p>Any &quot;.search&quot; file can be opened as search engine file, each line of which has one of the following formats:<br>
54 [Engine name]:[url without '%s' inside]<br>
55 [Engine name]:[url with '%s' as keyword]<br>
56 [Engine name]:POST:[post params with '%s' as keyword]:[url]<br>
57 [Engine name]:[Extra request headers]:[post params with '%s' as keyword]:[url]</p>
58 <ul>
59 <li>[Extra request headers] Ex. &quot;X-Forwarded-For;8.8.8.8&quot;</li>
60 <li>when [post params] is empty, the url should have '%s' as keyword.</li>
61 </ul>
62 <p>Limitations (they are here for performance reasons):</p>
63 <ul>
64 <li>The first engine in the file must be the first type that has no '%s' in the engine url.</li>
65 <li>Internal scheme engine urls (such as i:, d:, c:) must have '%s', since '%s' format is more general (only type 2 is allowed, since POST makes no sense for internal schemes).</li>
66 </ul>
67 <h4 id="local-engines">Local engines</h4>
68 <p>c:[command line with '%s' as keyword]<br>
69 d:mimetype:[command line with '%s' as keyword]:[base url for external resources]</p>
71 </div>
72 <p>Last Modified: 8 April 2024<br>
73 add associated bookmarks<br>
74 <pre></pre>
75 </p>
77 <script id='jsgiscus'
78 src='https://giscus.app/client.js'
79 data-repo="torappinfo/uweb"
80 data-repo-id="MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
81 data-category="Announcements"
82 data-category-id="DIC_kwDOEgNLGc4CQjsh"
83 data-mapping="title"
84 data-strict="0"
85 data-reactions-enabled="1"
86 data-emit-metadata="0"
87 data-input-position="top"
88 data-theme="light"
89 data-lang="en"
90 data-loading="lazy"
91 crossorigin="anonymous" async>
92 </script>
94 <footer class="site-footer">
95 <div class="container">
96 &copy; 2018-2024 Richard H. Cao
97 </div>
98 </footer>
99 <!-- This document is licensed under the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at <https://www.gnu.org/licenses/>. -->
102 </body>
103 </html>