holwech / WhatsAppBackupFixer

Fixing restored WhatsApp image backups
MIT License
21 stars 5 forks source link

beautify output #1

Closed chriba closed 5 years ago

chriba commented 5 years ago

This PR aims to beautify the output. The number is indented depending on the number of files and the file name is displayed.

Old:

$ python fix_exif.py
16
1/16
2/16
3/16
4/16
5/16
6/16
7/16
8/16
9/16
10/16
11/16
12/16
13/16
14/16
15/16
16/16

Done!

New (sorry for the crude file multiplication ;)):

$ python fix_exif.py
Number of files: 16
 1/16 - ./test_images/IMG-20180703-WA0000 - Copy (2) - Copy.jpg
 2/16 - ./test_images/IMG-20180703-WA0000 - Copy (2).jpg
 3/16 - ./test_images/IMG-20180703-WA0000 - Copy (3).jpg
 4/16 - ./test_images/IMG-20180703-WA0000 - Copy - Copy (2).jpg
 5/16 - ./test_images/IMG-20180703-WA0000 - Copy - Copy - Copy.jpg
 6/16 - ./test_images/IMG-20180703-WA0000 - Copy - Copy.jpg
 7/16 - ./test_images/IMG-20180703-WA0000 - Copy.jpg
 8/16 - ./test_images/IMG-20180703-WA0000.jpg
 9/16 - ./test_images/IMG-20181025-WA0000 - Copy (2) - Copy.jpg
10/16 - ./test_images/IMG-20181025-WA0000 - Copy (2).jpg
11/16 - ./test_images/IMG-20181025-WA0000 - Copy (3).jpg
12/16 - ./test_images/IMG-20181025-WA0000 - Copy - Copy (2).jpg
13/16 - ./test_images/IMG-20181025-WA0000 - Copy - Copy - Copy.jpg
14/16 - ./test_images/IMG-20181025-WA0000 - Copy - Copy.jpg
15/16 - ./test_images/IMG-20181025-WA0000 - Copy.jpg
16/16 - ./test_images/IMG-20181025-WA0000.jpg

Done!
chriba commented 5 years ago

@holwech I rebased this PR, hopefully you can take a look at it!

holwech commented 5 years ago

Sorry, I must have missed this somehow (at least now you can use it towards you hacktoberfest progression ;)

Your changes seem to work fine, so I will merge this now. Good job!