logoalt Hacker News

mmh0000yesterday at 8:24 PM1 replyview on HN

I run this periodically from a little shell script; I "should" automate it, but time is scarce.

  ⟩ cat ~/bin/icloud_download
  #!/bin/bash
  mkdir "$(pwd)"/{photos,cookies} 2> /dev/null
  
  if [[ -z "${ICLOUD_USERNAME}" ]]; then
      echo "need env ICLOUD_USERNAME"
      exit 1
  fi
  if [[ -z "${ICLOUD_PASSWORD}" ]]; then
      echo "need env ICLOUD_PASSWORD"
      exit 1
  fi
  
  podman container run -it --rm --name icloud \
      -v $(pwd)/photos:/data \
      -v $(pwd)/cookies:/cookies \
      -e TZ=America/Boise \
      icloudpd/icloudpd:latest \
      icloudpd --directory /data \
      --cookie-directory /cookies \
      --folder-structure {:%Y/%Y-%m-%d} \
      --username "${ICLOUD_USERNAME}" \
      --password "${ICLOUD_PASSWORD}" \
      --size original

Replies

koolbayesterday at 8:36 PM

> icloudpd/icloudpd:latest

Passing your raw iCloud creds into the unverified latest tag is fine until it’s not. Better to pin to a specific tag or hash.

show 1 reply