mirror of
https://github.com/pisto/oggify
synced 2024-12-22 22:06:59 +00:00
21 lines
349 B
Bash
Executable File
21 lines
349 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
fname="${4} - ${2}.ogg"
|
|
fname="${fname//\//-}"
|
|
cat > "${fname}"
|
|
{
|
|
echo "SPOTIFY_ID=${1}"
|
|
title="${2//'\n'/' '}"
|
|
album="${3//'\n'/' '}"
|
|
echo "TITLE=${title}"
|
|
echo "ALBUM=${album}"
|
|
shift 3
|
|
for artist in "$@"; do
|
|
artist="${artist//'\n'/' '}"
|
|
echo "ARTIST=${artist}"
|
|
done
|
|
} | vorbiscomment -a "${fname}"
|
|
echo "${fname}"
|