org_to_anki icon indicating copy to clipboard operation
org_to_anki copied to clipboard

Support sync of text files to Anki deck - edits / deletions / new cards

Open mgarort opened this issue 4 years ago • 3 comments

Hello,

I am using Ubuntu 18 and .tex files to write my notes. org_to_anki seems a very useful addition to my workflow because it will allow me to write my Latex notes in Vim, which brings all the magic of snippets, keybindings, etc. However, while I can upload brand new cards to Anki, I cannot:

  • Remove cards from my deck. If the server has any residual cards that are not present in my my_deck.txt file anymore, org_to_anki won't delete them, so they will hang around forever or until I delete them manually through the Anki graphical interface (this could cause a mismatch with the server, which requires to run Tools > Check database to correct, which is inconvenient).
  • Update cards. If I change a card, org_to_anki won't replace the old version by the new version.

Am I doing something wrong? Is there a configuration parameter that I can set, or a command, in order to remove old cards and update modified cards?

Thanks a lot.

mgarort avatar Mar 31 '20 05:03 mgarort

Unfortunately this is not a supporters behaviour of the current library.

Are you using the cli tooling or the in app integration?

It's something that has been on my mind to build out as it is supported for remote_decks plugin

c-okelly avatar Mar 31 '20 05:03 c-okelly

I'm using the command line. Would using the in-app integration help? I didn't know I could also use org_to_anki from the GUI.

I see. Would it be very difficult to add this functionality? If anki-remote-decks already does it, maybe it is a matter of just adding the txt parser to anki-remote-recks?

Could you point to me in the code of anki-remote-decks where is the object that holds the information for the deck obtained from Google Docs?

I would love to use org_to_anki because it seems very useful to integrate Vim into my note taking but without the ability to update cards and decks it wouldn't be practical :/

mgarort avatar Mar 31 '20 12:03 mgarort

Sorry I missed your reply. Unfortunately the GUI in anki just really just wraps the script and nothing else.

anki-remote-decks first builds a new deck from the webpage and then compares it to the deck that is currently stored in Anki.

All of the functionality for this is located in Anki-remote-deck. The biggest issue with migration will be that some of the hooks used in anki-remote-decks are not currently setup for the cli command.

I would not be the difficult to move the functionality to org_to_anki and tbh I regret not having the class here at the start. I'm going to upgrade this ticket to a feature request

c-okelly avatar Jun 01 '20 21:06 c-okelly