-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add several option to support file_watcher, notification center and foreign language #58
base: master
Are you sure you want to change the base?
Conversation
…t month directory name in your own locale
--ignore: a list of files to be ignored, example: --ignore .* *.db (especially usefull with Thumb.db files under windows) --remove-ignored-files: remove ignored files
--remove-empty-dirs option recursively scan source directory and remove any remaining empty dirs. usefull to see if everything have been processed.
…e sorting is automatically launched once no more activity is detected on them. Use fswatch from https://github.com/emcrisostomo/fswatch Added option -w,--watch to make sortphoto wait on it's standard input new files to analyze.
Added file_watcher script, when a file is put in the watched directories the sorting is automatically launched once no more activity is detected on them. Use fswatch from https://github.com/emcrisostomo/fswatch |
…ssion. Any file put in incoming directory will be sorted to sorted_directory after 30s of inactivity in incoming directory.
Added a plist file to launch the file_watch script on user session login. Every time a file is put in incoming_directory, after 30s of inactivity the directory is sorted and files are moved to sorted_directory. |
…done. The banner display how much photos have been processed and if clicked open output directory. change the semantic of --ignore to workaround a bug in terminal that interpret * ...
…as processed as 2018 July 03 instead of being processed as a timestamp.
Work done, the file watcher does not impact computer speed. |
@nekopep Great stuff. But there are too many things for me to pull all at once. Some of them have been superseded by other pull requests or are of lower priority. If you make separate pull requests for each change (each pull request doing only one thing) then it is more likely that I can accept more of them. Sorry for the hassle. I understand if you don't want go to the trouble of doing that. If not, I may try pull a few things out myself and you've made some nice changes. |
Hello,
These patch add several option I found usefull:
--set-locale fr_FR to force a locale, thus directory name created match the locale user need
--ignore to ignore a list of specific file like .* or .db (.* was ever supported in the script) but since I imported directory from windows got a lot of annoying Thumb.db files that were parsed by exiftool...
--remove-ignored-files option remove ignored files, the idea is to be able to get a clean source directory once file have been processed and moved
--remove-empty-dirs option to remove empty dirs in source dir once it has been processed
With all these option it is possible to put file in a dir and a script can process the dir. Once the dir is processed it can be completely cleaned up for next data incomming.
This bring us to the two new script file_watcher.py and sort_filter.py. The file_watcher is a script that use filewatch a cross platfrom directory watcher. Once file are put into the dir the sort_filter is called with the files added as argument, allowing to automagically sort your photos :)
disclaimer: This is initial version that do not use yet the new options.
A future version will come with new options support to improve speed and corner cases.
Laurent