diff --git a/README.md b/README.md index 5db328b..9777519 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,17 @@ another, separating them in sub-directories like `$ROOT/year/month/day/`. I have a smartphone, I have a Syncthing ~~uugh... SmartThing~~ and all photos from smartphone nicely synced to my PC without my attention. But I can't just -keep all photos in synced folder: if I'll clean my phone memory - all photos +keep all photos in synced folder: if I'll clean my phone memory — all photos from pc will be cleaned too. I need to not forget copy files in another -place before cleaning phone's memory. Also, I can't just drop all photos in -one dir - I will not find anything there later, and a folder with thousands -photos looks like a bad idea from either side. -So I create this tool in one evening. All it does - copy (or create hardlinks for) +place before cleaning phone's memory. Also, I can't just drop all photos in +one dir — I will not find anything there later, and a folder with thousands +photos looks like a bad idea from either side. +So I create this tool in one evening. All it does — copy (or create hardlinks for) files from one place to another, creating basic date-aware directories structure for that files. +Created for own usage and used for a long time without any troubles. But if you meet some — +you are welcomed to the issues. ## Installing ```bash @@ -31,23 +33,38 @@ sudo cp ${GOPATH}/bin/photocatalog /usr/local/bin/photocatalog TODO -## Supported formats -At this moment supported jpeg files with filled exif data or any other -files but with names matching pattern `yyymmdd_HHMMSS.ext`. Such -names format applied by android's camera software (I guess all cams -use this format, fix me if I'm wrong). +## Organization modes -There is no support for changing names format without modifying source code -at this time. +Next organization modes supported: + +- **copy** — copy files to target root. Make COW (using syscall) if FS supports it. +- **hardlink** — create hardlink to the source file instead of copying. +The best choice if source and target are in same partition for compatibility +and resource usage, but we can't chmod target files, because of original file mode will +be changed too. +- **move** — moves original files to new place. +- **symlink** — create a symlink at the target for the source files. + +## Supported formats +At this moment supported jpeg and tiff files with filled exif data and any other +files but with names matching pattern `yyymmdd_HHMMSS.ext` with optional suffixes after a timestamp. +Such names format applied by the Android's camera software (I guess all cams +use this format, fix me if I'm wrong). + +Jpeg/Tiff files without modification date if exif will be fallen back to the name parsing. + +No able to change names format without modifying source code for now. Just because +I have reasons to believe that this format is the most popular for the application use cases. +But let me know if you need different timestamp formats support. ## Usage ### One-shot -#### Copy files (make a COW if fs supports it) +#### Copy files ```bash photocalog -mode copy -target ./photos/ -source ./sync/photos/ ``` -#### Create hardlinks (only withing one disk partition) +#### Create hardlinks ```bash photocalog -mode hardlink -target ./photos/ -source ./sync/photos/ ``` @@ -57,12 +74,12 @@ photocalog -target ./photos/ -source ./sync/photos/* ``` ### Watch mode -#### Copy files (make a COW if fs supports it) +#### Copy files ```bash photocalog -mode copy -target ./photos -watch -source ./sync/photos/ ``` -#### Create hardlinks (only withing one disk partition) +#### Create hardlinks ```bash photocalog -mode hardlink -target ./photos/ -watch -source ./sync/photos/ ```