JuanPotato / Legofy

Make images look as if they are made out of 1x1 LEGO blocks
MIT License
3.15k stars 189 forks source link

[RFR] Changed the way the renaming works (proposal) #57

Closed KittyGiraudel closed 9 years ago

KittyGiraudel commented 9 years ago

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.

Edit: I LOVE THIS PROJECT!

JuanPotato commented 9 years ago

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