mortii / anki-morphs

A MorphMan fork rebuilt from the ground up with a focus on simplicity, performance, and a codebase with minimal technical debt.
https://mortii.github.io/anki-morphs/
GNU Affero General Public License v3.0
61 stars 9 forks source link

Added ability to select a word during reviewing and add it to the names file #31

Closed Vilhelm-Ian closed 1 year ago

Vilhelm-Ian commented 1 year ago

image

mortii commented 1 year ago

That is absolutely genius, I have never thought about doing something like that. This webview approach could also be used for morph stuff, like searching other cards for that specific morph, etc. That is so good, wow.

We should probably make it slightly more robust, like splitting on whitespace (eg. someone selected first name and surname at the same time), and trimming extra whitespaces etc. I could take care of that if you don't want to do it.

mortii commented 1 year ago

I just thought of another related thing: I added a error pop-up dialog if "names.txt" does not exist but the user selected the option, but that is unnecessarily complicated, we could just create the file if it does not already exist, less hassle for the user.

Vilhelm-Ian commented 1 year ago

I agree

mortii commented 1 year ago

I'll merge after I fix re-sync

mortii commented 1 year ago

We should probably make it slightly more robust, like splitting on whitespace (eg. someone selected first name and surname at the same time), and trimming extra whitespaces etc. I could take care of that if you don't want to do it.

I added a error pop-up dialog if "names.txt" does not exist but the user selected the option, but that is unnecessarily complicated, we could just create the file if it does not already exist, less hassle for the user.

I did these things, and I also moved the code to a separate 'name_file_utils.py' file.

Thank you!