Giter Site home page Giter Site logo

immich_autoalbum's Introduction

immchiAutoAlbum

Desciption

This Python script is designed to emulate the smart albums from Google Photos for Immich. This will aggregate "people" in an album automatically.

Configuration

The config.json.example file contains the following settings:

  • isFirtsRun: This setting processes all images and adds them to the album; if set to false, only the last 100 pictures are processed.
  • accounts: this will be the list of accounts to contribute to the album, each user that uses the app and will contribute to an album is required to generate an API key that will be used to add the photos to the shared album
  • accoutnName: name of the account, not used for logic just for information
  • apiKey: user account API key, follow this instructions of how to generate one
  • url: URL to the you immich instance in the following format: somelocation.com/api. example: http://127.0.0.1:3001/api
  • albuns: this will contain the list of albuns that the current account will contribute with photos
  • id: album ID, this can be seen in the URL when you open a album, example: bbdf5884-925a-40eb-bc4e-ac66a186c82f
  • name: name of the album, not used for logic just for information
  • persons: the list of people that the user has in his account and wants to add to the album
  • id: "people" id, this can be seen in the URL when you open a "people". example: 9cdaf954-9f92-43a8-b79d-4a4f71640db3
  • name: name of the person, not used for logic just for information

How To setup

  1. Create a album that you whant to use as the "Smart album" and share it with all the users that should contribute to it.
  2. On each user account generate an API key and add that account to the config.
  3. for each account added add the album with the correct album ID to the albuns configuration. you can add any amount of albuns
  4. for each album added add the people id from that account to the persons configuration. You can add any amount of people to each album
  5. repeat this steps for each account that you want.

How To run

Run directly

  1. Make sure you have Python installed on your system.

  2. Update the configuration in the 'config.json' file with your desired settings.

  3. Run the script using the following command:

    python ImmichAutoAlbum.py

Run Using Docker:

  1. Update the crontab file with the desired interval for checking the Media, this file will be used by the container to schedule the actions. The current configuration will check every day at midnight:

    0 0 * * * /usr/local/bin/python3 /app/ImmichAutoAlbum.py > /proc/1/fd/1 2>/proc/1/fd/2 
  2. Build the Docker image:

    docker build -t immich_auto_album .
  3. Run the Docker container:

    docker run -d --name immich_auto_album immich_auto_album

immich_autoalbum's People

Contributors

rick45 avatar

Stargazers

Harshit Sanghvi avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.