Scripts

The following are scripts that I use all the time. Have them, they're free.
Using these scripts may cause respiratory irritation, fire, cancer, and data loss. You have been warned.
In the unlikely event that you actually do use any of these scripts, leave a comment. I'd especially like to know how the 'multiburn' script works for different configurations. Do tell.

Scripts: multiburn rip2mp3 rip2flac any2mp3 any2flac any2wav newpass fade

multiburn Updated 2008/04/13 (Manual) (Changelog) (gmultiburn GUI)
[SourceForge.net Logo]
This script is a CD burning front-end for Linux (and probably other Unices). It can be used to create a single CD or DVD on a single burner, or to mass produce them concurrently on as many burners as you can get your hands on, with no user interaction other than feeding the burners blank discs. The current record for the most burners in use simultaneously is 7 (hi Catalin!).

Data sources:
- Images to be burned directly (ISOs and such)
- Single audio files (as audio CDs)
- Directories of audio files (as audio CDs)
- Cue files (the sort CDRWin and Nero use)
- TOC files (the sort cdrdao uses natively)
- Pre-existing CDs/DVDs (as clones)
- Directories or single files (as ISO9660 filesystems)

Requirements:
- cdrecord and cdrdao.
- dvdrecord is required iff DVDs are to be written.
- mkisofs is required iff data CDs are to be created from files or directories.
- mplayer is required iff audio files have to be converted CD style .wav files.
The CD writing tools are also available as cdrkit / wodim as well. It shouldn't matter which you use.

Notes:
MPlayer 1.0pre8 or later is required (only if audio conversion is needed, though), as previous versions used a different syntax.
Released under the GNU GPL, Version 2.

rip2mp3 Updated 2005/03/27
A short script to rip a CD and encode its contents to MP3.
There are two options (Do rip2mp3 -h for the on-line help.):
-    Encode each track as a separate MP3
-    Encode the whole disc as one continuous MP3
The second option is handy if you've got a mixed CD and your MP3 player doesn't do gapless playback. (iPods are, unfortunately, guilty in this respect).
The encoder uses LAME's --preset standard option, which sounds great and doesn't use too much space.
The rip->encode is done without writing the .wav files, so it encodes as it rips which is fast, and doesn't use any extra hard disc space.
CDs with hidden first tracks will be ripped with 'track 0'. There's no way to tell if the first track is data or audio, so you're on your own if you have a data/audio disc. I've not had any problems yet but, as always, YMMV.
The current version is released under the GPL.
Requires cdparanoia and LAME.

rip2flac Added 2008/04/13
A short script to rip a CD and encode its contents to FLAC. Same options as rip2mp3 above. GPL2.
Requires cdparanoia and FLAC.

any2mp3 Added 2006/09/27
A short script to convert any audio file (or video soundtrack) to MP3
Single argument of the path to the file to be converted.
Requires LAME and mplayer.

any2flac Added 2006/09/27
A short script to convert any audio file (or video soundtrack) to FLAC
Single argument of the path to the file to be converted.
Requires FLAC and mplayer.

any2wav Added 2006/09/27
A short script to convert any audio file (or video soundtrack) to CD format .wav
Single argument of the path to the file to be converted.
Requires mplayer.

newpass Updated 2007/10/18
A wee script to generate random alphanumeric passwords from /dev/urandom . Just give the number of chars as the argument.
Tested on Linux and Solaris 10.

fade Updated 2007/10/14
A script to fade the root window colour between two values throughout the day.
The colour transition is done with a sine wave multiplier (actually an inverted, offset cosine), using the 'date' command as a time source.
Run as: fade [-1] [-d] <night-colour> <day-colour>
The first colour specified is the midnight colour, and the second is for noon. Both colours are specified as 6 digit hex (HTML colours). The -1 option sets the colour, then exits immediately, otherwise the script will update the desktop colour every minute. The -d option shows the date and colour whenever it is set.
Works on Linux and Solaris 10 (possibly other Unices as well).

2 Comments

Justin Author Profile Page said:

well, the idea is to have this program run on boot, sit and wait for an original to be put in the source drive, and then blanks put in the destination drives. until of course someone hits Ctrl+C.

what do you think?

Dave Stark Author Profile Page said:

Do-able in general, but the disc type has to be specified manually for each multiburn run- I can't find a way of determining the media type (DVD / audio / data CD) in a drive automatically with the Unix CD tools.

Leave a comment