Skip to main content

Tool to migrate Photoprism library and albums to Immich

Project description

PyPI Downloads

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 and migrate-favorites features draws heavy inspiration from ppim-migrator by user v411e

Usage

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

Tool to manage Photoprism library with Immich.

positional arguments:
  {migrate-library,migrate-album,migrate-favorites}
                        Sub-command to execute
    migrate-library     Migrate Photoprism library and albums to Immich.
    migrate-album       Migrate a specific album to Immich.
    migrate-favorites   Migrate favorite photos 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

Usage

Example command for migrating library:

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

IMPORTANT: if you want to import albums and favorites, first change the default Immich path library from /YYYY/MM/DD to /YYYY/MM

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

Example command for migrating favorites:

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

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.4.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

photoprism2immich-0.4.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for photoprism2immich-0.4.1.tar.gz
Algorithm Hash digest
SHA256 45d7d8bf69ab07a29ad3f3736beac645a3538530aef1c001d82ab1d7f2855109
MD5 643a0a6c5492dc970efc7642ce84fa04
BLAKE2b-256 43097dcf6751d13fe48cf3f4bc447dab0a78dc96deda536874e550a70f7ff4ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for photoprism2immich-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 00bd04bc4257fff2d8eb80eec31bd10089905847358f9b5f7631e4558e0c8fd8
MD5 adf200bcd829a5c0340f9a19e8e02b8d
BLAKE2b-256 500d38b9c0837bc4f450eac2f3e064005e91d0756e3624474a766fe30e0a1486

See more details on using hashes here.

Supported by

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