This pull-request is only a suggestion, feel free to discard it if you do not agree with the way it works or the even the achieved goal.
So right now, the script renames the file by appending the lego_ prefix to it, so that path/to/file.jpg becomes path/to/lego_file.jpg. It works great, except it doesn’t preserve the file order when there are a lot of files in a folder, because of the filename prefix. My proposal would rename the file like so: path/to/file.lego.jpg, so that the converted file would live next to the original in the finder (or equivalent file browser).
The code is pretty self explanatory I guess, but I added comments just in case. I am no Python guru, so if anything can be optimised, be sure to tell.
This is already in another PR that I should really merge. It appends _lego to the filename, pretty similar to your solution. #54
I'm glad you like the program :D
This pull-request is only a suggestion, feel free to discard it if you do not agree with the way it works or the even the achieved goal.
So right now, the script renames the file by appending the
lego_
prefix to it, so thatpath/to/file.jpg
becomespath/to/lego_file.jpg
. It works great, except it doesn’t preserve the file order when there are a lot of files in a folder, because of the filename prefix. My proposal would rename the file like so:path/to/file.lego.jpg
, so that the converted file would live next to the original in the finder (or equivalent file browser).The code is pretty self explanatory I guess, but I added comments just in case. I am no Python guru, so if anything can be optimised, be sure to tell.
Edit: I LOVE THIS PROJECT!