diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2023-10-28 08:41:43 -0400 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2023-10-28 08:41:43 -0400 |
| commit | 0cc589bcadf5a8ce6aee2706e749fee878ccca75 (patch) | |
| tree | 8cbd17151ea65bcaf73085899917ac66d1360122 /.local/bin/booksplit | |
| parent | 6ba48b27339d47732519476333712bb4b2cde87f (diff) | |
| parent | 1e3adf9c03b2e563e81a13d6907ffd5ca20b887a (diff) | |
| download | eibhear-0cc589bcadf5a8ce6aee2706e749fee878ccca75.tar.gz eibhear-0cc589bcadf5a8ce6aee2706e749fee878ccca75.tar.zst eibhear-0cc589bcadf5a8ce6aee2706e749fee878ccca75.zip | |
Merge branch 'master' of github.com:LukeSmithxyz/voidrice
Diffstat (limited to '.local/bin/booksplit')
| -rwxr-xr-x | .local/bin/booksplit | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/.local/bin/booksplit b/.local/bin/booksplit index a6845f7..079d85f 100755 --- a/.local/bin/booksplit +++ b/.local/bin/booksplit @@ -12,7 +12,7 @@ inputaudio="$1" ext="${1##*.}" # Get a safe file name from the book. -escbook="$(echo "$booktitle" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")" +escbook="$(echo "$booktitle" | iconv -c -f UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")" ! mkdir -p "$escbook" && echo "Do you have write access in this directory?" && @@ -31,7 +31,7 @@ do cmd="$cmd -metadata artist=\"$author\" -metadata title=\"$title\" -metadata album=\"$booktitle\" -metadata year=\"$year\" -metadata track=\"$track\" -metadata total=\"$total\" -ss \"$start\" -to \"$end\" -vn -c:a copy \"$file\" " fi title="$(echo "$x" | cut -d' ' -f2-)" - esctitle="$(echo "$title" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")" + esctitle="$(echo "$title" | iconv -c -f UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")" track="$((track+1))" start="$end" done < "$2" |
