Featured Post

Efficient Duplicate Image Removal: Using ImageDeDup Python

Efficient Duplicate Image Removal: A Python Guide In this blog post, we will walk you through the process of identifying and removing duplicate images from your directories using Python. We will leverage perceptual hashing to find similar images and delete duplicates while keeping the largest file in the group. This solution is perfect for users who want to save disk space and keep their image collections organized. Why You Should Use This Code Over time, especially when dealing with large collections of images, duplicate files can accumulate. These duplicates take up unnecessary space on your system. Manually sifting through these images can be tedious, but with the help of Python, perceptual hashing, and concurrent processing, this task becomes much easier. Benefits: Efficient Duplicate Detection : By using perceptual hashing (PHash), the code compares images based on their v...

Downloading icloud photos using icloudpd on linux, windows or mac

iCloud Photo Backup Guide

Downloading icloud photos using icloudpd on linux, windows or mac

icloudpd is a third-party command-line tool to download all your iCloud Photos automatically.

Install icloudpd

Install Python3 and pip:

sudo apt update
sudo apt install python3 python3-pip
        

Install icloudpd:

pip3 install icloudpd
        

Download iCloud Photos

Create a directory for your photos (e.g., /mnt/backup_photos):

mkdir -p /mnt/backup_photos
        

Run icloudpd to download your photos:

icloudpd --directory /mnt/backup_photos --username your_apple_id
        

Authenticate:

  • You’ll be prompted to enter your Apple ID password.
  • If Two-Factor Authentication (2FA) is enabled, you’ll need to enter a verification code sent to your Apple devices.

Let icloudpd sync all your photos. It will download your photos to the specified directory.

Additional Options

To download specific albums:

icloudpd --directory /mnt/backup_photos --username your_apple_id --album "Album Name"
        

To sync automatically:

Add icloudpd to a cron job for regular backups.

Download Metadata (XMP File)

To download albums with metadata, include the --xmp-sidecar option:

icloudpd --username your_apple_id --directory /mnt/backup_photos --album "Album Name" --xmp-sidecar
    

Delete photo in album from icloud after downloading

--delete-after-download flag requires downloading the photos first before they are deleted from iCloud --delete-after-download option:

icloudpd --album "Album Name" --delete-after-download --directory /path/to/temp/directory
    

Sample Script

#!/bin/bash

# Set your iCloud username
username="example@icloud.com"

# Set the download directory
download_directory="/your-directory-path"

# List of album names to download
albums=(
  "Vacation_2025"
  "Family_Birthday_2024"
  "New_Year_Celebrations"
)

for album in "${albums[@]}"; do
    echo "Creating directory for album: $album"
    
    # Create a folder for each album
    album_directory="$download_directory/$album"
    mkdir -p "$album_directory"
    
    # Download the album with metadata (XMP sidecar)
    echo "Downloading album: $album"
    icloudpd --username "$username" --directory "$album_directory" --album "$album" --xmp-sidecar
    
    echo "Downloaded album: $album"
done

echo "Download completed!"
    

Comments

Related Posts

Scrum Roles (Scrum Master, Product owner, Development Team) and collaboration between each other

MySpace Tries to Recapture the social-networking magic...

First GNOME Census Results

Efficient Duplicate Image Removal: Using ImageDeDup Python