https://github.com/xandkar/phorg
Idempotent photo/video file organizer
https://github.com/xandkar/phorg
Last synced: 6 months ago
JSON representation
Idempotent photo/video file organizer
- Host: GitHub
- URL: https://github.com/xandkar/phorg
- Owner: xandkar
- License: gpl-3.0
- Created: 2024-07-02T19:41:52.000Z (over 1 year ago)
- Default Branch: electus
- Last Pushed: 2024-10-02T13:18:27.000Z (about 1 year ago)
- Last Synced: 2024-10-19T03:06:30.095Z (12 months ago)
- Language: Rust
- Homepage:
- Size: 91.8 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
phorg
===============================================================================Idempotent photo/video file organizer.
[](https://github.com/xandkar/phorg/actions)
[](https://deps.rs/repo/github/xandkar/phorg)Overview
-------------------------------------------------------------------------------Given a `` and `` directories:
1. finds photo/video files in ``
2. fetches their [Exif](https://en.wikipedia.org/wiki/Exif) data
3. computes their hash digests
4. moves/copies them into
`/{,}////--
Example
-------------------------------------------------------------------------------(note the semantic subdirectory on 2020-11-29)
```sh
$ phorg /mnt/usb-drive $dst move
$ cd $dst
$ tree .
.
├── img
│ ├── 2020
│ │ ├── 11
│ │ │ ├── 29
│ │ │ │ └── Hike on Suffern-Bear Mountain Trail
│ │ │ │ ├── 2020-11-29--15:23:10--crc32:c7d15ddf.heic
│ │ │ │ ├── 2020-11-29--15:29:40--crc32:b4f4e4e0.heic
│ │ │ │ ├── 2020-11-29--15:30:07--crc32:3b5aa617.heic
│ │ │ │ └── 2020-11-29--15:38:30--crc32:514c9b0c.heic
│ │ │ └── 30
│ │ │ ├── 2020-11-30--08:20:00--crc32:08a5aa4a.heic
│ │ │ ├── 2020-11-30--08:23:41--crc32:bba07552.heic
│ │ │ ├── 2020-11-30--08:24:24--crc32:94c0f155.heic
```Install
-------------------------------------------------------------------------------0. Ensure a Rust `1.75.0`+ toolchain is installed:
1. `cargo install phorg`
2. Ensure `~/.cargo/bin/` is in your `PATH`
3. `phorg help`Dependencies
-------------------------------------------------------------------------------### Hard
Only the Rust tools mentioned above, everything else will be handled by `cargo`.
### Soft
`exiftool`, which is used as a fallback whenever we fail to extract the needed
metadata ourselves. This fallback **can be disabled** via CLI.Absence of `exiftool` in `PATH` will cause errors which will be logged, but
**will not disrupt execution** and the files we could not read enough data
about will just be skipped.