eyeinsky / org-anki

Sync org notes to Anki via AnkiConnect
BSD 3-Clause "New" or "Revised" License
180 stars 28 forks source link

Nested decks support #35

Closed walseb closed 2 years ago

walseb commented 2 years ago

Hi! I use nested anki decks extensively (achived by dragging and dropping a deck onto another in the anki desktop app). But when I do, unless a ANKI_NOTE_ID is present, the :ANKI_DECK: name can't be found by org-anki when I use the top level name of the deck. It works again if I un-nest the deck in anki. Does anyone know a solution to this? Maybe I need to prepend the parent deck to the name in some way? Thanks for any help! Happy New Year!

eyeinsky commented 2 years ago

Happy new year to you too!

I suspect the way to get a solution is to query anki connect API for a note that is in a nested deck and see what it reports its deck name to be. Not behind a computer atm but surely we'll find this out in the new year. :)

pakelley commented 2 years ago

@walseb I figured this out by querying anki connect using:

curl localhost:8765 -X POST -d '{"action": "deckNames", "version": 6}'

And you can find more examples in anki connect's docs.

tldr: put a :: between the parent and child decks 🙂

walseb commented 2 years ago

@walseb I figured this out by querying anki connect using:

curl localhost:8765 -X POST -d '{"action": "deckNames", "version": 6}'

And you can find more examples in anki connect's docs.

tldr: put a :: between the parent and child decks 🙂

That was fast. Thanks!