From 029c55c06e57ddf18f879275ed97044ff0d8076a Mon Sep 17 00:00:00 2001 From: rene Date: Thu, 19 Feb 2026 10:55:48 +0100 Subject: [PATCH] Bilder vom iPhone bearbeiten --- heic-scripts/heic2jpg | 18 ++++++++++++++++++ heic-scripts/heic2jpg_delete | 18 ++++++++++++++++++ heic-scripts/heic2jpg_resize | 12 ++++++++++++ heic-scripts/heic2jpg_resize_delete | 12 ++++++++++++ heic-scripts/jpg_resize | 10 ++++++++++ nvim/lazy-lock.json | 20 ++++++++++---------- 6 files changed, 80 insertions(+), 10 deletions(-) create mode 100644 heic-scripts/heic2jpg create mode 100644 heic-scripts/heic2jpg_delete create mode 100644 heic-scripts/heic2jpg_resize create mode 100644 heic-scripts/heic2jpg_resize_delete create mode 100644 heic-scripts/jpg_resize diff --git a/heic-scripts/heic2jpg b/heic-scripts/heic2jpg new file mode 100644 index 0000000..b1ba734 --- /dev/null +++ b/heic-scripts/heic2jpg @@ -0,0 +1,18 @@ +#!/bin/bash +# HEIC zu JPG konvertieren +# Optional: Bilder auf max. 1920px verkleinern mit --resize + +RESIZE=false +if [[ "$1" == "--resize" ]] || [[ "$NEMO_SCRIPT_SELECTED_FILE_PATHS" == *"--resize"* ]]; then + RESIZE=true +fi + +for file in *.{heic,HEIC}; do + if [[ -f "$file" ]]; then + output="${file%.*}.jpg" + heif-convert -q 90 "$file" "$output" + if [[ "$RESIZE" == true ]] && [[ -f "$output" ]]; then + mogrify -resize 1920x1920\> "$output" + fi + fi +done diff --git a/heic-scripts/heic2jpg_delete b/heic-scripts/heic2jpg_delete new file mode 100644 index 0000000..e10d4d6 --- /dev/null +++ b/heic-scripts/heic2jpg_delete @@ -0,0 +1,18 @@ +#!/bin/bash +# HEIC zu JPG konvertieren und HEIC löschen +# Optional: Bilder auf max. 1920px verkleinern mit --resize + +RESIZE=false +if [[ "$1" == "--resize" ]] || [[ "$NEMO_SCRIPT_SELECTED_FILE_PATHS" == *"--resize"* ]]; then + RESIZE=true +fi + +for file in *.{heic,HEIC}; do + if [[ -f "$file" ]]; then + output="${file%.*}.jpg" + heif-convert -q 90 "$file" "$output" && rm "$file" + if [[ "$RESIZE" == true ]] && [[ -f "$output" ]]; then + mogrify -resize 1920x1920\> "$output" + fi + fi +done diff --git a/heic-scripts/heic2jpg_resize b/heic-scripts/heic2jpg_resize new file mode 100644 index 0000000..404898d --- /dev/null +++ b/heic-scripts/heic2jpg_resize @@ -0,0 +1,12 @@ +#!/bin/bash +# HEIC zu JPG konvertieren UND auf max. 1920px verkleinern + +for file in *.{heic,HEIC}; do + if [[ -f "$file" ]]; then + output="${file%.*}.jpg" + heif-convert -q 90 "$file" "$output" + if [[ -f "$output" ]]; then + mogrify -resize 1920x1920\> "$output" + fi + fi +done diff --git a/heic-scripts/heic2jpg_resize_delete b/heic-scripts/heic2jpg_resize_delete new file mode 100644 index 0000000..f80bdad --- /dev/null +++ b/heic-scripts/heic2jpg_resize_delete @@ -0,0 +1,12 @@ +#!/bin/bash +# HEIC zu JPG konvertieren, auf max. 1920px verkleinern, HEIC löschen + +for file in *.{heic,HEIC}; do + if [[ -f "$file" ]]; then + output="${file%.*}.jpg" + heif-convert -q 90 "$file" "$output" && rm "$file" + if [[ -f "$output" ]]; then + mogrify -resize 1920x1920\> "$output" + fi + fi +done diff --git a/heic-scripts/jpg_resize b/heic-scripts/jpg_resize new file mode 100644 index 0000000..59c1642 --- /dev/null +++ b/heic-scripts/jpg_resize @@ -0,0 +1,10 @@ +#!/bin/bash +# JPG Bilder auf max. 1920px verkleinern +# Überschreibt die Originale! + +for file in *.{jpg,JPG,jpeg,JPEG}; do + if [[ -f "$file" ]]; then + mogrify -resize 1920x1920\> "$file" + echo "Verkleinert: $file" + fi +done diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index d92d639..28766ad 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,22 +1,22 @@ { "LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" }, - "catppuccin": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" }, + "catppuccin": { "branch": "main", "commit": "6efc53e42cfc97700f19043105bf73ba83c4ae7d" }, "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" }, - "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "gitsigns.nvim": { "branch": "main", "commit": "6bd29494e3f79ff08be1d35bc1926ed23c22ed9a" }, + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "3b3571b4dadbcb464804466e9872e7246c316af7" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "4cfe411526a7a99c18281135e8b4765ae6330d15" }, "mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" }, - "nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" }, - "nvim-lspconfig": { "branch": "master", "commit": "ad95655ec5d13ff7c728d731eb9fd39f34395a03" }, - "nvim-tree.lua": { "branch": "master", "commit": "eb33612bff2fb31f54946fb5dcadc89e905e81ec" }, - "nvim-treesitter": { "branch": "main", "commit": "d3218d988f72ed34414959c9ccd802d393432d6e" }, - "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, + "nvim-cmp": { "branch": "main", "commit": "85bbfad83f804f11688d1ab9486b459e699292d6" }, + "nvim-lspconfig": { "branch": "master", "commit": "ac04ec3c2af08e9821b4eb64ede86072b9b213bf" }, + "nvim-tree.lua": { "branch": "master", "commit": "b8b44b6a2494d086a9177251a119f9daec6cace8" }, + "nvim-treesitter": { "branch": "main", "commit": "300b906a9514d5e0ce02911d371445382fe35a31" }, + "nvim-web-devicons": { "branch": "master", "commit": "6788013bb9cb784e606ada44206b0e755e4323d7" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "telescope.nvim": { "branch": "master", "commit": "3d757e586ff0bfc85bdb7b46c9d3d932147a0cde" }, + "telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, "tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }