index.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <link rel="stylesheet" href="../style.css#" type="text/css" />
  7. <title>Search engine files</title>
  8. <script type="text/javascript">
  9. function findLang(){
  10. let href = location.href;
  11. for(let i=href.length-1;i>0;i--){
  12. if('/'==href.charAt(i) && '/'==href.charAt(i-3))
  13. return i;
  14. }
  15. return 0;
  16. }
  17. function nav2(page){
  18. let i = findLang();
  19. location.href = location.href.substring(0,i+1)+page;
  20. }
  21. function nav2Lang(lang){
  22. let i = findLang();
  23. let href = location.href;
  24. location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
  25. }
  26. </script>
  27. </head>
  28. <body>
  29. <header class='header'>
  30. <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>
  31. <a class="logo" href="javascript:void(0)" onclick="return nav2Lang('zh')">简体中文</a>
  32. <nav>
  33. </nav>
  34. </header>
  35. <br />
  36. <div class="container">
  37. <h1 class="title">Search engine files
  38. <br>
  39. <span class="subtitle"></span>
  40. </h1>
  41. <ul class="tags">
  42. <li><a href="../tags/search%20engine/index.html#">search engine</a> </li>
  43. </ul>
  44. <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>
  45. <p>Any &quot;.search&quot; file can be opened as search engine file, each line of which has one of the following formats:<br>
  46. [Engine name]:[url without '%s' inside]<br>
  47. [Engine name]:[url with '%s' as keyword]<br>
  48. [Engine name]:POST:[post params with '%s' as keyword]:[url]<br>
  49. [Engine name]:[Extra request headers]:[post params with '%s' as keyword]:[url]</p>
  50. <ul>
  51. <li>[Extra request headers] Ex. &quot;X-Forwarded-For;8.8.8.8&quot;</li>
  52. <li>when [post params] is empty, the url should have '%s' as keyword.</li>
  53. </ul>
  54. <p>Limitations (they are here for performance reasons):</p>
  55. <ul>
  56. <li>The first engine in the file must be the first type that has no '%s' in the engine url.</li>
  57. <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>
  58. </ul>
  59. <h4 id="local-engines">Local engines</h4>
  60. <p>c:[command line with '%s' as keyword]<br>
  61. d:mimetype:[command line with '%s' as keyword]:[base url for external resources]</p>
  62. </div>
  63. <p>Last Modified: 8 April 2024<br>
  64. add associated bookmarks<br>
  65. <pre></pre>
  66. </p>
  67. <script id='jsgiscus'
  68. src='https://giscus.app/client.js'
  69. data-repo="torappinfo/uweb"
  70. data-repo-id="MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
  71. data-category="Announcements"
  72. data-category-id="DIC_kwDOEgNLGc4CQjsh"
  73. data-mapping="title"
  74. data-strict="0"
  75. data-reactions-enabled="1"
  76. data-emit-metadata="0"
  77. data-input-position="top"
  78. data-theme="light"
  79. data-lang="en"
  80. data-loading="lazy"
  81. crossorigin="anonymous" async>
  82. </script>
  83. <footer class="site-footer">
  84. <div class="container">
  85. &copy; 2018-2024 Richard H. Cao
  86. </div>
  87. </footer>
  88. <!-- 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/>. -->
  89. </body>
  90. </html>