Giter Site home page Giter Site logo

smart-image-renamer's Introduction

Ronak's github stats

smart-image-renamer's People

Contributors

khsing avatar paulmassen avatar ronakg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

smart-image-renamer's Issues

Renamed some files to .MPO

I ran this against several photos and some got renamed with the file extension .MPO. I can manually rename them to .JPEG or . JPG but it renames them again if I run the script against them a second time.

No module named _version after installing using 'pip install smart-image-renamer'

After installing smart-image-renamer using pip install smart-image-renamer on a Windows 10 machine, I get the following error when trying to run it:

$ smart-image-renamer.py -h Traceback (most recent call last): File "c:/Users/XXXX/AppData/Local/Programs/Python/Python36/Scripts/smart-image-renamer.py", line 31, in <module> from _version import __version__ ModuleNotFoundError: No module named '_version'

Just thought you might want to know.

Note:

  • When running from folder with the cloned repo I don't get this error
  • From running 'pip install...'

$ pip install smart-image-renamer Collecting smart-image-renamer Downloading smart-image-renamer-0.3.tar.gz Collecting pillow (from smart-image-renamer) Downloading Pillow-5.0.0-cp36-cp36m-win_amd64.whl (1.6MB) Installing collected packages: pillow, smart-image-renamer Running setup.py install for smart-image-renamer: started Running setup.py install for smart-image-renamer: finished with status 'done' Successfully installed pillow-5.0.0 smart-image-renamer-unknown

Can' t find _version.py

I just wanted to this module for renaming some of my images. After installing it with PIP and starting it I got the following exception:

MrLeehsMB:~ stefanlehmann$ smart-image-renamer.py
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/bin/smart-image-renamer.py", line 31, in <module>
    from _version import __version__
ImportError: No module named _version

So it seems for me the _version.py is not installed by setup.py. As there is only the version number set maybe it would be better to include it in the module file.
Greetings

Should the sequence number really reset for different subfolders?

Hi,
Is it intentional that the sequence counter resets for different subfolders?

I applied the script on a folder tree with two subfolders, as follows.

SD0
├── 102D3100
│   ├── DSC_0102.JPG
│   ├── DSC_0104.JPG
│   ├── DSC_1199.JPG
│   └── DSC_1968.JPG
└── 103D3100
    ├── DSC_0105.JPG
    └── DSC_0106.JPG

and the output of a test run is as follows

$ ~/repos/misc/smart-image-renamer/smart-image-renamer.py -s 2000 -r -t -f '{Seq}_{File}' SD0
Processing folder: <snip>/SD0

Processing folder: <snip>/SD0/102D3100
DSC_0102.JPG --> 2000_DSC_0102.JPEG
DSC_0104.JPG --> 2001_DSC_0104.JPEG
DSC_1199.JPG --> 2002_DSC_1199.JPEG
DSC_1968.JPG --> 2003_DSC_1968.JPEG

Processing folder: <snip>/SD0/103D3100
DSC_0105.JPG --> 2000_DSC_0105.JPEG
DSC_0106.JPG --> 2001_DSC_0106.JPEG

I'd prefer the sequence counter to keep incrementing, so that in this example the two last files would have been named "2004_…" and "2005_…" respectively.

Suggestion: Add the possibility to get the Image dimensions

Hi,

Smart Image Renamer is very helpful, but I would be glad to get the Dimension of my photos in order to have a renamed file as below:
2016-myimage-900x600.jpg

I tried to add this:

'Model': exif_data.get('Model', ''),
                                  'Dim1': exif_data.get('XResolution', ''),
                                  'Dim2': exif_data.get('YResolution', ''),
                                  'Folder': os.path.basename(root),

With no success.
Hope you can help me!

Thanks

tag for Unique ID

EXIF knows a tag called Exif.Photo.ImageUniqueID and it would be nice if it would be accessible in this script, eg as {UniqueID}
Maybe it would even be possible to specify how many characters to use from the unique ID?

Duplicate destination filenames causes files to be overwritten

If I run the renamer with a destination filename pattern that is not unique for a set of source files, the tool will overwrite target files. For example, if I have three photos taken on the same day and I use the option -f {YYYY}{MM}{DD} then only one of the three files will remain after processing. I know I'd be mad to use that format option, but it's just an example to show the problem. It would be quite possible to have multiple photos taken in the same second, especailly if you are merging photos from multiple photographers or have a DSLR capable of numerous shots per second..

Files shouldn't be overwritten under any circumstances. Perhaps an error or warning could be issued, or maybe have an 'as needed' sequence number that is only applied when the filename is a duplicate of an existing target file.

I realise this problem can be prevented by use of the {Seq} option, but that rather misses the point.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.