Electron + React app that imports the full voip.ms SMS history into a local SQLite/FTS5 database, polls for new messages, sends SMS, resolves names/photos from GNOME EDS address books, and supports global and per-chat search with jump-to-message. Data lives in ~/Documents/voipms-desktop-data (covered by Deja Dup) with daily consistent snapshots. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
28 lines
884 B
Python
28 lines
884 B
Python
#!/usr/bin/env python3
|
|
"""List the enabled Evolution Data Server address books as JSON.
|
|
|
|
Only reads the source registry (no book connections), so it's fast. The app
|
|
uses this to know which ~/.cache/evolution/addressbook/<uid>/cache.db files
|
|
are live, and what they're called.
|
|
"""
|
|
import json
|
|
import sys
|
|
|
|
import gi
|
|
|
|
gi.require_version("EDataServer", "1.2")
|
|
from gi.repository import EDataServer as EDS # noqa: E402
|
|
|
|
reg = EDS.SourceRegistry.new_sync(None)
|
|
out = []
|
|
for s in reg.list_enabled(EDS.SOURCE_EXTENSION_ADDRESS_BOOK):
|
|
ext = s.get_extension(EDS.SOURCE_EXTENSION_ADDRESS_BOOK)
|
|
parent = reg.ref_source(s.get_parent()) if s.get_parent() else None
|
|
out.append({
|
|
"uid": s.get_uid(),
|
|
"name": s.get_display_name(),
|
|
"backend": ext.get_backend_name(),
|
|
"account": parent.get_display_name() if parent else "",
|
|
})
|
|
json.dump(out, sys.stdout)
|