2 Commits

5 changed files with 37 additions and 7 deletions

View File

@@ -6,15 +6,20 @@ A self-hosted bookmark database with full-text page content search.
* Simple cross-platform single binary deployment
* or docker if you prefer
* Bookmarklet, single click to add a bookmark from any webpage
* Full-text search
* Bookmark content is scraped and indexed locally
* Page content periodically refreshed automatically
* Interactively search across titles and content
* Rippingly fast results, as you type
* full text search ~60ms (over full text content of 600 bookmarks)
* No need to remember how you filed something, you just need a keyword
or two to discover it again
* Embedded database, no separate database system required
* Embedded database, no separate database required
* Light on resources
* ~21Mb binary
* ~40Mb memory
* ~24Mb database (600 bookmarks, full text content indexed)
* Easily export your bookmarks to a plain text file - your data is yours
# Roadmap

View File

@@ -1,6 +1,7 @@
package main
import (
"flag"
"log"
"github.com/tardisx/linkwallet/db"
@@ -10,8 +11,19 @@ import (
func main() {
var dbPath string
flag.StringVar(&dbPath, "db-path", "", "path to the database file")
flag.Parse()
if dbPath == "" {
log.Fatal("You need to specify the path to the database file with -db-path")
}
dbh := db.DB{}
dbh.Open("badger")
err := dbh.Open(dbPath)
if err != nil {
log.Fatal(err)
}
bmm := db.NewBookmarkManager(&dbh)
cmm := db.NewConfigManager(&dbh)

View File

@@ -1,6 +1,7 @@
package db
import (
"fmt"
"log"
"github.com/tardisx/linkwallet/entity"
@@ -11,16 +12,16 @@ type DB struct {
store *bolthold.Store
}
func (db *DB) Open(dir string) {
func (db *DB) Open(path string) error {
// options := bolthold.DefaultOptions
// options.Dir = dir
// options.ValueDir = dir
store, err := bolthold.Open("bolt.db", 0666, nil)
store, err := bolthold.Open(path, 0666, nil)
if err != nil {
panic(err)
return fmt.Errorf("cannot open '%s' - %s", path, err)
}
db.store = store
return nil
}
func (db *DB) Close() {

12
docker-compose.yml-sample Normal file
View File

@@ -0,0 +1,12 @@
---
version: "2.1"
services:
linkwallet:
image: tardisx/linkwallet:latest
container_name: linkwallet
command: /app/linkwallet -db-path=/data/linkwallet.db
volumes:
- /home/username/.linkwallet:/data
ports:
- 8109:8080
restart: unless-stopped

View File

@@ -8,7 +8,7 @@ import (
"golang.org/x/mod/semver"
)
const Tag = "v0.0.11"
const Tag = "v0.0.12"
var versionInfo struct {
Local struct {