GithubHelp home page GithubHelp logo

photo_organizer's People

Contributors

skogsbrus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

photo_organizer's Issues

Multiple collisions are overwritten

Given an existing file x and a colliding file y, a third file z which collides with x but is identical to y will be stored as x_collision2 instead of being skipped (since y has already been saved as x_collision_1.

More descriptive subfolders in failed directory

Currently, subfolders are named as the images' parent folder as follows:

photos/2013/12/party/img_001.png ➡️ restructured/failed/party/img001.png

Instead, rename them like:

photos/2013/12/party/img_001.png ➡️ restructured/failed/2013_12_party/img001.png

or, keep the folder structure:

photos/2013/12/party/img_001.png ➡️ restructured/failed/2013/12/party/img001.png

add option to delete original file

Currently, if the process is terminated (power outage, random reboot etc) and you wish to resume it, the script will need to go through all files again, including those it has already processed.

Thus, for large input filetrees it would be nice with the following workflow:

  1. Backup the input photo directory
  2. run ./photo_renamer.py --delete-after-copy ...

This would continually reduce the number of files in the input directory, such that if we need to restart the process, all files in the input directory are unseen.

Evaluate faster methods for file traversal

Globbing works, but takes a lot of time for large trees.

Evaluate if there is a faster library/method than glob or if glob can collect files with different file endings

Structure

Project lacks structure.

  • Readme
  • License
  • Pipenv, or equivalent
  • PEP8
  • Installation instructions

Crashes after having processed a lot of images

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.6/concurrent/futures/process.py", line 295, in _queue_management_worker
    shutdown_worker()
  File "/usr/lib/python3.6/concurrent/futures/process.py", line 253, in shutdown_worker
    call_queue.put_nowait(None)
  File "/usr/lib/python3.6/multiprocessing/queues.py", line 129, in put_nowait
    return self.put(obj, False)
  File "/usr/lib/python3.6/multiprocessing/queues.py", line 83, in put
    raise Full
queue.Full

This occurs after processing 41148 images.

One theory is that processes have been throwing a lot of exceptions and putting them inside a queue, and now that queue is full.

Collision handling

When renaming a file to a date which already exists:

  • If date and image hash is the same - abort the current copy
  • If date is the same, but the image hash is not (i.e one of them has been edited), keep both and put them in /collision
    • rename them with 'collision-1' and 'collision-2' suffices etc.

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.