rename: kafka → samsa
Full project rename from kafka to samsa (after Gregor Samsa, who woke one morning from uneasy dreams to find himself transformed). - Module: github.com/metamorphosis-dev/kafka → samsa - Binary: cmd/kafka/ → cmd/samsa/ - CSS: kafka.css → samsa.css - UI: all 'kafka' product names, titles, localStorage keys → samsa - localStorage keys: kafka-theme → samsa-theme, kafka-engines → samsa-engines - OpenSearch: ShortName, LongName, description, URLs updated - AGPL headers: 'kafka' → 'samsa' - Docs, configs, examples updated - Cache key prefix: kafka: → samsa:
This commit is contained in:
parent
c91908a427
commit
8e9aae062b
70 changed files with 185 additions and 184 deletions
|
|
@ -6,12 +6,13 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="referrer" content="no-referrer">
|
||||
<meta name="robots" content="noarchive">
|
||||
<meta name="description" content="kafka — a privacy-respecting, open metasearch engine">
|
||||
<title>{{if .Query}}{{.Query}} — {{end}}kafka</title>
|
||||
<link rel="stylesheet" href="/static/css/kafka.css">
|
||||
<meta name="description" content="samsa — a privacy-respecting, open metasearch engine">
|
||||
<title>{{if .Query}}{{.Query}} — {{end}}samsa</title>
|
||||
<link rel="stylesheet" href="/static/css/samsa.css">
|
||||
<link rel="icon" href="/static/img/favicon.svg" type="image/svg+xml">
|
||||
<link title="kafka" type="application/opensearchdescription+xml" rel="search" href="/opensearch.xml">
|
||||
<script>var s=document.documentElement;s.setAttribute('data-theme',localStorage.getItem('kafka-theme')||'light');</script>
|
||||
<link title="samsa" type="application/opensearchdescription+xml" rel="search" href="/opensearch.xml">
|
||||
<meta name="samsa" content="samsa">
|
||||
<script>var s=document.documentElement;s.setAttribute('data-theme',localStorage.getItem('samsa-theme')||'light');</script>
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
|
|
@ -20,7 +21,7 @@
|
|||
<circle cx="11" cy="11" r="8"/>
|
||||
<path d="m21 21-4.35-4.35"/>
|
||||
</svg>
|
||||
<span class="site-name">kafka</span>
|
||||
<span class="site-name">samsa</span>
|
||||
</a>
|
||||
<a href="/preferences" class="settings-link" title="Preferences">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
|
|
@ -35,7 +36,7 @@
|
|||
</main>
|
||||
|
||||
<footer>
|
||||
<p>Powered by <a href="https://git.ashisgreat.xyz/penal-colony/kafka">kafka</a> — a privacy-respecting, open metasearch engine{{if .SourceURL}} · <a href="{{.SourceURL}}">Source</a>{{end}} · <a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPLv3</a></p>
|
||||
<p>Powered by <a href="https://git.ashisgreat.xyz/penal-colony/samsa">samsa</a> — a privacy-respecting, open metasearch engine{{if .SourceURL}} · <a href="{{.SourceURL}}">Source</a>{{end}} · <a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPLv3</a></p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<circle cx="11" cy="11" r="8"/>
|
||||
<path d="m21 21-4.35-4.35"/>
|
||||
</svg>
|
||||
<span class="home-logo-text">kafka</span>
|
||||
<span class="home-logo-text">samsa</span>
|
||||
</a>
|
||||
<p class="home-tagline">Private meta-search, powered by open source.</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName>kafka</ShortName>
|
||||
<ShortName>samsa</ShortName>
|
||||
<Description>A privacy-respecting, open metasearch engine</Description>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<OutputEncoding>UTF-8</OutputEncoding>
|
||||
<LongName>kafka — Privacy-respecting metasearch</LongName>
|
||||
<LongName>samsa — Privacy-respecting metasearch</LongName>
|
||||
<Image width="16" height="16" type="image/svg+xml">/static/img/favicon.svg</Image>
|
||||
<Contact>https://git.ashisgreat.xyz/penal-colony/kafka</Contact>
|
||||
<Contact>https://git.ashisgreat.xyz/penal-colony/samsa</Contact>
|
||||
<Url type="text/html" method="GET" template="{baseUrl}/search?q={searchTerms}&format=html">
|
||||
<Param name="pageno" value="{startPage?}" />
|
||||
<Param name="language" value="{language?}" />
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
var themeButtons = document.querySelectorAll('.theme-btn');
|
||||
|
||||
// Load saved theme
|
||||
var savedTheme = localStorage.getItem('kafka-theme') || 'light';
|
||||
var savedTheme = localStorage.getItem('samsa-theme') || 'light';
|
||||
themeInput.value = savedTheme;
|
||||
document.querySelectorAll('.theme-btn').forEach(function(btn) {
|
||||
btn.classList.toggle('active', btn.dataset.theme === savedTheme);
|
||||
|
|
@ -116,12 +116,12 @@
|
|||
themeButtons.forEach(function(b) { b.classList.remove('active'); });
|
||||
btn.classList.add('active');
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
localStorage.setItem('kafka-theme', theme);
|
||||
localStorage.setItem('samsa-theme', theme);
|
||||
});
|
||||
});
|
||||
|
||||
// Load saved engine preferences
|
||||
var savedEngines = JSON.parse(localStorage.getItem('kafka-engines') || 'null');
|
||||
var savedEngines = JSON.parse(localStorage.getItem('samsa-engines') || 'null');
|
||||
if (savedEngines) {
|
||||
savedEngines.forEach(function(engine) {
|
||||
var checkbox = document.querySelector('input[name="engine"][value="' + engine.id + '"]');
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
document.querySelectorAll('input[name="engine"]').forEach(function(cb) {
|
||||
engines.push({ id: cb.value, enabled: cb.checked });
|
||||
});
|
||||
localStorage.setItem('kafka-engines', JSON.stringify(engines));
|
||||
localStorage.setItem('samsa-engines', JSON.stringify(engines));
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<circle cx="11" cy="11" r="8"/>
|
||||
<path d="m21 21-4.35-4.35"/>
|
||||
</svg>
|
||||
<span>kafka</span>
|
||||
<span>samsa</span>
|
||||
</a>
|
||||
|
||||
<form class="header-search" method="GET" action="/search" role="search">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// kafka — a privacy-respecting metasearch engine
|
||||
// samsa — a privacy-respecting metasearch engine
|
||||
// Copyright (C) 2026-present metamorphosis-dev
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
|
|
@ -26,8 +26,8 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/metamorphosis-dev/kafka/internal/contracts"
|
||||
"github.com/metamorphosis-dev/kafka/internal/util"
|
||||
"github.com/metamorphosis-dev/samsa/internal/contracts"
|
||||
"github.com/metamorphosis-dev/samsa/internal/util"
|
||||
)
|
||||
|
||||
//go:embed all:templates
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package views
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/metamorphosis-dev/kafka/internal/contracts"
|
||||
"github.com/metamorphosis-dev/samsa/internal/contracts"
|
||||
)
|
||||
|
||||
func mockSearchResponse(query string, numResults int) contracts.SearchResponse {
|
||||
|
|
@ -36,10 +36,10 @@ func mockEmptyResponse() contracts.SearchResponse {
|
|||
}
|
||||
|
||||
func TestFromResponse_Basic(t *testing.T) {
|
||||
resp := mockSearchResponse("kafka trial", 42)
|
||||
data := FromResponse(resp, "kafka trial", 1, "", "", "")
|
||||
resp := mockSearchResponse("samsa trial", 42)
|
||||
data := FromResponse(resp, "samsa trial", 1, "", "", "")
|
||||
|
||||
if data.Query != "kafka trial" {
|
||||
if data.Query != "samsa trial" {
|
||||
t.Errorf("expected query 'kafka trial', got %q", data.Query)
|
||||
}
|
||||
if data.NumberOfResults != 42 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue