From 70bb5d5a801428b0fb390abf79f19ffcf5e29c67 Mon Sep 17 00:00:00 2001 From: breadcat Date: Fri, 19 Jun 2020 12:23:15 +0100 Subject: Simple migration of existing posts to hugo format --- content/posts/notes-on-sorting-photos.md | 57 ++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 content/posts/notes-on-sorting-photos.md (limited to 'content/posts/notes-on-sorting-photos.md') diff --git a/content/posts/notes-on-sorting-photos.md b/content/posts/notes-on-sorting-photos.md new file mode 100644 index 0000000..e49de4f --- /dev/null +++ b/content/posts/notes-on-sorting-photos.md @@ -0,0 +1,57 @@ +--- +title: "Notes on Sorting Photos" +date: 2019-12-23T11:50:00 +tags: ["android", "formats", "guides", "linux", "media", "minimalism", "snippets", "software"] +--- + +My smart phone is an android device, it connects to my computer via MTP over USB and I store my photographs on cloud storage. Subsequently I want these pictures to be sorted, and I don't want any duplicates. + +This entire process is structured around using ArchLinux. Below is how I complete this: + +# Mount your phone's storage +I use `simple-mtpfs` to access my phone, this is installed from the AUR using `yay`: +``` +yay -S simple-mtpfs +simple-mtpfs -l +mkdir phone +simple-mtpfs --device 1 phone +ls phone +``` +This should now print out the file and folder structure of your phone. + +# Install Phockup +Now we're going to install `phockup` to sort the files into a coherent folder structure: +``` +sudo pacman -S perl-image-exiftool python3 +curl -L https://github.com/ivandokov/phockup/archive/latest.tar.gz -o phockup.tar.gz +tar -zxf phockup.tar.gz +sudo mv phockup-* /opt/phockup +sudo ln -s /opt/phockup/phockup.py /usr/local/bin/phockup +``` + +# Mount your storage +Now we're going to mount our cloud storage destination, using the ever useful `rclone`: +``` +mkdir pictures +rclone mount drive-pictures: pictures --daemon +``` + +# Sort your images +Now we can invoke `phockup` to sort and move the source files to the destination folder: +``` +phockup phone/DCIM/Camera/ pictures/personal/photos/ -m +mv phone/Pictures/Screenshots/* pictures/personal/screenshots/ -v +rm -rf phone/DCIM/.thumbnails +find phone -maxdepth 2 -empty -delete +``` +I also move my screenshots, as I like these being backed up but I don't care about how they're sorted. +I also delete unused thumbnails and empty folders, just to keep things tidy. + +# Dedupe your images +Lastly, I deduplicate the images using `jdupes`. This will prompt you for every match it finds which copy you want: +``` +yay -S jdupes +jdupes pictures/personal -rd +``` + +And you're done. -- cgit v1.2.3