FooSoft / anki-connect

Anki plugin to expose a remote API for creating flash cards.
https://foosoft.net/projects/anki-connect/
Other
1.94k stars 219 forks source link

"updateNoteField" api cannot support updateing tags #340

Open xx299x opened 2 years ago

xx299x commented 2 years ago

Modify the fields of an exist note. You can also include audio, video, or picture files which will be added to the note with an optional audio, video, or picture property. Please see the documentation for addNote for an explanation of objects in the audio, video, or picture array.

Let me extend my sincere gratitude for you about this add-ons,because it help completed my workflow.

I have a need that completely to update a list of tags to card by updateNoteFields but it is not work. I am now to implement this function by addTags but it only supports to add tag and there is no way to delete previous tags.

I want to update a list of tags by updateNoteFields

oakkitten commented 2 years ago

I suppose you could call notesInfo to get the tags for notes, and then call removeTags to remove them, or call replaceTags. Not sure if updateNoteFields should support completely replacing tags.

xx299x commented 2 years ago

I suppose you could call notesInfo to get the tags for notes, and then call removeTags to remove them, or call replaceTags. Not sure if updateNoteFields should support completely replacing tags.

Thank you for your reply. Yes, you are right. It is a good idea, but it will spend a lot of time to call this API because it needs 3 operations.