feat: Wikidata engine and Wikipedia knowledge infobox
- Add wikidata engine (wbsearchentities), tests, factory/planner/config - Wikipedia REST summary: infobox from extract, thumbnail, article URL - InfoboxView URL; render infobox list in results_inner + base styles - Preferences Wikidata toggle; engine badge color for wikidata Made-with: Cursor
This commit is contained in:
parent
6e45abb150
commit
24577b27be
13 changed files with 344 additions and 34 deletions
|
|
@ -24,7 +24,7 @@ import (
|
|||
)
|
||||
|
||||
var defaultPortedEngines = []string{
|
||||
"wikipedia", "arxiv", "crossref", "braveapi",
|
||||
"wikipedia", "wikidata", "arxiv", "crossref", "braveapi",
|
||||
"brave", "qwant", "duckduckgo", "github", "reddit",
|
||||
"bing", "google", "youtube", "stackoverflow",
|
||||
// Image engines
|
||||
|
|
@ -106,6 +106,7 @@ func inferFromCategories(categories []string) []string {
|
|||
switch strings.TrimSpace(strings.ToLower(c)) {
|
||||
case "general":
|
||||
set["wikipedia"] = true
|
||||
set["wikidata"] = true
|
||||
set["braveapi"] = true
|
||||
set["qwant"] = true
|
||||
set["duckduckgo"] = true
|
||||
|
|
@ -134,9 +135,9 @@ func inferFromCategories(categories []string) []string {
|
|||
}
|
||||
// stable order
|
||||
order := map[string]int{
|
||||
"wikipedia": 0, "braveapi": 1, "brave": 2, "qwant": 3, "duckduckgo": 4, "bing": 5, "google": 6,
|
||||
"arxiv": 7, "crossref": 8, "github": 9, "stackoverflow": 10, "reddit": 11, "youtube": 12,
|
||||
"bing_images": 13, "ddg_images": 14, "qwant_images": 15,
|
||||
"wikipedia": 0, "wikidata": 1, "braveapi": 2, "brave": 3, "qwant": 4, "duckduckgo": 5, "bing": 6, "google": 7,
|
||||
"arxiv": 8, "crossref": 9, "github": 10, "stackoverflow": 11, "reddit": 12, "youtube": 13,
|
||||
"bing_images": 14, "ddg_images": 15, "qwant_images": 16,
|
||||
}
|
||||
sortByOrder(out, order)
|
||||
return out
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue