1
0
mirror of https://github.com/pisto/oggify synced 2024-12-22 22:56:58 +00:00
oggify/tag_ogg
2019-02-18 09:56:19 +01:00

20 lines
378 B
Bash
Executable File

#!/bin/sh
set -e
fname=$(echo "${4} - ${2}.ogg" | tr '/' - | tr '\0' ' ')
cat > "$fname"
echo "$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"