kerrickstaley / genanki

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

Default Models #2

Closed kerrickstaley closed 4 years ago

kerrickstaley commented 7 years ago

Creating Models is hard, let's add some default models based on Anki's built-in ones.

fny commented 7 years ago

You have any tips on how to go about doing that? I've tried to create one based on the existing ID, but your model class requires all the attributes (i.e. template) to be specified too.

StefanGreve commented 4 years ago

@fny What we could do is writing sample models for the community. Alternatively, search for repositories on GitHub that list this dependency. I used this guide as a starting point a recent project. Replace the template with a template you already use in a pre-existing Anki deck. You can find this information in the Anki app in Browse. Select any deck, click on Cards and copy the CSS & Front/Back Template. It's really easy once you got that figured out.

mentheosis commented 4 years ago

I wrote something that may be useful to you guys, its a tool that reads the user's existing anki models and allows the user to choose one of those to set as the model for importing with genanki: https://github.com/mentheosis/anki-scanner-chinese-redux/blob/master/chinese/mr_note_maker.py#L70

kerrickstaley commented 4 years ago

Fixed in ec5847e0faea8de225aa079d101b85f7e08652a6