Backup and organize your pictures library.
Go to file
Félix Baylac Jacqué c713e3d5a1 First semi-naive and dirty implementation
We adopt a semi-naive approach. Probably not the best performing and
most robust solution, but at least we have something functional.

We rely on a external scheduler, such as GNU parallel, to concurently
copy the files and use as much cores as possible. It makes the program
composable with the GNU userspace toolchain.

It however comes at a cost: we have to spin-up/tear-down a process for
each file. Scheduling the copy from inside the Rust program by
creating multiple threads (using rayon?) would be likely much more
performant. We'll probably come to it in the future.

The error handling also left to be desired. We're panicking with a
error message every time we encounter something unexpected.

The program is also untested. Might eat your kitten for now.
2023-08-24 13:09:51 +02:00
src First semi-naive and dirty implementation 2023-08-24 13:09:51 +02:00
.gitignore Init 2023-08-24 10:51:58 +02:00
Cargo.lock First semi-naive and dirty implementation 2023-08-24 13:09:51 +02:00
Cargo.toml First semi-naive and dirty implementation 2023-08-24 13:09:51 +02:00
LICENSE First semi-naive and dirty implementation 2023-08-24 13:09:51 +02:00
README.md First semi-naive and dirty implementation 2023-08-24 13:09:51 +02:00

README.md

Picobak

WARNING: this program hasn't properly been tested yet. Use with extreme caution. It might eat your kittens for now!!

Picobak is a small CLI utility to help you backup and organize your pictures on a filesystem. It uses the pictures EXIF metadata to store the files in a year/month/day directory tree like this:

2023
|
|
|-- 02
    |-- 19
        |-- pic2.jpg
    |-- 20
        |-- pic1.jpg
        |-- pic2.jpg
        |-- pic3.jpg
(...)

This program is heavily inspired by Shotwell's backup feature. I actually used that for years to organize my pictures. Sadly, it became more and more unstable along the years, it often fails midway-through the backup. Its implementation is too intimidating for me to try to fix and maintain it. In contrast, this utility is meant to stay small in terms of features scope and codebase. Nevertheless, Shotwell is a great program overall, kudos to the original authors, they have made my life simpler for years <3.

Usage

Overall:

Usage: pictures-backup [OPTIONS] <BACKUP_ROOT> <FILE_PATH>

Arguments:
  <BACKUP_ROOT>  Pictures library directory
  <FILE_PATH>    Picture to backup

Options:
  -d, --dry-run  Do not create any directory or copy any file. Only prints out the operations it would perform
  -h, --help     Print help
  -V, --version  Print version

You can couple this tool with GNU parallel to concurently backup multiple images and fully utilize a multicore system:

ls dir-containing-pictures | parallel -j $(nproc) picobak /my/pic-backup-root/