#!/usr/bin/env bash
#
# Copyright 2008, Centova Technologies Inc.
#
# This script is used to display ID3 tag information from an MP3.
#
# usage:
#   id3.sh filename
#

[ $# -lt 1 ] && echo "usage: $0 filename" && exit 1

ID3PHP=`dirname $0`/../system/id3.php

DODEBUG=""
if [ "$1" == "--debug" ]; then
	DODEBUG="--debug"
	shift
fi

php -q $ID3PHP "Title: %title%
Artist: %artist%
Album: %album%
Year: %releaseyear%
Genre: %genre%
Channels: %channels%
Bit rate: %bitrate%
Sample rate: %samplerate%
Length: %length%s
Warning: %warning%" $DODEBUG "$1"

