kerrickstaley / genanki

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

sort_field_index not released & what is sort_field doing? #79

Closed filipre closed 3 years ago

filipre commented 3 years ago

Hi,

I wanted to use sort_field_index but it appears the feature has not been released yet. The latest release is from December 2020 but sort_field_index was implemented only 3 months ago. Can you release a new version or is there another (clean) way to make use of that feature?

Also, to me it is not clear what sort_field is expecting. Is it

Thanks!

Best René

kerrickstaley commented 3 years ago

sort_field_index is an integer which is the index of the field to sort on. 0 is the first field, 1 is the second, etc. You pass sort_field_index when constructing the Model.

You can also pass sort_field when constructing the Note. This is a string giving the actual contents of the sort field.

I've released genanki 0.11.0 which has the latest changes.

filipre commented 3 years ago

Thanks for the release and the clarification!