kerrickstaley / genanki

A Python 3 library for generating Anki decks
MIT License
1.99k stars 150 forks source link

genanki.Note should have a field for the paths to its media files #60

Open kerrickstaley opened 3 years ago

kerrickstaley commented 3 years ago

Instead of having a .media_files attribute on Package, it may be more ergonomic to have a .media_files attribute on each genanki.Note instance. The .media_files for the overall package will then be computed by combining the lists for each individual Note (removing duplicates).

Need to think a little more about whether this design will handle all use-cases and whether it will be genuinely easier to use. One consideration is "static" media files; those still need to be specified at the package level.

yash-fn commented 2 years ago

I vote keeping it the way that it is now. The same media file can be referenced in many different ways. Might as well save yourself a headache engineering something so specific in and force the user to make sure they know what they want when specifying the media writes. The greatest utility your module provides is not having to manually generate that sqlite db. KISS where possible.