Skip to content

Add AndBible bookmarks import (sqlite -> Xiphos bookmarks.xml) - #1351

Merged
karlkleinpaste merged 1 commit into
crosswire:masterfrom
LAfricain:andbible-import
Jul 29, 2026
Merged

Add AndBible bookmarks import (sqlite -> Xiphos bookmarks.xml)#1351
karlkleinpaste merged 1 commit into
crosswire:masterfrom
LAfricain:andbible-import

Conversation

@LAfricain

Copy link
Copy Markdown
Contributor

Import bookmarks from AndBible

Adds a way to bring bookmarks created in AndBible
(the Android Bible study app) into Xiphos, via its sqlite backup file.

What this does

  • New "Import AndBible Bookmarks" entry next to the existing
    "Import Bookmarks" (BibleTime) menu item.
  • Reads AndBible's Room sqlite backup (BibleBookmark, Label,
    BibleBookmarkNotes, BibleBookmarkToLabel tables) and converts it
    into a temporary SwordBookmarks XML file, then merges it into the
    tree using the existing bookmark-parsing code.
  • AndBible stores each bookmark as an ordinal position within a
    named SWORD versification system (KJVA, Catholic, Catholic2,
    ...) rather than a plain verse reference. This is decoded back into
    a real verse key using libsword's own VerseKey /
    VersificationMgr, so no separate canon table needs to be
    maintained on the Xiphos side - any versification SWORD already
    knows about is supported automatically.
  • AndBible labels become folders (colour included); notes are
    appended to the bookmark description.
  • New sqlite3 pkg-config dependency.

Current behaviour: fully-managed folder, not an incremental sync

Every import wipes and rebuilds the whole "Import AndBible" folder
from the current backup, rather than trying to patch it in place.
This gives simple, duplicate-free, predictable behaviour - additions,
edits and label changes made in AndBible all show up correctly just
by reimporting - but at the cost of not preserving anything filed by
hand into that folder, and of no distinction between "what changed"
and "what didn't". The user is warned about this both before
(confirmation dialog if a previous import exists) and after
(summary dialog) each import.

This is a first step, not the end state

A few things are deliberately left out of this first version, to keep
it reviewable:

  • Incremental import. Rather than replace-the-whole-folder, a
    future version could diff the existing imported bookmarks against
    the new backup (by matching verse key + module + folder) and only
    add/update/remove what actually changed, instead of rebuilding
    everything on every import.
  • Retrieving AndBible's own cloud sync directly. AndBible has a
    native cloud sync feature (Nextcloud/Google Drive) that goes beyond
    the simple backup file this PR reads. Being able to pull bookmarks
    straight from that sync store - rather than requiring the user to
    manually export/copy a sqlite backup file - would turn this from a
    one-off import into something closer to a real sync. That's a
    separate, bigger piece of work (different, and only partly
    understood, on-disk/remote format) and out of scope here.

@karlkleinpaste
karlkleinpaste merged commit 7b4ee98 into crosswire:master Jul 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants