Skip to content

alvistar/immich-albums

Repository files navigation

Immich Albums

Overview

Immich Albums is a tool designed to create albums in Immich from a folder structure. Assets needs to be loaded as external library in Immich then you can launch script to create albums.

Getting Started

Prerequisites

Installation

  1. Clone the repository:
    git clone https://github.com/alvistar/immich-albums.git
  2. Navigate to the project directory:
     cd immich-albums
  3. Install dependencies:
  4.  poetry install
  5. Activate virtual environment:
     poetry shell
  6. Test installation:
     im --help

Usage

You can get help of various args by running:

im --help

The following are required arguments:

  • --api_key - Immich API key
  • --api_host - Immich API host. Example: https://localhost:22283/api
  • --original_path - Path to local albums
  • --replace_path - Path as seen by Immich host

Original path is the path to your local albums. If for example your albums are stored in /home/user/albums and you mounted that path under docker as /mnt/albums you need to pass /home/user/albums as --original-path and /mnt/albums as --replace-path.

Note

Api host should be the API endpoint of your Immich instance.

Example: https://localhost:22283/api

cd /home/user/albums
im --api-key YOUR_API_KEY --api-host YOUR_API_HOST --original-path /home/user/albums --replace-path /mnt/albums .

Instead of passing every argument you can create a config file in yaml format. Default config file name is config.yaml and it should be placed in your home directory under ".config/immich-albums/config.yml"

Example config file:

api_key: YOUR_API_KEY
api_host: YOUR_API_HOST
original_path: /path/to/local/albums
replace_path: /path/as/seen/by/immich

Note

Take care of the underscore. It should be api_key and not api-key.

Alternatively you can pass config file path as argument:

im --config /path/to/config/file

Updating openapi client:

openapi-generator-cli generate -g python -o generated/openapi_client -i immich-openapi-specs.json -p packageVersion=1.105.1
poetry lock --no-update

Contributing

Contributions to Immich Albums are welcome!

License

This project is licensed under the MIT license - see the LICENSE.txt file for details.

Acknowledgements

Big thanks to Immich for the incredible job!

About

Create immich albums from folder structure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published