Smponi / Paper2Anki

MIT License
50 stars 7 forks source link

Image names #3

Closed RiaRosenauer closed 2 years ago

RiaRosenauer commented 2 years ago

Thank you so much! The program makes studying so much easier for me! One comment: I had problems importing new flashcards because some images had the same names, and Anki then thought that the flashcards already existed. I do not know if anyone else had the problem, but the way I fixed it was: In paper2anki.py I passed the variable 'name' as a parameter for the the createImages function and then in I simply changed line 40 in paper2anki.py from img.save("%s%s.jpg" %(TEMP+os.sep,format(x.number, '04d'))) to img.save("%s%s.jpg" %(TEMP+os.sep,format(x.number, '04d')+ '_' + name)). I don't know if it works for everybody or if someone has similar problems. Maybe my Anki is just weird. But at least for me, it works. The only important thing is that one always chooses a different name than before.

Smponi commented 2 years ago

Glad to hear you like it!
I really liked your approach, especially trying to fix it yourself and suggesting a way. That helped me a lot! :D With the implemented solution you don't have to worry about unique names :)

RiaRosenauer commented 2 years ago

Hey, thank you for responding so fast and for the fast fix! It's really nice that I don't have to worry about names anymore, I started to add a lot of numbers after the names xD. Thank you :-) 🙏 .