~shnatsel/noise/test-library-generator

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
set -e

if [ "$1" == "" ] || [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
echo "Usage: $0 NUMBER_OF_TRACKS
Creates the given number of OGG tracks with metadata resembling an actual music library in the current directory."
exit 1
fi

total_tracks="$1"
track_num=1

$(dirname "$0")/generate_track_metadata.py "$total_tracks" | while read; do
    cp $(dirname "$0")/base_file.ogg "$track_num".ogg
    echo "$REPLY" | tr '|' '\n' | vorbiscomment -w "$track_num".ogg
    ((track_num++))
done