Skip to content

Instantly share code, notes, and snippets.

@outadoc
outadoc / CountryCode.kt
Created February 26, 2021 17:48
Country code to Unicode flag emoji in Kotlin
/**
* Converts an ISO 3166-1 alpha-2 country code to the corresponding Unicode flag emoji.
*
* ```
* "FR".countryCodeToUnicodeFlag() // 🇫🇷
* "US".countryCodeToUnicodeFlag() // 🇺🇸
* ```
*/
fun String.countryCodeToUnicodeFlag(): String {
return this
@outadoc
outadoc / main.py
Created September 3, 2023 21:29
Import your Google Photos albums to your existing Immich library
import requests
import json
import pathlib
"""
This script is designed to import your Google Photos albums into Immich.
It expects:
- A directory containing all your Google Photos albums, exported from Google Takeout. Each album should be a directory, and each photo should be a file inside that directory.
- Your photos should ALREADY be uploaded to Immich. This script will not upload them for you, it will only try to find them in your library to add them to existing or new albums.