General
There are few important directories:
/home/ - scripts collection: file upload and symlinks service
/images/ - real(!) files organized by date (year.month)
/collection/ - symlinks organized by labeled groups
upload.py
python3 upload.py [--recursive] [--interactive] source [label_1 label_2 ..]
Interactive mode reference:
Review images in terminal, assign individual image labels.
Groups of similar images, i.e bursts are supposed to be uploaded by just one review.
Slash (/) is allowed and will create sub-directories.
You're asked to create path if it does not exist, default question answers are highlighted.
Type 'exit' to leave interface.
Examples:
> (labels) .. mountains/elbrus landscape snow
> Unknown keyword 'snow', create? (y/N) .. y
Non-interactive:
Copy images without individual review.
Arguments will create symbolic links.
--recursive option will also copy sub-directories
--dcim will break original directory structure.
Caveats:
* Unquoted special chars may result bash commands (i.e | pipeline) which should be avoided.
Examples:
Copy new files from SD card mounted '/media/mmcblk0' to 'images/'
do not preserve original directory structure,
create symbolic links in 'collection/mountains' and 'collection/elbrus'
`python3 upload.py -r -d "/media/mmcblk0/DCIM" elbrus mountains`
symlinks.py
python3 symlinks.py
Can restore broken symlinks and alerts about removed files.
Nobody should remove image files, but remove symlinks instead.
genchecksums.py
python3 genchecksums.py
Generate integrity verification file: checksums.md5
Verify the correctness of the image files with command:
md5sum --check checksums.md5 | grep FAILED
Generate reed-solomon codes for file error recovery
Combine find and par2 commands:
find images -type f -exec par2create {} \;
To restore corrupted file later:
par2repair /path/to/file
The default amount of restoration data is enough to
back metadata header erased with exiftool.
Then you should probably remove the corrupted file.
Export file group by label
As simple as tar command:
tar -h -czvf label.tar.gz collection/label