mirror of
https://github.com/pisto/oggify
synced 2024-11-14 06:47:30 +00:00
9d76391b17
unlikely that strings in bash can hold them in any case
19 lines
350 B
Bash
Executable File
19 lines
350 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
fname=$(echo "${4} - ${2}.ogg" | tr '/' -)
|
|
cat > "$fname"
|
|
{
|
|
echo "SPOTIFY_ID=${1}"
|
|
title=$(tr '\n' ' ' <<< "${2}")
|
|
album=$(tr '\n' ' ' <<< "${3}")
|
|
echo "TITLE=${title}"
|
|
echo "ALBUM=${album}"
|
|
shift 3
|
|
for artist in "$@"; do
|
|
artist=$(tr '\n' ' ' <<< "${artist}")
|
|
echo "ARTIST=${artist}"
|
|
done
|
|
} | vorbiscomment -a "$fname"
|