From 456bac2e98f391601defe18fa1541dfa077930f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Baylac=20Jacqu=C3=A9?= Date: Thu, 24 Aug 2023 10:51:58 +0200 Subject: [PATCH] Init --- .gitignore | 1 + Cargo.toml | 8 ++++++++ README.md | 33 +++++++++++++++++++++++++++++++++ src/main.rs | 3 +++ 4 files changed, 45 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 README.md create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..0d788c2 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "pictures-backup" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/README.md b/README.md new file mode 100644 index 0000000..e803795 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# Picobak + +Picobak is a small CLI utility to help you backup and organize your pictures on a filesystem. It uses the pictures [EXIF](https://en.wikipedia.org/wiki/Exif) metadata to store the files in a `year/month/day` directory tree like this: + +```txt +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: + +```txt +picobak BACKUP_ROOT PICTURE_TO_BACKUP +``` + +You can couple this tool with [GNU parallel](https://www.gnu.org/software/parallel/) to concurently backup multiple images and fully utilize a multicore system: + +```txt +ls dir-containing-pictures | parallel -j $(nproc) picobak /my/pic-backup-root/ +``` diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}