Skip to main content

4 posts tagged with "Modules"

View All Tags

Work with the Immich API from Powershell

· 2 min read
Hannes Palmquist
Senior Consultant Cloud

I've put together a new powershell module which allows you to work with the Immich API. With the API easily accessible you can now write automations for your image gallery. The module has approx 85% API coverage where the remaining 15% is mainly used by the Immich Web application and or mobile app.

You can manage users, assets, albums, libraries, partners, api-keys, activities, configuration, start jobs, sharing links, tags etc.

You can build quite powerful automations for your image gallery, some examples;

  • Automatically create and update albums based on folder structure, exif metadata like tags/keywords
    • For instance, I have a filewatcher script that monitors my on-disk image library, if an image is written/modified on disk, the image keywordw is retrieved with exiftool and if the image has a keyword beginning with "Album_*" it extract the album name, makes sure the album exist in Immich and then makes sure the image is a member of that album. With this script I can update keywords in an external application (in my case Adobe Lightroom) and have those changes reflected in Immich. I plan on publishing a blog post with more details about this setup.
  • Download/Upload assets
  • Hide/Trash/Favorite assets
  • Manage album/asset sharing
  • With a filewatcher you can instruct Immich to refresh thumbnails and/or metadata for an external asset when it is updated/changed.
Install-Module PSImmich -Scope CurrentUser

PSImmich Module Docs

Announcing PSPortainer Powershell Module

· One min read
Hannes Palmquist
Senior Consultant Cloud

Some time ago I wanted to automate a process where I needed check status of a few docker containers managed with Portainer and noticed that there was no powershell module available on the gallery for portainer. A couple of minutes later I had discovered the Portainer Rest API and though that it could be a fun project to provide powershell users with the ability to manage their Portainer and Docker instances with powershell.

So here it is, an early pre-release/work in progress powershell module for Portainer, PSPortainer

If you want to contribute to the project it is publically available on GitHub here

To get started, visit the docs for the module at getps.dev or start exploring directly by installing the module from PSGallery

Install-Module PSPortainer -Scope CurrentUser

Introducing PSQueue

· One min read
Hannes Palmquist
Senior Consultant Cloud

Recently I developed a tool that utilizes the .NET class system.collections.queue. The function runs continously and produces workitems that should be processed in sequence and in the same order they were added. One simple way to acheive this is to use the collection queue. This class provides a simple way to add items to the queue and retrieve the oldest item when needed.

For fun I wanted to create a wrapper for the queue class so that it can be used in a powershell style syntax. Additionally i missed functionality to see the rate and velocity that items were added and removed to the queue.

Queue objects created with this module contains metrics for count of added and removed items, rate of added and removed items and velocity.

Repo
Docs
PowerShell Gallery