diff --git a/Makefile b/Makefile
index a04902b0aadb72c1913e793732b226f5bbe3c8d7..8190661729693584d1254d5ffb5cef420e25bc75 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,6 @@ BIN?=bin/dict
GO_BUILD=go build -v --tags "fts5"
GO_RUN=go run -v --tags "fts5"
-
buid: ext
$(GO_BUILD) -o $(BIN) ./cmd/dict/main.go
@@ -11,6 +10,9 @@ $(GO_RUN) ./cmd/dict/main.go ui
import: ext
$(GO_RUN) ./cmd/dict/main.go import
+
+serve: ext
+ $(GO_RUN) ./cmd/dict/main.go serve
ext:
gcc -shared -o ext/libsqlite3ext.so -fPIC ext/spellfix.c
diff --git a/cmd/importer/importer.go b/cmd/importer/importer.go
index 18a7a7bcde0a0d70d582ae258a3e98c28b89a1a0..47b046ec815707cc55ead2dc943194985c9bb17a 100644
--- a/cmd/importer/importer.go
+++ b/cmd/importer/importer.go
@@ -88,7 +88,7 @@ fmt.Printf("%d/%d (%.0f%%)", count, total, per)
}
}
- fmt.Printf("Consolidating")
+ fmt.Printf("\nConsolidating...")
err = db.Consolidade(ctx)
if err != nil {
return err
diff --git a/cmd/server/server.go b/cmd/server/server.go
index a0de54712bf0f32a79e990fee1ceab4796f21abf..76fc1e57d982634c7143b3a1d8896724ab5ffc66 100644
--- a/cmd/server/server.go
+++ b/cmd/server/server.go
@@ -82,14 +82,12 @@ }
q := strings.ReplaceAll(string(buf), "\n", "")
- slog.Info("Query", "query", q)
ws, err := db.SelectDict(context.Background(), q, 10)
if err != nil {
slog.Error("Error selecting", "error", err)
return
}
- slog.Info("Count", "q", len(ws))
for _, w := range ws {
fmt.Fprintf(conn, "%s\n%s\n\n", w.Word, w.Line)
}