You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.
All Anki-Connect actions operating on notes via some ID currently require note ID's ("noteId") as arguments and provide note ID's as return values. This severely limits the types of applications that can make use of Anki-Connect.
Note ID's are unsuitable as ID for many applications, especially those that involve multiple users, as they are only unique within a users profile. Just because of this, applications such as CrowdAnki and ki, had to write their own interface to Anki from scratch instead of making use of Anki-Connect. Moreover, several applications which rely fully on Anki-Connect are currently restricted in the features they can provide because of this limitation. Examples include org-anki, anki-editor, and my fork of it.
Anki notes are already stored with globally unique identifiers (GUIDs) in Anki's database, so it should not be very difficult to make use of them in Anki-Connect's actions. To enable a complete switch to GUIDs in the above mentioned applications it would be enough if the following actions were to (optionally) accept guid as input instead of noteId: notesInfo, updateNoteFields, deleteNotes, addTags, and removeTags; and if the following actions were to (optionally) return guid's instead noteId's: addNote and findNotes.
To people familiar with Anki-Connect's codebase: How feasible would this be? Any pointers on how to implement this? Would such a pull request have a chance of being accepted? Maybe someone else also has an interest in making this happen?
The text was updated successfully, but these errors were encountered:
I don't have a problem with this kind of a change; the main thing is that we don't want to break backwards compatibility with older clients that rely on note ID. This could be as simple as determining the type of the parameter at runtime and changing behavior accordingly.
All Anki-Connect actions operating on notes via some ID currently require note ID's ("noteId") as arguments and provide note ID's as return values. This severely limits the types of applications that can make use of Anki-Connect.
Note ID's are unsuitable as ID for many applications, especially those that involve multiple users, as they are only unique within a users profile. Just because of this, applications such as CrowdAnki and ki, had to write their own interface to Anki from scratch instead of making use of Anki-Connect. Moreover, several applications which rely fully on Anki-Connect are currently restricted in the features they can provide because of this limitation. Examples include org-anki, anki-editor, and my fork of it.
Anki notes are already stored with globally unique identifiers (GUIDs) in Anki's database, so it should not be very difficult to make use of them in Anki-Connect's actions. To enable a complete switch to GUIDs in the above mentioned applications it would be enough if the following actions were to (optionally) accept guid as input instead of noteId: notesInfo, updateNoteFields, deleteNotes, addTags, and removeTags; and if the following actions were to (optionally) return guid's instead noteId's: addNote and findNotes.
To people familiar with Anki-Connect's codebase: How feasible would this be? Any pointers on how to implement this? Would such a pull request have a chance of being accepted? Maybe someone else also has an interest in making this happen?
The text was updated successfully, but these errors were encountered: