gio mount mtp://"$host"/"Carte SD SanDisk"/
year=$(date +%Y)
+
mkdir -p "$year"/audio/src
rsync -ai --no-inc-recursive --info=progress2 --inplace --partial \
--remove-source-files \
for month in {01..12}; do
rsync -ai --no-inc-recursive --info=progress2 --inplace --partial \
--remove-source-files \
- --include "???_$year$month*" --exclude '*' \
+ --include "???_$year$month*" \
+ --exclude '*' \
/run/user/"$(id -u)"/gvfs/mtp:host="$host"/"Espace de stockage interne partagé"/DCIM/Camera/ \
/run/user/"$(id -u)"/gvfs/mtp:host="$host"/"Carte SD SanDisk"/DCIM/Camera/ \
"$year"/src/"$month"
--- /dev/null
+#!/usr/bin/env bash
+host=Fairphone_FP3_A209PB4N0202
+cd "${0%/*}"
+set -eux
+gio mount -l | grep mtp://"$host" ||
+gio mount mtp://"$host"/CARTE_SD/
+
+year=$(date +%Y)
+
+mkdir -p "$year"/src
+for month in {01..12}
+do
+ rsync -ai --no-inc-recursive --info=progress2 --inplace --partial \
+ --include "???_2023${month}*" \
+ --exclude '*' \
+ /run/user/1000/gvfs/mtp:host="$host"/CARTE_SD/DCIM/Camera/ \
+ "$year"/src/"$month"
+done
--- /dev/null
+#!/usr/bin/env bash
+host=Xiaomi_SDM439-QRD__SN%3AE77E9453_c645cda90006
+cd "${0%/*}"
+set -eux
+gio mount -l | grep mtp://"$host" ||
+gio mount mtp://"$host"/"Carte SD SanDisk"/
+
+year=$(date +%Y)
+
+# FIXME: handle previous year on new year
+mkdir -p "$year"/src
+for month in {01..12}; do
+ rsync -ai --no-inc-recursive --info=progress2 --inplace --partial \
+ --include "???_$year$month*" --exclude '*' \
+ /run/user/"$(id -u)"/gvfs/mtp:host="$host"/"Espace de stockage interne partagé"/DCIM/Camera/ \
+ /run/user/"$(id -u)"/gvfs/mtp:host="$host"/"Carte SD SanDisk"/DCIM/Camera/ \
+ "$year"/src/"$month"
+done