Created
October 21, 2012 19:03
-
-
Save grahamgilchrist/3928105 to your computer and use it in GitHub Desktop.
Create XBMC .nfo files from mkvs in directory
This file contains 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
root=$(pwd) | |
movieset=$1 | |
echo $root | |
for file in $root/*.mkv | |
do | |
filepath="${file%.*}.nfo" | |
filename=$(basename $file) | |
echo "Processing $filename" | |
echo "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n" > $filepath | |
echo "<movie>" >> $filepath | |
echo " <title>$filename</title>" >> $filepath | |
echo " <set>$movieset</set>" >> $filepath | |
echo "</movie>" >> $filepath | |
echo "Output $filepath" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment