Add SQLite index and mark search - #18
Merged
Merged
Conversation
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a derived SQLite index over the TOML shelf files so reads and searches hit the index instead of a full TOML parse, and a
book mark searchcommand with FTS5 full-text search over titles and URLs plus tag, shelf, and collection filters.What's new
modernc.org/sqlite, pure Go) rebuilt from TOML;shelf list,collection list, andmark listnow read from it while writes stay TOML-first.book mark search- FTS5 search over title and URL, non-interactive, with plain-text output (title and URL per line) by default.--tagsuses comma for OR and plus for AND (a,b+cmeans(a OR b) AND c);--shelfand--collectionscope results.book index rebuildandbook index syncrecover from corruption and reconcile external edits.Usage
book mark search <query>book mark search --tags a,b+cbook mark search --shelf X --collection Ybook index rebuild/book index syncBehavior changes / guardrails
book mark searchis non-interactive; running it with no query and no filters errors with guidance.a,,,a,a+,+a).deleted_at) are excluded from search results.$XDG_CACHE_HOME/book/index.db, falling back to the config dir (with a.gitignorewrite) when the cache dir is unavailable.Testing
make checkruns fmt, vet, lint, and tests; all green.