index.html 3.7 KB

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