Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,37 @@ jobs:
path: |
dist/icloud*
build_linux_snap:
name: Build snap
strategy:
matrix:
include:
- os: ubuntu-24.04
- os: ubuntu-24.04-arm
runs-on: ${{ matrix.os }}
steps:
- name: Check out the code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup LXD
uses: canonical/setup-lxd@v0.1.3

- name: Setup Snapcraft
run: sudo snap install --classic snapcraft

- name: Build snap
run: snapcraft --verbose

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: icloudpd-snap
if-no-files-found: error
path: |
*.snap
clone_src_whl:
runs-on: ubuntu-22.04
needs:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/promote-snap-candidate-to-stable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Promote Snap (candidate -> stable)

on:
workflow_dispatch:

jobs:
promote:
runs-on: ubuntu-latest
steps:
- name: Promote snap to stable
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_TOKEN }}
run: |
sudo snap install --classic snapcraft
snapcraft promote icloudpd --from-channel latest/candidate --to-channel latest/stable --yes
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,27 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python3 -m twine upload --non-interactive --disable-progress-bar dist/*.whl

snap:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download artifacts (snap)
uses: actions/download-artifact@v4
with:
name: icloudpd-snap

- name: Setup Snapcraft
run: sudo snap install --classic snapcraft

- name: Release snap
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_TOKEN }}
run: |
snapcraft upload icloudpd_*.snap --release latest/candidate

gh_release:
runs-on: ubuntu-22.04
steps:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# iCloud Photos Downloader [![Quality Checks](https://github.com/icloud-photos-downloader/icloud_photos_downloader/workflows/Quality%20Checks/badge.svg)](https://github.com/icloud-photos-downloader/icloud_photos_downloader/actions/workflows/quality-checks.yml) [![Build and Package](https://github.com/icloud-photos-downloader/icloud_photos_downloader/workflows/Produce%20Artifacts/badge.svg)](https://github.com/icloud-photos-downloader/icloud_photos_downloader/actions/workflows/produce-artifacts.yml) [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
# iCloud Photos Downloader [![Quality Checks](https://github.com/icloud-photos-downloader/icloud_photos_downloader/workflows/Quality%20Checks/badge.svg)](https://github.com/icloud-photos-downloader/icloud_photos_downloader/actions/workflows/quality-checks.yml) [![Build and Package](https://github.com/icloud-photos-downloader/icloud_photos_downloader/workflows/Produce%20Artifacts/badge.svg)](https://github.com/icloud-photos-downloader/icloud_photos_downloader/actions/workflows/produce-artifacts.yml) [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Snap Store](https://snapcraft.io/icloudpd/badge.svg)](https://snapcraft.io/icloudpd)

- A command-line tool to download all your iCloud photos.
- Works on Linux, Windows, and macOS; laptop, desktop, and NAS
Expand All @@ -21,7 +21,7 @@ To make iCloud Photo Downloader work, ensure the iCloud account is configured wi

There are three ways to run `icloudpd`:
1. Download executable for your platform from the GitHub [Release](https://github.com/icloud-photos-downloader/icloud_photos_downloader/releases/tag/v1.29.2) and run it
1. Use package manager to install, update, and, in some cases, run ([Docker](https://icloud-photos-downloader.github.io/icloud_photos_downloader/install.html#docker), [PyPI](https://icloud-photos-downloader.github.io/icloud_photos_downloader/install.html#pypi), [AUR](https://icloud-photos-downloader.github.io/icloud_photos_downloader/install.html#aur), [npm](https://icloud-photos-downloader.github.io/icloud_photos_downloader/install.html#npm))
1. Use package manager to install, update, and, in some cases, run ([Docker](https://icloud-photos-downloader.github.io/icloud_photos_downloader/install.html#docker), [PyPI](https://icloud-photos-downloader.github.io/icloud_photos_downloader/install.html#pypi), [AUR](https://icloud-photos-downloader.github.io/icloud_photos_downloader/install.html#aur), [npm](https://icloud-photos-downloader.github.io/icloud_photos_downloader/install.html#npm), [Snap Store](https://icloud-photos-downloader.github.io/icloud_photos_downloader/install.html#snap))
1. Build and run from the source

See [Documentation](https://icloud-photos-downloader.github.io/icloud_photos_downloader/install.html) for more details
Expand Down
15 changes: 15 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,21 @@ yay -S icloudpd-bin
npx --yes icloudpd --directory /data --username my@email.address --watch-with-interval 3600
```

(snap)=
## Snap Package

Snap packages can be installed on any Linux distribution where `snapd` in available. Ubuntu ships with `snapd` by default.

```bash
# Install the package
sudo snap install icloudpd
# Optionally allow access to removable media/drives. By default the snap
# can only access files in your home directory.
sudo snap connect icloudpd:removable-media
```

See the package [on the Snap Store](https://snapcraft.io/icloudpd).

## macOS binary

`icloudpd` is available as Intel 64bit binary for macOS, but works on ARM macs too (M1, M2, M3).
Expand Down
58 changes: 58 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: icloudpd
title: iCloud Photo Downloader
adopt-info: icloudpd
license: Apache-2.0
base: core24
summary: A command-line tool to download photos from iCloud
description: |
A command-line tool to download photos from iCloud

- Three modes of operation:
- Copy - download new photos from iCloud (default mode)
- Sync - download new photos from iCloud and delete local files that were removed in iCloud (--auto-delete option)
- Move - download new photos from iCloud and delete photos in iCloud (--keep-icloud-recent-days option)
- Support for Live Photos (image and video as separate files) and RAW images (including RAW+JPEG)
- Automatic de-duplication of photos with the same name
- One time download and an option to monitor for iCloud changes continuously (--watch-with-interval option)
- Optimizations for incremental runs (--until-found and --recent options)
- Photo metadata (EXIF) updates (--set-exif-datetime option)
- ...and many more (use --help option to get full list)

website: https://github.com/icloud-photos-downloader/icloud_photos_downloader
contact: https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues
issues: https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues
source-code: https://github.com/icloud-photos-downloader/icloud_photos_downloader

grade: stable
confinement: strict
compression: lzo

platforms:
amd64:
arm64:

apps:
icloudpd:
command: bin/icloudpd
plugs:
- home
- network
- network-bind
- removable-media
- shmem

parts:
icloudpd:
plugin: python
source: https://github.com/icloud-photos-downloader/icloud_photos_downloader
source-tag: v$SNAPCRAFT_PROJECT_VERSION
source-type: git
override-build: |
craftctl default
# Set the version of the snap from the pyproject.toml file.
craftctl set-version "$(cat pyproject.toml | grep -Po '^version="\K[^"]+')"

plugs:
shmem:
interface: shared-memory
private: true