Hello Everyone!
I’m a geek. I want to programmatically change a field in my Anki db and sync it.
I know how to load a collection:
from anki.collection import Collection
collection = Collection(collection_path)
And I know how to edit a collection:
new_note = collection.get_note(1699500453684)
new_note.__setitem__('Target', 'new value')
collection.update_note(new_note)
This also works:
auth_key = collection.sync_login('user', 'password', 'https://self-hosted-dot-com')
However, when I try to sync:
collection.sync_collection(auth_key, sync_media=False)
It defaults to synching with ankiweb-dot-net (I can’t create links on this forum)
I have searched and searched and searched, and I can’t find where the sync server URL is stored / loaded. The rust backend (I think) is the part that confuses me.
So close, but so far.
Indica