A semantic search engine for source code https://bitshift.benkurtovic.com/
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

127 líneas
5.4 KiB

  1. = extends "layout.html"
  2. = block title
  3. docs
  4. = endblock
  5. = block head
  6. {{ assets.tag("docs.css") }}
  7. = endblock
  8. = block body
  9. <a id="logo" href="/">
  10. <div id="logo">
  11. <span id="logo-bit">bit</span
  12. ><span id="logo-angle">&laquo;</span
  13. ><span id="logo-shift">shift</span>
  14. </div>
  15. </a>
  16. <ul>
  17. <li>
  18. <h1><span>&raquo;</span> Usage</h1>
  19. <p>
  20. <span id="title">bitshift</span> is a search-engine optimized for source code: beyond supporting searches with the full range of ASCII
  21. symbols, the engine <em>understands</em> code, allowing users to query for metadata, like time of creation/last
  22. modification, programming language, and even symbols like function names and variables. Basic use boils down to
  23. general and advanced searches.
  24. <ul>
  25. <li>
  26. <h2>general search</h2>
  27. <p>
  28. To perform a "general search," simply place your cursor in the search bar on our home page and begin
  29. entering text; when you stop typing for a short period of time, we'll automatically execute the query for you.
  30. As you scroll down the results page, new codelets will be seamlessly downloaded from our server and
  31. appended to the end.
  32. </p>
  33. </li>
  34. <li>
  35. <h2>advanced search</h2>
  36. <p>
  37. General searches, though, are limited. To allow users to make the best of our engine, we created an advanced
  38. search form that allows the creation of complex queries with the following specifiers:
  39. <ul>
  40. <li>
  41. <h3>search fields</h3>
  42. <ul id="search-fields">
  43. <li>
  44. <span id="code">languages</span> : The programming languages to search for.
  45. </li>
  46. <li>
  47. <span id="code">authors</span> : Search for code written/modified by a specific person.
  48. </li>
  49. <li>
  50. <span id="code">date last modified</span> : Search for code last modified on a specific date (<span
  51. id="code">mm/dd/yy</span> format).
  52. </li>
  53. <li>
  54. <span id="code">date created</span> : Search for code created on a specific date (<span
  55. id="code">mm/dd/yy</span> format).
  56. </li>
  57. <li>
  58. <span id="code">symbols</span> : Search for specific symbols.
  59. </li>
  60. <li>
  61. <span id="code">functions</span> : Search for functions with specific names.
  62. </li>
  63. <li>
  64. <span id="code">classes</span> : Search for classes with specific names.
  65. </li>
  66. <li>
  67. <span id="code">variables</span> : Search for variables with specific names.
  68. </li>
  69. </ul>
  70. <p>
  71. Each of the search fields allows for numerous values; just separate them with spaces. If you'd like
  72. to search for a multi-word, space-delimited string, on the other hand, enclose it in double quotes.
  73. A query for <span id="code">foo bar</span> will search for occurrences of both <span
  74. id="string">"foo"</span> and <span id="string">"bar"</span>, while <span id="code">"foo bar"</span>
  75. will search for occurrences of <span id="string">"foo bar"</span>.
  76. </p>
  77. </li>
  78. <li>
  79. <h3>search groups</h3>
  80. <p>
  81. Search groups facilitate even more robust queries: they're like a bunch of individual searches
  82. grouped into one. A user searching for occurrenes of symbol <span id="string">"curses"</span> in the
  83. language <span id="string">"Python"</span>, and <span id="string">"ncurses"</span> in <span
  84. id="string">"C"</span>, won't get away with: <span id="code">symbols: "curses ncurses"</span> and
  85. <span id="code">languages: "Python C"</span>. The engine might return results <span
  86. id="string">"curses"</span> in <span id="string">"C"</span> and <span id="string">"ncurses"</span> in
  87. <span id="string">"Python"</span>!
  88. To work around that, you can use two search groups: one for <span id="string">"curses"</span> in
  89. <span id="string">"Python"</span>, and another for <span id="string">"curses"</span> in <span
  90. id="string">"C"</span>. <span id="title">bitshift</span> will return the union of both sets of search results.
  91. </p>
  92. </li>
  93. </ul>
  94. </p>
  95. </li>
  96. </ul>
  97. </p>
  98. </li>
  99. <li>
  100. <h1><span>&raquo;</span> Handwritten Queries</h1>
  101. <p>
  102. No content, yet.
  103. </p>
  104. </li>
  105. <li id="sec3">
  106. <h1><span>&raquo;</span> Get involved</h1>
  107. <p>
  108. <span id="title">bitshift</span> is <span id="gasp">(gasp)</span> open-source! The project is hosted on
  109. <a href="https://github.com/earwig/bitshift">GitHub</a>; feel free to file an issue or submit a pull request!
  110. </p>
  111. </li>
  112. </ul>
  113. = endblock