REBOT3.PL(1) REBOT3.PL(1)
NAME
rebot3.pl - rename MP3 files using their corresponding
CDDB entries
SYNOPSIS
rebot3.pl [OPTIONS]
DESCRIPTION
rebot3.pl is a utiliy intended for renaming MP3 files
using their corresponding CDDB entries. It works best in
combination with cdda2wav(1), but it is also usefull in
combination with other rippers like cdparanoia(1). If run
without any option specified on the command line it looks
in the current directory for the file audio.cddb which is
written by cdda2wav(1). Out of this file rebot3.pl tries
to extract the disc id which used to identify the corre
sponding CDDB entry. It looks also in the current direc
tory for MP3 files containg a one or two digit number in
the filename (not in the extension ;-). Then it simply
renames all found MP3 files using a default pattern.
Optionally an ID3 tag can be attached to the MP3 files.
rebot3.pl can retrieve the disc information from a remote
CDDB over the internet or a local CDDB, created by cd (and
other) players like xmcd(1), kscd, gcd or xmms.
OPTIONS
-r, --remote-cddb
retrieve the disc information from a remote CDDB
server. If omitted it will use a local CDDB. The
correct CD has to be inserted into your cdrom
drive.
-cs SERVER[:PORT], --cddb-server SERVER[:PORT]
use SERVER as CDDB server. Optionally you can spec
ify the port used to connect to the server. The
default is cddb.cddb.com:8880.
-cd DEVICE, --cdrom-device DEVICE
use DEVICE as cdrom device. Defaults to /dev/cdrom.
-id ID, --disc-id ID
use ID as disc id, do not look for audio.cddb. If
used in combination with remote cddb mode you have
to specify the genre using the -g option. In this
case rebot3.pl will not try to calculate the disc
id from the CD in your cdrom drive.
-if FILE, --id-file FILE
look in FILE for the disc id.
-g GENRE
use GENRE as the genre the album (the set of MP3
files to rename) is listed under at the CDDB (or
FreeDB). This is most useful in combination with
1
REBOT3.PL(1) REBOT3.PL(1)
-id in remote CDDB mode, which enables you to use
the CDDB even if you don't have the cd the MP3
files where ripped from (inserted in your CD
drive). You could use the web interfaces to CDDB or
FreeDB to obtain the disc id and the genre assigned
to the album.
-G print the list of CDDB genres known by the CDDB
server. On first use it should be used in combina
tion with remote CDDB mode to let rebot3.pl down
load the list from a CDDB server. It will then save
the obtained information in a file called .cddb-
genres in your home directory. Next time when used
in local CDDB mode it will use this file to
retrieve the list of known genres.
-c, --use-cdda2wav
use cdda2wav(1) to determine the disc id. The cor
rect CD has to be inserted into your cdrom drive.
-C, --use-cd
calculate the disc id using the CD in your cdrom
drive.
-db PATH, --cddb-path PATH
look in PATH for CDDB files. Defaults to ~/.cddb,
~/cddb, /usr/X11R6/lib/X11/xmcd/cddb and
/opt/kde/share/apps/kscd/cddb.
-x FILE, --xmms-cdinfo-file FILE
use FILE as xmms cdinfo file. Defaults to
~/.xmms/cdinfo.
-xo, --xmms-cdinfo-only
search in the xmms cdinfo file only for a matching
CDDB entry.
-f FILES, --file[s] FILES
rename FILES instead of all the MP3 files in the
current directory. This option must be specified
as the last one, because all options specified
after -f will be treated as normal filenames. If a
filename does not contain any track number you have
to specify the correct one with -l.
-l LIST, --track-list LIST
use LIST instead of the numbers in the filenames.
Multiple track numbers must be seperated by comma
or colon. This option also invokes -S.
-S, --dont-sort
don't sort file list.
2
REBOT3.PL(1) REBOT3.PL(1)
-n NUMBER, --use-number NUMBER
use the n'th number (not digit) in the mp3's file
names as the track number, where n is specified by
NUMBER. Default is to use the first number.
-p PATTERN, --pattern PATTERN
rename files using PATTERN. PATTERN may contain
the following symbols:
- %%, means a single %
- %a or %{artist}, mean the artist's name
- %b or %{album}, mean the album name
- %n or %{number}, mean the track number
- %t or %{title}, mean the track title.
PATTERN defaults to "%b - %n - %t".
-t, --add-id3-tag[s]
append ID3 tag to each file. The comment section of
the tag will be used for storing the track number.
-to, --id3tag[s]-only
append ID3 tags only, do not rename files.
-T, --remove-tag[s]
remove ID3 tag from each file.
-u [UNDOFILE], --undo [UNDOFILE]
create an undo file wich enables you to restore the
old filenames in case the result of renaming is not
what you expected. This defaults to undo but you
can specify another name with UNDOFILE. To be able
to use this file you must have mmv(1) installed.
All you have to do to restore the old filenames is
typing "cat UNDOFILE | mmv".
-uo [UNDOFILE], --undo-only [UNDOFILE]
same as above with the difference that only the
undo file is created and no file is renamed.
-s, --silent
supress any output (except error messages and warn
ings).
-q, --quiet
same as above.
-d, --debug
do not rename files, just print the resulting names
to STDOUT.
-h, --help
print a short summary of all available commands.
ENVIRONMENT
3
REBOT3.PL(1) REBOT3.PL(1)
REBOT_CDDB_PATHS
may contain a list of paths (seperated by colons)
where to look for CDDB files. Overridden by -db
option.
REBOT_PATTERN
may contain a default pattern. Overridden by -p
option.
REBOT_CDDB_SERVER
may contain the a default CDDB server, where server
and port have to be seperated by a colon. Overrid
den by -cs option.
DIAGNOSTICS
If all oprations complete successfully rebot3.pl exits
with status 0, otherwise it returns a non-zero status.
EXAMPLES
The following example is usefull when run in combination
with cdparanoia(1). It uses the CD in the cdrom drive to
calculate the disc id, uses a local CDDB, renames all mp3
files in the current directory that have a one or two
digit number in the filename, appends ID3 tags to these
files and creates an undo file.
rebot3.pl -C -t -u
The next example uses the cdrom drive at /dev/hdc to get
the CD's table of contents and the remote CDDB server
de.freedb.org at port 8880 to get the disc information.
rebot3.pl -r -cs de.freedb.org:8880 -cd /dev/hdc
This example will use a local CDDB to get the information
about a disc with the id 3b115617 and then rename foo.mp3
to 03 - The Black Rider.mp3 and bar.mp3 to 19 - Jesus
Gonna Be Here.mp3.
rebot3.pl -id 3b115617 -p '%n - %t' -l 4,20 -f
foo.mp3 bar.mp3
The last example uses the disc id 06118912 in combination
with the genre misc to fetch the correct disc information
from a remote cddb server, renames the files found in the
current working directory using this information and cre
ates an undo file. This way don't need to have the correct
CD in your cdrom drive.
rebot3.pl -r -id 06118912 -g misc -u
BUGS
Not known but maybe there are a few. Drop me a mail if you
find one.
4
REBOT3.PL(1) REBOT3.PL(1)
AUTHOR
Thomas Weiss <panos@bigfoot.de>
SEE ALSO
cdda2wav(1), cdparanoia(1), mmv(1), xmcd(1)
5