New tools added + description for Audio-Organizer
This commit is contained in:
parent
3691c50bb9
commit
5ff336f048
2 changed files with 65 additions and 0 deletions
8
Filesystem/File Organisation/README.md
Normal file
8
Filesystem/File Organisation/README.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
## Audio Organizer
|
||||
|
||||
This Python Script will reorganize your music collection and also determine doubles and such in a dedicated text file.
|
||||
The inital purpose of this script was to sort and reorganize over one terabyte of music. By doing it manually, iv probably wasted a lot of time.
|
||||
|
||||
Audio Organizer does sort the music into the albums catogory.
|
||||
You do the best by giving it another folder. No files will be copied. Instead it will be sorted and moved into new folders.
|
||||
So allow Audio Organizer a dedicated folder for it's work.
|
||||
57
Filesystem/Transfer/scp-transfer
Normal file
57
Filesystem/Transfer/scp-transfer
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Title: scp-transfer
|
||||
# Developer: h@x
|
||||
# Date: 13. July 2025
|
||||
# Purpose: Flexible SCP file transfer with user, host, port, and path flags
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 -u <user> -h <host> -p <port> -r <remote_path> -l <local_file> [-d direction]"
|
||||
echo " -u SSH username (required)"
|
||||
echo " -h Remote host/IP (required)"
|
||||
echo " -p SSH port (required)"
|
||||
echo " -r Remote path (required)"
|
||||
echo " -l Local file or directory (required)"
|
||||
echo " -d Direction: 'upload' (default) or 'download'"
|
||||
exit 1
|
||||
}
|
||||
|
||||
USER=""
|
||||
HOST=""
|
||||
PORT=""
|
||||
REMOTE_PATH=""
|
||||
LOCAL_FILE=""
|
||||
DIRECTION="upload"
|
||||
|
||||
while getopts ":u:h:p:r:l:d:" opt; do
|
||||
case $opt in
|
||||
u) USER="$OPTARG" ;;
|
||||
h) HOST="$OPTARG" ;;
|
||||
p) PORT="$OPTARG" ;;
|
||||
r) REMOTE_PATH="$OPTARG" ;;
|
||||
l) LOCAL_FILE="$OPTARG" ;;
|
||||
d) DIRECTION="$OPTARG" ;;
|
||||
*) usage ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Validate required parameters
|
||||
if [[ -z "$USER" || -z "$HOST" || -z "$PORT" || -z "$REMOTE_PATH" || -z "$LOCAL_FILE" ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# Perform SCP transfer based on direction
|
||||
if [[ "$DIRECTION" == "upload" ]]; then
|
||||
echo "Uploading $LOCAL_FILE to $USER@$HOST:$REMOTE_PATH (port $PORT)..."
|
||||
scp -P "$PORT" -r "$LOCAL_FILE" "$USER@$HOST:$REMOTE_PATH"
|
||||
elif [[ "$DIRECTION" == "download" ]]; then
|
||||
echo "Downloading $USER@$HOST:$REMOTE_PATH to $LOCAL_FILE (port $PORT)..."
|
||||
scp -P "$PORT" -r "$USER@$HOST:$REMOTE_PATH" "$LOCAL_FILE"
|
||||
else
|
||||
echo "Invalid direction: $DIRECTION"
|
||||
usage
|
||||
fi
|
||||
Loading…
Add table
Reference in a new issue