### Run Docker Desktop Installer Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-docker/install-docker-windows.md Starts the downloaded Docker Desktop installer and waits for it to complete. Follow the on-screen prompts for configuration. ```powershell Start-Process ".\DockerDesktopInstaller.exe" -Wait ``` -------------------------------- ### Install Docker Desktop via Homebrew Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-docker/install-docker-macos.md Use this command to install Docker Desktop if you have Homebrew installed. After installation, launch Docker Desktop. ```bash brew install --cask docker ``` -------------------------------- ### Test Docker Installation Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-docker/install-docker-linux.md Runs a 'hello-world' container to verify that Docker is installed and running correctly. A welcome message indicates success. ```bash sudo docker run hello-world ``` -------------------------------- ### Install Git on Windows via PowerShell Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-git/install-git.md Installs Git on Windows by downloading the latest 64-bit installer, running it silently, and verifying the installation. ```powershell Invoke-WebRequest -Uri "https://github.com/git-for-windows/git/releases/latest/download/Git-64-bit.exe" -OutFile "$env:TEMP\Git-Installer.exe" Start-Process -FilePath "$env:TEMP\Git-Installer.exe" -ArgumentList "/VERYSILENT" -Wait git --version ``` -------------------------------- ### Synology Photos Configuration Example Source: https://github.com/jaimetur/photomigrator/blob/main/help/5-synology-photos.md Example configuration file for connecting to Synology Photos. Ensure the IP address and credentials are set correctly. ```ini # Configuration for Synology Photos [Synology Photos] SYNOLOGY_URL = http://192.168.1.11:5000 # Change this IP by the IP that contains the Synology server or by your valid Synology URL SYNOLOGY_USERNAME_1 = username_1 # Account 1: Your username for Synology Photos SYNOLOGY_PASSWORD_1 = password_1 # Account 1: Your password for Synology Photos SYNOLOGY_USERNAME_2 = username_2 # Account 2: Your username for Synology Photos SYNOLOGY_PASSWORD_2 = password_2 # Account 2: Your password for Synology Photos SYNOLOGY_USERNAME_3 = username_3 # Account 3: Your username for Synology Photos SYNOLOGY_PASSWORD_3 = password_3 # Account 3: Your password for Synology Photos ``` -------------------------------- ### Example: Show Help (Windows) Source: https://github.com/jaimetur/photomigrator/blob/main/help/execution/execution-from-docker.md Runs the Docker container on Windows (PowerShell) to display the command-line help. ```bash docker run -it --rm -v "${PWD}:/docker" -e TZ=Europe/Madrid jaimetur/photomigrator:latest -h ``` -------------------------------- ### Example: Show Help (Linux/macOS) Source: https://github.com/jaimetur/photomigrator/blob/main/help/execution/execution-from-docker.md Runs the Docker container on Linux/macOS to display the command-line help. ```bash docker run -it --rm -v "$(pwd)":/docker -e TZ=Europe/Madrid jaimetur/photomigrator:latest -h ``` -------------------------------- ### Basic Filtering Examples Source: https://github.com/jaimetur/photomigrator/blob/main/help/2-arguments-description-short.md These examples demonstrate how to filter migrated photos by date range or file type, and set the log level. ```bash PhotoMigrator.run --input-folder=/mnt/import --output-folder=/mnt/export ``` ```bash PhotoMigrator.run --filter-from-date=2022-01-01 --filter-to-date=2022-12-31 ``` ```bash PhotoMigrator.run --filter-by-type=video --log-level=debug ``` -------------------------------- ### Example: Show Help (Linux/macOS) Source: https://github.com/jaimetur/photomigrator/blob/main/help/execution/execution-from-docker.md Run the PhotoMigrator script with the -h option to display command-line help. ```bash ./PhotoMigrator.sh -h ``` -------------------------------- ### Enable WSL 2 Support Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-docker/install-docker-windows.md Installs the Windows Subsystem for Linux version 2, which is a prerequisite for Docker Desktop's WSL 2 backend. This command simplifies the WSL 2 setup process. ```powershell wsl --install ``` -------------------------------- ### Enable Docker to Start on Boot Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-docker/install-docker-linux.md Configures the Docker service to start automatically when the system boots up. ```bash sudo systemctl enable docker ``` -------------------------------- ### Immich Photos Configuration File Example Source: https://github.com/jaimetur/photomigrator/blob/main/help/6-immich-photos.md Example of the 'Config.ini' file format for Immich Photos, showing how to set up server URL and API keys or user credentials for multiple accounts. ```ini # Configuration for Immich Photos [Immich Photos] IMMICH_URL = http://192.168.1.11:2283 # Change this IP by the IP that contains the Immich server or by your valid Immich URL IMMICH_API_KEY_ADMIN = YOUR_ADMIN_API_KEY # Your ADMIN_API_KEY for Immich Photos (Your can create can API_KEY in your Account Settings-->API_KEY Keys) IMMICH_API_KEY_USER_1 = API_KEY_USER_1 # Account 1: Your USER_API_KEY for Immich Photos (Your can create can API_KEY in your Account Settings-->API_KEY Keys) IMMICH_USERNAME_1 = username_1 # Account 1: Your username for Immich Photos (mandatory if not API_KEY is providen) IMMICH_PASSWORD_1 = password_1 # Account 1: Your password for Immich Photos (mandatory if not API_KEY is providen) IMMICH_API_KEY_USER_2 = API_KEY_USER_2 # Account 2: Your USER_API_KEY for Immich Photos (Your can create can API_KEY in your Account Settings-->API_KEY Keys) IMMICH_USERNAME_2 = username_2 # Account 2: Your username for Immich Photos (mandatory if not API_KEY is providen) IMMICH_PASSWORD_2 = password_2 # Account 2: Your password for Immich Photos (mandatory if not API_KEY is providen) IMMICH_API_KEY_USER_3 = API_KEY_USER_3 # Account 3: Your USER_API_KEY for Immich Photos (Your can create can API_KEY in your Account Settings-->API_KEY Keys) IMMICH_USERNAME_3 = username_3 # Account 3: Your username for Immich Photos (mandatory if not API_KEY is providen) IMMICH_PASSWORD_3 = password_3 # Account 3: Your password for Immich Photos (mandatory if not API_KEY is providen) ``` -------------------------------- ### Example Google Photos OAuth Credentials Source: https://github.com/jaimetur/photomigrator/blob/main/help/8-google-photos.md An example of how to populate the `Config.ini` file with actual Google Photos OAuth credentials. Replace placeholders with your generated values. ```ini [Google Photos] GOOGLE_PHOTOS_CLIENT_ID_1 = 1234567890-abcdefg.apps.googleusercontent.com GOOGLE_PHOTOS_CLIENT_SECRET_1 = GOCSPX-xxxxxxxxxxxxxxxx GOOGLE_PHOTOS_REFRESH_TOKEN_1 = 1//0gxxxxxxxxxxxxxxxxxxxxxxxxxxxx ``` -------------------------------- ### Example: Run with Sudo (Linux/macOS) Source: https://github.com/jaimetur/photomigrator/blob/main/help/execution/execution-from-docker.md If system elevation is required, run the PhotoMigrator script using sudo. ```bash sudo ./PhotoMigrator.sh -h ``` -------------------------------- ### Docker Configuration Example (`docker.conf`) Source: https://github.com/jaimetur/photomigrator/blob/main/help/execution/execution-from-docker.md Configure the Docker container's release tag and time zone in the `docker.conf` file. ```ini # Configuration file for the Docker container RELEASE_TAG=latest # Set the RELEASE_TAG for the image that you want to pull and launch in Docker container (latest-stable: for the latest-stable version, latest: for the latest betas, or any other version) TZ=Europe/Madrid # Set the Time Zone for the Docker container (Important to see correct Timestamps in Logs and files/folder suffix) ``` -------------------------------- ### Run PhotoMigrator from Installed Package Source: https://github.com/jaimetur/photomigrator/blob/main/help/execution/execution-from-source.md Execute the PhotoMigrator tool using its installed package name to display help information. ```bash photomigrator -h ``` -------------------------------- ### Example: Show Help with sudo (Linux/macOS) Source: https://github.com/jaimetur/photomigrator/blob/main/help/execution/execution-from-docker.md Runs the Docker container with sudo on Linux/macOS to display command-line help, required if system elevation is needed. ```bash sudo docker run -it --rm -v "$(pwd)":/docker -e TZ=Europe/Madrid jaimetur/photomigrator:latest -h ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/jaimetur/photomigrator/blob/main/help/execution/execution-from-source.md Install the required packages for PhotoMigrator from the requirements file and the project itself in editable mode. ```bash pip install -r requirements.txt pip install -e . ``` -------------------------------- ### Verify Docker Installation Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-docker/install-docker-macos.md Run this command to check the installed Docker version and confirm the installation was successful. ```bash docker --version ``` -------------------------------- ### Install Docker Engine Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-docker/install-docker-linux.md Installs Docker Engine, the command-line interface (CLI), containerd.io, and the Docker Compose plugin. ```bash sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin ``` -------------------------------- ### Example: Automated Migration (Linux/macOS) Source: https://github.com/jaimetur/photomigrator/blob/main/help/execution/execution-from-docker.md Execute the PhotoMigrator script to perform an automated migration, specifying source and target directories. ```bash ./PhotoMigrator.sh --source=./MyTakeout --target=immich-photos ``` -------------------------------- ### Install Required Packages Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-docker/install-docker-linux.md Installs necessary packages for Docker installation, including ca-certificates, curl, gnupg, and lsb-release. ```bash sudo apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release ``` -------------------------------- ### Install Git on Arch Linux Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-git/install-git.md Installs Git on Arch Linux using the pacman package manager. ```bash sudo pacman -S git ``` -------------------------------- ### Example: Automated Migration (Linux/macOS) Source: https://github.com/jaimetur/photomigrator/blob/main/help/execution/execution-from-docker.md Runs the Docker container on Linux/macOS to perform an automated migration with specified source and target directories. ```bash docker run -it --rm -v "$(pwd)":/docker -e TZ=Europe/Madrid jaimetur/photomigrator:latest --source=./MyTakeout --target=immich-photos ``` -------------------------------- ### Test Docker Installation Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-docker/install-docker-macos.md Execute this command to run a test container and verify that Docker is functioning correctly. ```bash docker run hello-world ``` -------------------------------- ### Download Docker Desktop Installer Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-docker/install-docker-windows.md Downloads the latest Docker Desktop installer for Windows using PowerShell. Ensure you have administrative privileges. ```powershell Invoke-WebRequest -UseBasicParsing -OutFile "DockerDesktopInstaller.exe" -Uri "https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe" ``` -------------------------------- ### Install Git on Fedora Linux Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-git/install-git.md Installs Git on Fedora Linux using the dnf package manager. ```bash sudo dnf install git ``` -------------------------------- ### Process input folder, fix metadata, and save to output folder Source: https://github.com/jaimetur/photomigrator/blob/main/help/2-arguments-description-short.md This example shows basic input and output folder configuration for processing and fixing metadata. ```bash PhotoMigrator.run --input-folder=/mnt/import --output-folder=/mnt/export ``` -------------------------------- ### Example: Automated Migration (Windows) Source: https://github.com/jaimetur/photomigrator/blob/main/help/execution/execution-from-docker.md Runs the Docker container on Windows (PowerShell) to perform an automated migration with specified source and target directories. ```bash docker run -it --rm -v "${PWD}:/docker" -e TZ=Europe/Madrid jaimetur/photomigrator:latest --source=./MyTakeout --target=immich-photos ``` -------------------------------- ### Google Photos Configuration Example Source: https://github.com/jaimetur/photomigrator/blob/main/help/0-configuration-file.md Set up authentication details for multiple Google Photos accounts. This includes account names, OAuth client IDs, client secrets, and refresh tokens required for API access. ```ini # Configuration for Google Photos [Google Photos] GOOGLE_PHOTOS_ACCOUNT_NAME_1 = username_1 # Optional display label for Google Photos account 1 GOOGLE_PHOTOS_CLIENT_ID_1 = client_id_1 # OAuth Client ID for Google Photos account 1 GOOGLE_PHOTOS_CLIENT_SECRET_1 = client_secret_1 # OAuth Client Secret for Google Photos account 1 GOOGLE_PHOTOS_REFRESH_TOKEN_1 = refresh_token_1 # OAuth Refresh Token for Google Photos account 1 GOOGLE_PHOTOS_ACCOUNT_NAME_2 = username_2 # Optional display label for Google Photos account 2 GOOGLE_PHOTOS_CLIENT_ID_2 = client_id_2 # OAuth Client ID for Google Photos account 2 GOOGLE_PHOTOS_CLIENT_SECRET_2 = client_secret_2 # OAuth Client Secret for Google Photos account 2 GOOGLE_PHOTOS_REFRESH_TOKEN_2 = refresh_token_2 # OAuth Refresh Token for Google Photos account 2 GOOGLE_PHOTOS_ACCOUNT_NAME_3 = username_3 # Optional display label for Google Photos account 3 GOOGLE_PHOTOS_CLIENT_ID_3 = client_id_3 # OAuth Client ID for Google Photos account 3 GOOGLE_PHOTOS_CLIENT_SECRET_3 = client_secret_3 # OAuth Client Secret for Google Photos account 3 GOOGLE_PHOTOS_REFRESH_TOKEN_3 = refresh_token_3 # OAuth Refresh Token for Google Photos account 3 ``` -------------------------------- ### Automatic Migration Process Examples Source: https://github.com/jaimetur/photomigrator/blob/main/help/2-arguments-description-short.md Examples for the automatic migration process, specifying source and target services or local paths. You can also control whether to move or copy assets and enable/disable the dashboard and parallel migration. ```bash PhotoMigrator.run --source=immich-1 --target=synology-2 ``` ```bash PhotoMigrator.run --source="/home/user/Takeout" --target="/mnt/photos" --move-assets true ``` ```bash PhotoMigrator.run --source=immich-1 --target=synology-2 --dashboard false --parallel-migration false ``` -------------------------------- ### Unzip Docker Package (Linux/macOS) Source: https://github.com/jaimetur/photomigrator/blob/main/help/execution/execution-from-docker.md Install 7zip if needed, then unzip the downloaded package and navigate to the docker directory. ```bash sudo apt install 7zip 7z x PhotoMigrator_v4.0.0_docker.zip cd PhotoMigrator/docker ``` -------------------------------- ### Launch Docker Desktop Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-docker/install-docker-macos.md After installing Docker Desktop via Homebrew, use this command to launch it from the terminal. ```bash open -a Docker ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/jaimetur/photomigrator/blob/main/CONTRIBUTING.md Install all necessary Python packages for local development using the provided requirements file. This includes the project's core dependencies. ```bash pip install -r requirements.txt ``` -------------------------------- ### Synology/Immich/NextCloud/Google Photos Download Albums Short Args Source: https://github.com/jaimetur/photomigrator/blob/main/help/2-arguments-description.md Download albums using short arguments. Specify the client, comma-separated album names, and the output folder path. This example targets the Immich client. ```bash PhotoMigrator.run -client=immich -dAlb="Vacaciones,Navidad" -o="Backups" ``` -------------------------------- ### Migrate from Synology Photos to Immich Photos Source: https://github.com/jaimetur/photomigrator/blob/main/help/3-automatic-migration.md This example demonstrates migrating photos from Synology Photos to Immich Photos. The tool pulls assets from Synology and pushes them to Immich, recreating albums. ```bash ./PhotoMigrator.run --source=synology-2 --target=immich-1 ``` -------------------------------- ### Migrate from Immich Photos to Immich Photos with Filters Source: https://github.com/jaimetur/photomigrator/blob/main/help/3-automatic-migration.md This example demonstrates migrating photos between two Immich Photos instances with filters for city and person. The tool pulls filtered assets from the source and pushes them to the target, recreating albums. ```bash ./PhotoMigrator.run --source=immich-1 --target=immich-2 --filter-by-city=Rome --filter-by-person=Mery ``` -------------------------------- ### Migrate from Immich Photos to Local Folder with Filters Source: https://github.com/jaimetur/photomigrator/blob/main/help/3-automatic-migration.md This example shows migrating photos from Immich Photos to a local folder, with filters applied for a specific person and date. It creates a structured folder for albums and un-albumed assets. ```bash ./PhotoMigrator.run --source=immich-2 --target=/homes/local_folder --filter-by-person=Peter --filter-from-date=2024 ``` -------------------------------- ### Setup Sidebar for Help Documentation Source: https://github.com/jaimetur/photomigrator/blob/main/src/web_interface/html/doc_view.html Configures the sidebar visibility based on whether the current page is a help document. If it's a help document, the sidebar is shown and help navigation is loaded; otherwise, it's hidden. ```javascript function setupSidebar() { const isHelpDoc = window.location.pathname.startsWith("/docs/view/help"); const layout = document.querySelector(".layout"); const sidebar = document.querySelector(".sidebar"); if (!layout || !sidebar) return; if (!isHelpDoc) { sidebar.classList.add("hidden"); layout.classList.add("layout--no-sidebar"); return; } sidebar.classList.remove("hidden"); layout.classList.remove("layout--no-sidebar"); loadHelpNavigation(); } setupSidebar(); loadDocument(); ``` -------------------------------- ### NextCloud Configuration Example Source: https://github.com/jaimetur/photomigrator/blob/main/help/0-configuration-file.md Configure your NextCloud username, password, and folder paths for asset storage. These settings are essential for connecting to and organizing data within NextCloud. ```ini NEXTCLOUD_USERNAME_3 = username_3 # Account 3: Your username for NextCloud NEXTCLOUD_PASSWORD_3 = password_3 # Account 3: Your password for NextCloud NEXTCLOUD_PHOTOS_FOLDER_3 = /Photos/ALL_Photos # Account 3: Folder used for assets without albums and Download All assets scan NEXTCLOUD_ALBUMS_FOLDER_3 = /Photos/Albums # Account 3: Folder used for folder-based albums ``` -------------------------------- ### Migrate using sequential processing Source: https://github.com/jaimetur/photomigrator/blob/main/help/2-arguments-description-short.md This example shows how to disable parallel migration by setting `--parallel-migration=false`, forcing sequential processing. ```bash PhotoMigrator.run --source=synology-1 --target=immich-1 --parallel-migration=false ``` -------------------------------- ### Google Photos OAuth Credentials Configuration Source: https://github.com/jaimetur/photomigrator/blob/main/help/8-google-photos.md Configuration example for Google Photos OAuth credentials in `Config.ini`. Ensure these values are correctly set up for authentication. ```ini [Google Photos] GOOGLE_PHOTOS_CLIENT_ID_1 = your_client_id_1 GOOGLE_PHOTOS_CLIENT_SECRET_1 = your_client_secret_1 GOOGLE_PHOTOS_REFRESH_TOKEN_1 = your_refresh_token_1 GOOGLE_PHOTOS_CLIENT_ID_2 = your_client_id_2 GOOGLE_PHOTOS_CLIENT_SECRET_2 = your_client_secret_2 GOOGLE_PHOTOS_REFRESH_TOKEN_2 = your_refresh_token_2 GOOGLE_PHOTOS_CLIENT_ID_3 = your_client_id_3 GOOGLE_PHOTOS_CLIENT_SECRET_3 = your_client_secret_3 GOOGLE_PHOTOS_REFRESH_TOKEN_3 = your_refresh_token_3 ``` -------------------------------- ### Migrate from Google Takeout to Synology Photos Source: https://github.com/jaimetur/photomigrator/blob/main/help/3-automatic-migration.md This example shows how to migrate photos from a Google Takeout folder to Synology Photos. The tool will unzip files, fix dates, and recreate Google Photos albums in Synology. ```bash ./PhotoMigrator.run --source=/homes/MyTakeout --target=synology-1 ``` -------------------------------- ### Install Git on Debian/Ubuntu Linux Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-git/install-git.md Installs Git on Debian-based or Ubuntu Linux distributions by updating the package list and then installing the git package. ```bash sudo apt update sudo apt install git git --version ``` -------------------------------- ### Install Git on macOS using Homebrew Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-git/install-git.md Installs Git on macOS using the Homebrew package manager by updating Homebrew and then installing the git package. ```bash brew update brew install git git --version ``` -------------------------------- ### Install Python 3.11 on Debian/Ubuntu Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-python/install-python.md Installs Python 3.11, its virtual environment package, and development headers using apt and a PPA. Updates package lists before installation. ```bash sudo apt update sudo apt install -y software-properties-common sudo add-apt-repository ppa:deadsnakes/ppa -y sudo apt update sudo apt install -y python3.11 python3.11-venv python3.11-dev python3.11 --version ``` -------------------------------- ### Install Git on macOS using Xcode Command Line Tools Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-git/install-git.md Checks if Git is installed on macOS. If not, it prompts the user to install the Xcode Command Line Tools. ```bash git --version ``` -------------------------------- ### Set Up the Docker Repository Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-docker/install-docker-linux.md Configures the Docker repository by creating a sources.list entry. This command dynamically determines the architecture and distribution codename. ```bash echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \ https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null ``` -------------------------------- ### Verify Docker Installation Source: https://github.com/jaimetur/photomigrator/blob/main/README.md Check if Docker and Docker Compose are installed and accessible in your system's PATH. ```bash docker --version docker compose version ``` -------------------------------- ### Start PhotoMigrator Docker Compose Source: https://github.com/jaimetur/photomigrator/blob/main/README.md Commands to pull the latest image and start the PhotoMigrator service in detached mode. ```bash cd docker docker compose pull docker compose up -d ``` -------------------------------- ### Render Folder List and Quick Actions Source: https://github.com/jaimetur/photomigrator/blob/main/src/web_interface/html/index.html This snippet handles the rendering of the folder list and associated quick action buttons (e.g., Home, Create Folder, Remove Selected). It sets up event listeners for user interactions like clicking on folders, selecting them, and performing bulk actions. ```javascript function renderFolderList(path) { try { const data = await getFolderData(path); listEl.innerHTML = ""; const quickActions = document.createElement("div"); quickActions.className = "folder-quick-actions"; const selectAllWrap = document.createElement("label"); selectAllWrap.className = "folder-quick-btn folder-quick-btn--select-all"; const selectAllCheck = document.createElement("input"); selectAllCheck.type = "checkbox"; selectAllCheck.className = "folder-quick-check"; selectAllCheck.checked = data.directories.length > 0 && data.directories.every((dir) => folderSelectionPaths.has(dir.path)); selectAllCheck.addEventListener("click", () => { if (selectAllCheck.checked) { data.directories.forEach((dir) => folderSelectionPaths.add(dir.path)); } else { folderSelectionPaths.clear(); } updateFolderRemoveButtonState(); renderFolderList(data.path); }); const selectAllText = document.createElement("span"); selectAllText.textContent = "All"; selectAllWrap.appendChild(selectAllCheck); selectAllWrap.appendChild(selectAllText); quickActions.appendChild(selectAllWrap); const homeBtn = document.createElement("button"); homeBtn.type = "button"; homeBtn.className = "folder-quick-btn folder-quick-btn--home"; homeBtn.textContent = "Home (data)"; homeBtn.addEventListener("click", () => renderFolderList(getPrimaryRoot())); quickActions.appendChild(homeBtn); const volumesRoot = getSecondaryRoot(); if (volumesRoot !== getPrimaryRoot()) { const homeVolumesBtn = document.createElement("button"); homeVolumesBtn.type = "button"; homeVolumesBtn.className = "folder-quick-btn folder-quick-btn--home"; homeVolumesBtn.textContent = "Home (volumes)"; homeVolumesBtn.addEventListener("click", () => renderFolderList(volumesRoot)); quickActions.appendChild(homeVolumesBtn); } const createBtn = document.createElement("button"); createBtn.type = "button"; createBtn.className = "folder-quick-btn folder-quick-btn--create"; createBtn.textContent = "Create Folder"; createBtn.addEventListener("click", async () => { const name = await askForFolderName(); if (!name) return; try { const created = await createFolder(data.path, name); await renderFolderList(data.path); setFolderCurrentMessage(data.path, `Created: ${created.path}`); } catch (error) { setFolderCurrentMessage(data.path, `Create failed: ${String(error)}`); } }); quickActions.appendChild(createBtn); const removeBtn = document.createElement("button"); removeBtn.type = "button"; removeBtn.id = "folder-remove-selected"; removeBtn.className = "folder-quick-btn folder-quick-btn--remove"; removeBtn.textContent = "Remove Selected"; removeBtn.disabled = folderSelectionPaths.size === 0; removeBtn.addEventListener("click", async () => { const selectedPaths = data.directories .map((dir) => dir.path) .filter((dirPath) => folderSelectionPaths.has(dirPath)); if (selectedPaths.length === 0) return; const confirmed = await askForConfirmation({ title: "Delete Selected Folders?", message: `This will permanently delete ${selectedPaths.length} selected folder(s) and all their contents.`, acceptLabel: "Delete", danger: true }); if (!confirmed) return; try { const result = await removeFolders(selectedPaths); folderSelectionPaths.clear(); folderSelectionLastIndex = null; await renderFolderList(data.path); const failedCount = Array.isArray(result.failed) ? result.failed.length : 0; setFolderCurrentMessage(data.path, `Removed: ${selectedPaths.length - failedCount} | Failed: ${failedCount}`); } catch (error) { await showNoticeDialog({ title: "Delete Failed", message: String(error), closeLabel: "Close" }); } }); quickActions.appendChild(removeBtn); listEl.appendChild(quickActions); if (data.parent) { const upRow = document.createElement("div"); upRow.className = "folder-item-row folder-item-row--up"; const spacer = document.createElement("input"); spacer.type = "checkbox"; spacer.className = "folder-item-check folder-item-check--placeholder"; spacer.disabled = true; spacer.tabIndex = -1; spacer.setAttribute("aria-hidden", "true"); const upBtn = document.createElement("button"); upBtn.type = "button"; upBtn.className = "folder-item folder-item--up-entry"; upBtn.textContent = ".."; upBtn.setAttribute("aria-label", "Go to parent folder"); upBtn.addEventListener("click", () => renderFolderList(data.parent)); upRow.appendChild(spacer); upRow.appendChild(upBtn); listEl.appendChild(upRow); } data.directories.forEach((dir, index) => { const row = document.createElement("div"); row.className = "folder-item-row"; const checked = folderSelectionPaths.has(dir.path); if (checked) row.classList.add("folder-item-row--checked"); const check = document.createElement("input"); check.type = "checkbox"; check.className = "folder-item-check"; check.checked = checked; check.title = "Select folder"; check.setAttribute("aria-label", `Select ${dir.name}`); check.addEventListener("click", (event) => { updateFolderSelectionAtIndex(data.directories, index, check.checked, event.shiftKey); updateFolderPathInput(data.directories); renderFolderList(data.path); }); const btn = document.createElement("button"); btn.type = "button"; btn.className = "folder-item"; btn.textContent = dir.name; btn.addEventListener("click", () => renderFolderList(dir.path)); row.appendChild(check); row.appendChild(btn); listEl.appendChild(row); }); updateFolderRemoveButtonState(); const selectedCountForPath = data.directories.filter((dir) => folderSelectionPaths.has(dir.path)).length; if (selectedCountForPath > 0) { setFolderCurrentMessage(data.path, `Selected: ${selectedCountForPath}`); } } catch (error) { listEl.innerHTML = `
Unable to open path: ${String(error)}
`; setFolderCurrentMessage(path, `Error: ${String(error)}`); } } ``` -------------------------------- ### Install or Upgrade pip Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-python/install-python.md Ensures pip is installed and upgraded for the current Python environment. This command is useful if pip is missing or outdated. ```python python -m ensurepip --upgrade ``` -------------------------------- ### Help Option Source: https://github.com/jaimetur/photomigrator/blob/main/help/1-command-line-interface.md Displays the help message for the PhotoMigrator CLI, showing all available options and their descriptions. ```bash -h ; --help show this help message and exit ``` -------------------------------- ### Configuration File Option Source: https://github.com/jaimetur/photomigrator/blob/main/help/1-command-line-interface.md Specifies a configuration file to set up connections to different Photo Cloud Services. ```bash -config ; --configuration-file Specify the file that contains the Configuration to connect to the different Photo Cloud Services. ``` -------------------------------- ### Find Duplicates Example Source: https://github.com/jaimetur/photomigrator/blob/main/help/9-other-features.md Use the --find-duplicates argument to locate duplicate files within specified folders. This example demonstrates moving duplicates. ```bash ./PhotoMigrator --find-duplicatess move ./Albums ./ALL_PHOTOS move ``` -------------------------------- ### Download All Command Source: https://github.com/jaimetur/photomigrator/blob/main/help/1-command-line-interface.md Download all albums and non-album assets to a specified output folder. Albums are flattened under ./Albums/, and non-album assets are organized by year/month. ```bash --client=synology --download-all ./MyLibrary ``` -------------------------------- ### Process Duplicates Example Source: https://github.com/jaimetur/photomigrator/blob/main/help/9-other-features.md Use the --process-duplicates argument to process a CSV file generated by the 'Find Duplicates' feature. This example shows how to initiate the processing. ```bash ./PhotoMigrator --process-duplicates ./Duplicates/Duplicates_revised.csv ``` -------------------------------- ### Install Python 3.11 on Windows via PowerShell Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-python/install-python.md Installs Python 3.11.7 (64-bit) for all users, adds it to the system PATH, and skips test execution. Requires PowerShell run as Administrator. ```powershell Invoke-WebRequest -Uri "https://www.python.org/ftp/python/3.11.7/python-3.11.7-amd64.exe" -OutFile "$env:TEMP\python-3.11.7-amd64.exe" Start-Process -FilePath "$env:TEMP\python-3.11.7-amd64.exe" -ArgumentList "/quiet InstallAllUsers=1 PrependPath=1 Include_test=0" -Wait python --version ``` -------------------------------- ### Install Python 3.11 on macOS with Homebrew Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-python/install-python.md Installs Python version 3.11 using Homebrew, overwrites existing links, and forces the link to ensure it's the active version. Updates Homebrew first. ```bash brew update brew install python@3.11 brew link --overwrite python@3.11 --force python3.11 --version ``` -------------------------------- ### Run with Takeout Folder and Album Structure Source: https://github.com/jaimetur/photomigrator/blob/main/help/2-arguments-description-short.md Specifies the Takeout folder and sets the album folder structure to 'year/month'. ```bash PhotoMigrator.run --google-takeout="/home/user/Takeout" --google-albums-folders-structure=year/month ``` -------------------------------- ### Upload albums using short arguments and account ID Source: https://github.com/jaimetur/photomigrator/blob/main/help/2-arguments-description-short.md Demonstrates using short argument flags like `-client`, `-uAlb` for uploading albums, and `-id` to specify the account. ```bash PhotoMigrator.run -client=synology -uAlb="Albums" -id=1 ``` -------------------------------- ### Check pip Version Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-python/install-python.md Verifies the installed version of pip for the current Python environment. ```python python -m pip --version ``` -------------------------------- ### Run PhotoMigrator from Source Source: https://github.com/jaimetur/photomigrator/blob/main/help/execution/execution-from-source.md Execute the PhotoMigrator tool directly from its source code directory to display help information. ```bash python ./src/PhotoMigrator.py -h ``` -------------------------------- ### Clone and Navigate Repository Source: https://github.com/jaimetur/photomigrator/blob/main/CONTRIBUTING.md Clone the PhotoMigrator repository and navigate into the project directory to begin development. ```bash git clone https://github.com/jaimetur/PhotoMigrator.git cd PhotoMigrator ``` -------------------------------- ### Synology/Immich/NextCloud/Google Photos Upload All Source: https://github.com/jaimetur/photomigrator/blob/main/help/2-arguments-description.md Upload all assets to a specified photo client (Immich, Synology, etc.), creating albums based on subfolder structure. Requires specifying the client and the input folder path. ```bash PhotoMigrator.run --client=immich --upload-all=/mnt/pictures ``` -------------------------------- ### Get Field by Destination Source: https://github.com/jaimetur/photomigrator/blob/main/src/web_interface/html/index.html Finds and returns a specific field object from the schema based on its unique destination identifier. ```javascript function getFieldByDest(dest) { return getAllFields().find((f) => f.dest === dest); } ``` -------------------------------- ### Update Package Index Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-docker/install-docker-linux.md Updates the package index to ensure you have the latest package versions. Run this before installing new packages. ```bash sudo apt-get update ``` -------------------------------- ### Download specific albums using short arguments and output folder Source: https://github.com/jaimetur/photomigrator/blob/main/help/2-arguments-description-short.md Uses short arguments `-client`, `-dAlb` for downloading albums, and `-o` for the output folder, specifying multiple albums. ```bash PhotoMigrator.run -client=immich -dAlb="Vacaciones,Navidad" -o="Backups" ``` -------------------------------- ### Get Available Docker Image Tags Source: https://github.com/jaimetur/photomigrator/blob/main/help/execution/execution-from-docker.md Use curl and jq to query Docker Hub for available release tags for the PhotoMigrator image. ```bash curl -s "https://registry.hub.docker.com/v2/repositories/jaimetur/tags?page_size=100" | jq '.results[].name' ``` -------------------------------- ### Synology/Immich/NextCloud/Google Photos Upload Albums Short Args Source: https://github.com/jaimetur/photomigrator/blob/main/help/2-arguments-description.md Upload albums using short arguments. Specify the client, the albums to upload, and optionally an account ID. The album path is provided as a string. ```bash PhotoMigrator.run -client=synology -uAlb="Albums" -id=1 ``` -------------------------------- ### Configure Git User Name and Email Source: https://github.com/jaimetur/photomigrator/blob/main/help/install-git/install-git.md Sets the global Git configuration for the user's name and email address, which is recommended for all Git installations. ```bash git config --global user.name "Your Name" git config --global user.email "you@example.com" ```