kerrickstaley / genanki

A Python 3 library for generating Anki decks
MIT License
2.06k stars 161 forks source link

Subdecks #107

Closed RomanADavis closed 2 years ago

RomanADavis commented 2 years ago

Is there a way to generate decks as subdecks with genanki? If not, what would be required to add this functionality?

RomanADavis commented 2 years ago

Nevermind. It seems that you can do this by naming the decks f"{deck}:{subdeck}", the only problem now is getting the subdecks in order.

RomanADavis commented 2 years ago

Apparently, Anki does not support this, but you can get around it by prepending your subdeck with a zero padded ordinal, i.e. f"{subdeck}::{str(index + 1).zfill(2)} {deck}"

tyler-keller commented 5 months ago

Nevermind. It seems that you can do this by naming the decks f"{deck}:{subdeck}", the only problem now is getting the subdecks in order.

Sorry, unsure if this is due to an update but I only achieved this functionality by using a :: like f"{deck}::{subdeck}". Just leaving this here in case someone else comes across the same.