Closed infernalis closed 6 years ago
found some bugs, will fix them and recommit
fixed! Specifying specific columns should be much more robust. It will still throw an error if the user specifies a column that they dont have, but it wont crash the application (just the plugin) so I dont see this as a major issue.
Thanks! I'll try to re-install Anki beta and test it out in the next couple months. I'm defending my PhD dissertation in the next few weeks so I'll be unusually busy...
Consistency tests that I should run on my deck with this plugin after re-installing the Anki beta:
You might be off by 1 on the indexes (it shouldn't start at 0). You can enter what you see in the field browser without having to mentally do the conversion between count and index. So in the screenshot below if I configure it to pull from Field 2 (Simplified) with this config {"fieldToUseForStats":"2"} it will, in the code, secretly subtract one and pull index 1 from the list of fields.
Don't feel rushed to work on this, I had a lot of fun learning to work in Anki and I already get to use the changes locally. Good luck with your dissertation!
Thanks for the plugin! I noticed that if you had a high field number (i.e. if your Hanzi cards had more fields than other cards) the plugin would crash so I added an if statement to check if that card had enough fields (and if not do nothing).
Updated version of plugin uploaded to AnkiWeb...
Thank you very much for testing this so fast! I'm loving the rest of the plugin, super useful. Good luck with your PhD!
Added the ability to configure which column to use when calculating HSK statistics.
Columns can either be specified by index (starting at 0), "all", or "sortField". The default behavior is to use sortField, which matches the current implementation. It should be noted that sortField is not actually the 'first' field as stated in the projects README. The config.md file is shown to the user when they configure the plugin, the explanation may need some tweaking if it's not clear enough.
For some extra context, the Anki database schema can be found here: https://github.com/ankidroid/Anki-Android/wiki/Database-Structure