searxng/docs/dev/engines
Filip Mikina 6b57705e50
[feat] engines: add GitHub Code Search engine (#5074)
This patch adds GitHub Code Search [1] engine to allow querying the codebases.

Template code.html is changed to allow passthrough of strip and highlighting
options.

Engine Searchcode is adjusted to pass filename and not rely on hardcoded
extensions.

GitHub search code API does not return the exact code line indices, this
implementation assigns the code arbitrary numbers starting from 1
(effectively relabeling the code).

The API allows for unauth calls, and the default engine settings default to
that, although the calls are heavily rate limited.

The 'text' lexer is the default pygments lexer when parsing fails.

[1] https://docs.github.com/en/rest/search/search?apiVersion=2022-11-28#search-code

Co-authored-by: Markus Heiser <markus.heiser@darmarIT.de>
2025-08-20 07:35:31 +02:00
..
demo [doc] rearranges Settings & Engines docs for better readability 2023-07-01 22:45:19 +02:00
offline [mod] migrate from Redis to Valkey (#4795) 2025-07-09 07:55:37 +02:00
online [feat] engines: add GitHub Code Search engine (#5074) 2025-08-20 07:35:31 +02:00
online_url_search [doc] rearranges Settings & Engines docs for better readability 2023-07-01 22:45:19 +02:00
engine_overview.rst [fix] various issues in the documentation 2025-02-26 07:15:39 +01:00
enginelib.rst [mod] ExpireCache - sqlite based key/value cache with expire time 2025-05-03 08:39:12 +02:00
engines.rst [doc] rearranges Settings & Engines docs for better readability 2023-07-01 22:45:19 +02:00
index.rst [refactor] typification of SearXNG / EngineResults 2025-01-28 07:07:08 +01:00
json_engine.rst [json_engine] document existing options 2025-01-14 14:07:35 +01:00
mediawiki.rst [mod] engine: wikimedia - improve results, add addition settings & doc 2023-08-04 19:06:50 +02:00
offline_concept.rst [fix] ResourceWarning: unclosed database in sqlite3 2025-05-03 08:39:12 +02:00
xpath.rst [doc] rearranges Settings & Engines docs for better readability 2023-07-01 22:45:19 +02:00