2anki / server

Server to create Anki flashcards faster, easier and better today ⭐️
https://2anki.net
Other
309 stars 33 forks source link

fix: Anki cards do not update with changes made in Notion #1016

Open 22-modifier opened 1 year ago

22-modifier commented 1 year ago

Bug description: I am pretty sure it used to be the case where I could make changes in Notion and these would be reflected in the Anki deck if I re-exported it (2Anki did a good job of updating the cards rather than creating duplicates IIRC). However, more recently the Anki decks say that the cards have been updated (when opening the .apkg file), but the cards themselves remain unchanged. However, I do notice that under Search (2Anki) > Deck name -> lightbulb button, the cards do reflect any changes made in Notion. It's also a bit weird because the "Open in Notion" link in the Anki cards does work and takes me to the appropriate block/toggle in Notion. Screenshots below.

To Reproduce Steps to reproduce the behavior:

  1. Create deck in Notion / 2Anki
  2. Edit Notion content / toggles
  3. Re-export deck

Expected behavior Changes in Notion toggles should lead to changes in the linked Anki cards.

Screenshots In Notion:

Screenshot 2022-12-24 at 6 42 47 AM

2Anki lightbulb:

Screenshot 2022-12-24 at 6 43 07 AM

In Anki (even after re-exporting deck):

Screenshot 2022-12-24 at 6 43 50 AM

Desktop (please complete the following information):

aalemayhu commented 1 year ago

@22-modifier can you share the output of this page with me https://2anki.net/debug ? My email is alexander@alemayhu.com

22-modifier commented 1 year ago

(Sorry accidentally closed it)

As an update to this... Anki actually does update the cards appropriately if you use the Export from Notion -> HTML upload workflow.

The "Open in Notion" link is gone, but I think this is the same for the "Search -> click Anki button" workflow, so presumably this is an intended change.

Appreciate all your efforts with this!

22-modifier commented 10 months ago

@aalemayhu Any hope of the "Open in Notion" link making a comeback? Otherwise there's an unfortunate situation where if you ever make changes directly in Anki, these will get written over if you ever add to your original Notion notes (from which the Anki deck was created). But it's not easy going to find where the notes could be edited in Notion without the link.

you want to tweak a card while reviewing on your phone, those changes will be overwritten if you ever try and add additional cards from the same Notion page.

thx!

aalemayhu commented 9 months ago

@22-modifier I have brought it back now but you need to enable it in the settings.

22-modifier commented 9 months ago

@aalemayhu Thanks for doing this! I might be missing something but I couldn't find the setting to turn this on. Screenshot of what I see in settings below. I tried a number of different card styles as well including Default, Only Notion, and Alex Deluxe, but none seemed to reproduce the "open in notion" link. Also tried in both HTML upload and API / Search interface.

2anki settings
aalemayhu commented 9 months ago

@22-modifier the last deployment did not publish changes, can you check again?

22-modifier commented 9 months ago

@aalemayhu Great! It's there now. Although it only links to the page rather than the specific block. Not sure if there can be an option to select whether it links to the block vs. the page, or if that why it was unstable before.... but directly going to block makes editing way more efficient.