Skip to main content

Tool to migrate Photoprism library and albums to Immich

Project description

photoprism2immich

photoprism2immich is a tool to migrate media libraries and albums from Photoprism to Immich. The tools scan the original photoprism files folders and upload all the images and videos on Immich using API calls. It also query Photoprism API to retrieve albums photo and create the albums on Immich.

It has a built-in feature for skipping already uploaded files and albums in case something goes wrong during upload, avoiding duplicates.

The migrate-album feature draws heavy inspiration from ppim-migrator by user v411e

Usage

(photoprism-env) root@localhost:/photoprism2immich# photoprism2immich -h
usage: photoprism2immich [-h] {migrate-library,migrate-album} ...

Tool to manage Photoprism library with Immich.

positional arguments:
  {migrate-library,migrate-album}
                        Sub-command to execute
    migrate-library     Migrate Photoprism library to Immich.
    migrate-album       Migrate a specific album to Immich.

options:
  -h, --help            show this help message and exit

migrate-library help:

(photoprism-env) root@pve:/localhost# photoprism2immich migrate-library -h
usage: photoprism2immich migrate-library [-h] --apikey APIKEY --baseapiurl BASEAPIURL --originals ORIGINALS [-l LOG]

options:
  -h, --help            show this help message and exit
  --apikey APIKEY       API key for Immich server
  --baseapiurl BASEAPIURL
                        Base URL of the Immich server
  --originals ORIGINALS
                        Path to the originals folder
  -l LOG, --log LOG     Path to the log file

migrate-album help:

(photoprism-env) root@pve:/localhost# photoprism2immich migrate-album -h
usage: photoprism2immich migrate-album [-h] --photoprism_url PHOTOPRISM_URL --photoprism_user PHOTOPRISM_USER --photoprism_password PHOTOPRISM_PASSWORD
                                       --immich_url IMMICH_URL --immich_api IMMICH_API [--album ALBUM] [-l LOG]

options:
  -h, --help            show this help message and exit
  --photoprism_url PHOTOPRISM_URL
                        URL of the Photoprism server
  --photoprism_user PHOTOPRISM_USER
                        Username for Photoprism
  --photoprism_password PHOTOPRISM_PASSWORD
                        Password for Photoprism
  --immich_url IMMICH_URL
                        Base URL of the Immich server
  --immich_api IMMICH_API
                        API key for Immich server
  --album ALBUM         Specific album to migrate
  -l LOG, --log LOG     Path to the log file

Installation

pip install photoprism2immich

Example command for migrating library:

photoprism2immich migrate-library --apikey "aaaaaaaaaaaaaa" --baseapiurl "http://immich.local:2283/api" --originals "/photoprism-originals"

Example command for migrating ALL albums (if you want to migrate one album only specify here):

photoprism2immich migrate-album --photoprism_url="http://photoprism.local:20800/" --photoprism_user="user" --photoprism_password="password" --immich_url="http://immich.local:2283" --immich_api="aaaaaaaaaaaaaa" --album ALL

Build yourself

Clone the repo

git clone https://github.com/giuliolibrando/photoprism2immich.git

enter into the folder

cd photoprism2immich

source the virtualenv

source photoprism-env/bin/activate

install via pip

pip install .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

photoprism2immich-0.2.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

photoprism2immich-0.2.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file photoprism2immich-0.2.0.tar.gz.

File metadata

  • Download URL: photoprism2immich-0.2.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for photoprism2immich-0.2.0.tar.gz
Algorithm Hash digest
SHA256 95ff89b7634e57e01955a32e9f85ae945172d606385e26e3dcad4bf64e86d351
MD5 6e9a96eeca79681c21cbed52a2595dc6
BLAKE2b-256 fc453f9792a7370674938f77d5624253981512d96bed06fddcb14fd7fd1edfb7

See more details on using hashes here.

File details

Details for the file photoprism2immich-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for photoprism2immich-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63a819345f847736226e40aa0c58feb6549c4be5551842b1aca9162b645d3502
MD5 ceb4beb7f3aba08f82813ca16f67dd3c
BLAKE2b-256 fe7533f68e83dc9ff41c75a7b247885115fd2fdaec0d0ae9ee3745e0741a8c42

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page