metadata scripts
album from folder: create album from foldername read: read and display author, album, grouping of every folder remove author before title: remove "name - " when matching author
This commit is contained in:
1 parent
408566b6ea
commit
7c2e0db615
11 files changed
+114
-18
No files matched your search
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
WORKDIR="${1:-.}"
|
||||
|
||||
cd "$WORKDIR"
|
||||
|
||||
# Use $2 if provided, otherwise use current directory name
|
||||
AUTHOR="${2:-$(basename "$PWD")}"
|
||||
|
||||
for d in "$AUTHOR - "*; do
|
||||
[[ -d "$d" ]] || continue
|
||||
|
||||
new_name="${d#"$AUTHOR - "}"
|
||||
|
||||
echo "Renaming: $d -> $new_name"
|
||||
mv -- "$d" "$new_name"
|
||||
done
|
||||
|
||||
Reference in new issue
Block a user