@brencon/organize-photos
v1.4.1
Published
Organize your photos and videos.
Readme
organize-photos
Organizes your photos and videos.
Overview
- Takes a
srcdir and copies everything to adestdir - Every file copied is cleaned up with the following
- Lowercase file extension
- Removes trailing
#5and(3)from filenames
- If a file is not a recognized type it is moved to
dest/UNKNOWN - If a file has no date associated, it is moved to
dest/UNSORTED - If a file does have a date, it is moved to
dest/yyyy/mm/dd/yyyy-mm-dd hh:mm:ss.ext - Dates are found by the following
- exif
CreateDatefield - Any other exif fields passed in with
exifDate - Some special filenames like screenshots or photobooth files
- If the file is named like
yyyy-mm-dd hh?:mm?:ss? - A parent directory that is named like
yyyy-mm-dd hh?:mm?:ss?
- exif
- If no exif dates are found, but a date is found from the path, that will be written to exif data
- Files are never clobbered but instead
a-zis appended to the destination until there are no conflicts - By default, everything is a dry run (can be changed with
real) - By default,
destis never cleared but always added to (can be changed withclean) - Can optionally
moveall the files instead
Installation
CLI
npm install @brencon/organize-photos -gModule
npm install @brencon/organize-photos --saveUsage
Examples
Dry Verbose JPG and PNG Sorted by DateTimeOriginal, CreateDate, FileCreateDate
organize-photos --src <source folder> --dest <destination folder> --verbose true --exif-date "DateTimeOriginal" "CreateDate" "FileCreateDate" --ext "jpg" "png"
Development
Prerequisites
Windows
win-node-env
On Windows, you will encounter the error "'NODE_ENV' is not recognized as an internal or external command, operable program or batch file." when running npm scripts.
win-node-env creates a NODE_ENV.cmd that sets the NODE_ENV environment variable and spawns a child process with the rest of the command and its args.
npm install -g win-node-env
Testing
npm test
License
MIT
Contributor
Brendan Conrad
- GitHub - https://github.com/brencon
- Twitter - https://twitter.com/symBrendan
Original Project Owner
Luke Karrys
- GitHub - https://github.com/lukekarrys

