[READ-ONLY] Mirror of https://github.com/mrgnw/scripts.
0

Configure Feed

Select the types of activity you want to include in your feed.

parallelize with parallel

brew install parallel

+13 -7
+13 -7
heics
··· 1 1 #!/usr/bin/env zsh 2 2 3 - mkdir -p heics 4 3 mkdir -p original 5 4 setopt localoptions nocaseglob 6 - for file in *.{jpeg,jpg,png,arw,dng,psd,jxl}(N); do 7 - if [[ -f $file ]]; then 8 - sips -s format heic "$file" --out "${file:r}.heic" 2>&1 | sed "s|$PWD/||g" 9 - mv "$file" "original/$file" 10 - fi 11 - done 5 + 6 + extensions=( 7 + "*.jpeg" "*.jpg" "*.png" 8 + "*.arw" "*.dng" "*.psd" "*.jxl" 9 + ) 10 + 11 + find . -maxdepth 1 -type f \( \ 12 + $(printf -- "-iname %s -o " "${extensions[@]}") \ 13 + -false \) -print0 | \ 14 + parallel -0 -j "$(sysctl -n hw.ncpu)" ' 15 + heic {} 16 + mv {} original/{} 17 + '