taylormitchell / ankify_roam

A command-line tool which brings flashcards created in Roam to Anki.
MIT License
36 stars 6 forks source link

Multiple cloze deletions per block not working? #11

Closed cansar closed 3 years ago

cansar commented 3 years ago

Hi,

I'm using ankify-roam-0.0.7 and am using the example cloze deletion: {Paris} is the capital and most populous city of {France}, with a estimated population of {2,148,271} residents #ankify but only 1 card is created from the note instead of 3 [[December 25th, 2020]] {{c1::Paris}} is the capital and most populous city of {{c2::France}}, with a estimated population of {{c3::2,148,271}} residents #ankify.

cansar commented 3 years ago

After looking into this more I thought it might be the the other cloze cards will appear in the future but when manually creating a cloze note all of them get created immediately.

taylormitchell commented 3 years ago

Hey @cansar

Hmm yeah, this is an issue. Thanks for reporting it. Looks like it's an issue with the Roam Cloze note type created by ankify_roam init. I'll have to look into this further to find a real fix, but as a workaround for now, you can resolve this by following these steps to create the "Roam Cloze" note type manually.

Let me know if this works!

image

image

image

Now try adding your Roam export

cansar commented 3 years ago

Thank you so much for the quick and detailed reply! I'll try this first thing tomorrow and report back.

cansar commented 3 years ago

This worked perfectly! I do see the parent blocks listed as separate lines now and I was trying to understand the relationship between default_models.py and the various .css files. Is the cleanest thing to do to just add the .parent {display: none; }? It worked perfectly but I was wondering if I should do anything differently for compatibility? Thanks again!!

taylormitchell commented 3 years ago

I'm glad I could help!

Yeah, using .parent {display: none; } is the right way to go. The .css files should be copies of what's in default_models.py. I updated them just now so they hide the parent by default now. The other option is to show the parents bread crumb style with: https://github.com/taylormitchell/ankify_roam/blob/master/css/breadcrumb_parents.css