Created
December 8, 2013 06:05
-
-
Save kini/7853878 to your computer and use it in GitHub Desktop.
A helper script for uploading cover art sets to the Cover Art Archive on musicbrainz, in combination with @96187 's cover-art-bot tool.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
######################################################################## | |
# A small script to help upload cover art sets to CAA, for example | |
# from VGMDB. Put this script in a staging directory, which will | |
# contain a subdirectory for each release you will be adding cover | |
# art sets for. Then copy or download all the cover art into the | |
# staging directory and run this script with [a URL ending in] a | |
# release MBID as an argument. | |
shopt -s nullglob | |
if [[ -z "$1" ]] ; then | |
echo "Error: Please supply a release MBID or URL as an argument." | |
exit 1 | |
fi | |
MBID=$(grep -o '[^/ ]*$' <<<"$1") | |
mkdir -p $MBID | |
if [[ -e "$MBID/datafile" ]] ; then | |
mv $MBID/datafile $MBID/datafile.old | |
fi | |
for X in *.{jpg,png,gif,JPG,PNG,GIF} ; do | |
mv "$X" $MBID | |
done | |
cd $MBID | |
for X in *.{jpg,png,gif,JPG,PNG,GIF} ; do | |
echo -e "$MBID\t$X\t" >> datafile | |
done | |
echo "Created $MBID/datafile . Please add a type at the end of each line," | |
echo "then use the datafile with nikki's cover art bot (see" | |
echo "https://github.com/96187/cover-art-bot )." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment