mokuro
mokuro copied to clipboard
Improved image sorting.
Sorts images by folder then file name.
Addresses issue #25.
This was tested with files named as shown below.
Sort before code change:
- Chapter 1/0003.jpg
- Chapter 20/0051.jpg
- Chapter 69/13.jpg
- Chapter 69/3.jpg
- Chapter 9/0079.jpg
Sort after code change:
- Chapter 1/0003.jpg
- Chapter 9/0079.jpg
- Chapter 20/0051.jpg
- Chapter 69/3.jpg
- Chapter 69/13.jpg
Disclaimer: I don't really know Python, so I figured things as out I went to try and address this issue.
Afterthought: I should have separate sort_width
variables for folders and images, but the way it's written doesn't hurt any.
I decided to use the natsort library after all, but thank you for your contribution, and sorry for the delayed repsonse.