move and adapt rename camera and memes scripts

This commit is contained in:
lucas committed 2026-10-01 14:07:30 +00:00
1 parent 84d5223a95
commit 4ccf2ac412
4 files changed
+14 -14

No files matched your search

@@ -1,3 +1,4 @@
#!/home/lucas/scripts/.venv/bin/python3
import os
import re
import random
@@ -178,6 +179,8 @@ def get_manufacturer(file_path):
metadata = json.loads(result.stdout)[0]
# Extract Author tag and remove spaces
author = metadata.get("Author", "")
if author == "":
author = metadata.get("AndroidMake", "")
if author == "":
author = metadata.get("AndroidManufacturer", "")
if author == "":
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
FOLDER=/data/nextcloud/syncuser/camera/
export PYTHONPATH=/home/lucas/scripts
syncNC -c
/home/lucas/scripts/file\ processing/rename_camera_folder.py ${FOLDER}
syncNC -c
@@ -1,8 +1,7 @@
#!/bin/bash
PW=$(cat /home/lucas/.PW)
FOLDER=/torrent/Memes
FOLDER=/data/nextcloud/syncuser/Memes
nextcloudcmd --trust --user lucas --password ${PW} --path Media/Stuff/Memes ${FOLDER} https://someoneslinux.ddns.net 1>/dev/null 2>&1
syncNC -m
for IMG_ORIG in ${FOLDER}/*; do
if [[ "$(echo ${IMG_ORIG##*/} | grep "-")" != "" ]] || [[ "$(echo ${IMG_ORIG##*/} | grep " ")" != "" ]] ;then
mv "${IMG_ORIG}" "$(echo ${IMG_ORIG} | sed 's/-/_/g' | sed 's/ /_/g')"
@@ -37,5 +36,5 @@ for IMG_ORIG in ${FOLDER}/*; do
fi
fi
done
nextcloudcmd --trust --user lucas --password ${PW} --path Media/Stuff/Memes ${FOLDER} https://someoneslinux.ddns.net 1>/dev/null 2>&1
syncNC -m
echo Fin
-10
View File
@@ -1,10 +0,0 @@
#!/bin/bash
PW=$(cat /home/lucas/.PW)
FOLDER=/torrent/camera
SERVER="https://someoneslinux.ddns.net"
export PYTHONPATH=/home/lucas/scripts
syncNC -c
/home/lucas/.venv_general/bin/python3 /home/lucas/scripts/serverhost/rename_camera_folder.py ${FOLDER}
syncNC -c