Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
486db6f743 | |||
a0fee76d2d | |||
ef70799873 | |||
2b5354f183 |
4
INSTALL
4
INSTALL
@ -1,7 +1,9 @@
|
|||||||
INSTALLATION
|
INSTALLATION
|
||||||
------------
|
------------
|
||||||
|
|
||||||
To install these scripts, simply copy them into your $PATH somewhere. I recommend creating a local bin directory at ~/bin and adding it to your path. To do so, edit the file ~/.bashrc and add the line
|
To install these scripts, simply copy them into your $PATH somewhere.
|
||||||
|
I recommend creating a local bin directory at ~/bin and adding it to
|
||||||
|
your path. To do so, edit the file ~/.bashrc and add the line:
|
||||||
|
|
||||||
export PATH=$PATH:~/bin
|
export PATH=$PATH:~/bin
|
||||||
|
|
||||||
|
63
all2sane
63
all2sane
@ -1,63 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
#
|
|
||||||
# All of MP3 to Sane
|
|
||||||
# usage: all2sane <files>
|
|
||||||
#
|
|
||||||
# Renames the files to a sane format, then calls vcfromfilename
|
|
||||||
# to set the vorbis comments
|
|
||||||
#
|
|
||||||
# Requires vcfromfilename, fixname
|
|
||||||
#
|
|
||||||
# Changelog:
|
|
||||||
# 0.2: version now aligned with ds-audiotools
|
|
||||||
# 0.1.2: automated artist determination
|
|
||||||
# 0.1.1: added VERSION variable
|
|
||||||
# added call to fixname
|
|
||||||
# 0.1: initial implementation
|
|
||||||
|
|
||||||
$VERSION = "0.2";
|
|
||||||
$HELP_MSG = "All of MP3 to Sane v$VERSION\n\tusage: all2sane <files>\n";
|
|
||||||
|
|
||||||
$END_CHUNK = '_\d{3}_ogg_.*\.ogg$'; # match the unwanted end of the string
|
|
||||||
$DESIRED_END = '.ogg'; # replace the end chunk with this
|
|
||||||
$ALLOFMP3_FORMAT = '^\d{2}_?-_?.*' . $END_CHUNK;
|
|
||||||
|
|
||||||
if ($#ARGV < 0) { die $HELP_MSG; }
|
|
||||||
foreach (@ARGV)
|
|
||||||
{
|
|
||||||
if (/^(--help)|(-h)$/) { die $HELP_MSG; }
|
|
||||||
}
|
|
||||||
|
|
||||||
$artist = `cd .. && pwd`;
|
|
||||||
$artist =~ s/^.*\///;
|
|
||||||
|
|
||||||
foreach (@ARGV)
|
|
||||||
{
|
|
||||||
next unless /$ALLOFMP3_FORMAT/;
|
|
||||||
my $old_name = $_;
|
|
||||||
|
|
||||||
$_ = $artist . '-' . $_; # prepend artist
|
|
||||||
s/_-_/-/g; # clear up the _ problem
|
|
||||||
s/$END_CHUNK/$DESIRED_END/;
|
|
||||||
|
|
||||||
system('mv', $old_name, $_);
|
|
||||||
system('fixname', $_);
|
|
||||||
system('vcfromfilename', $_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Copyright (c) 2005 John Wiggins
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
@ -14,7 +14,7 @@
|
|||||||
# 0.1.1: Added command-line wrapper, cleaned code
|
# 0.1.1: Added command-line wrapper, cleaned code
|
||||||
# 0.1: Initial code
|
# 0.1: Initial code
|
||||||
|
|
||||||
$VERSION = "0.2"
|
$VERSION = "0.2.3";
|
||||||
$HELP_MSG = "# Music Burner v$VERSION\n\tusage: burnmusic <cdspeed> <device> <files>\n";
|
$HELP_MSG = "# Music Burner v$VERSION\n\tusage: burnmusic <cdspeed> <device> <files>\n";
|
||||||
$temp_dir = '/tmp/burnmusic-' . `whoami`;
|
$temp_dir = '/tmp/burnmusic-' . `whoami`;
|
||||||
|
|
||||||
|
2
cdripper
2
cdripper
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
use CDDB_get qw( get_cddb );
|
use CDDB_get qw( get_cddb );
|
||||||
|
|
||||||
$VERSION = "0.2";
|
$VERSION = "0.2.3";
|
||||||
$HELP_MSG = "# CD Ripper v$VERSION\n\tusage: cdripper [--no-cddb] [-a] " .
|
$HELP_MSG = "# CD Ripper v$VERSION\n\tusage: cdripper [--no-cddb] [-a] " .
|
||||||
"[-y] [-o num] [target_directory]\n\n" .
|
"[-y] [-o num] [target_directory]\n\n" .
|
||||||
"Options:\n-a:\t\tAsk users about multiple CDDB options\n" .
|
"Options:\n-a:\t\tAsk users about multiple CDDB options\n" .
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
# changed to use command-line args
|
# changed to use command-line args
|
||||||
# 0.0.1: Initial bash script
|
# 0.0.1: Initial bash script
|
||||||
|
|
||||||
$VERSION = "0.2";
|
$VERSION = "0.2.3";
|
||||||
$HELP_MSG = "# MP3 - Ogg Converter v$VERSION\n\tusage: mp32ogg <files>";
|
$HELP_MSG = "# MP3 - Ogg Converter v$VERSION\n\tusage: mp32ogg <files>";
|
||||||
$DEC_ERROR = "Couldn't find a decoder to use. Please install one of mplayer, mpg321, or mpg123";
|
$DEC_ERROR = "Couldn't find a decoder to use. Please install one of mplayer, mpg321, or mpg123";
|
||||||
$ENC_ERROR = "Couldn't find oggenc, which is necessary for encoding. Please install the package that provides oggenc (probably named 'oggenc' or 'vorbistools')";
|
$ENC_ERROR = "Couldn't find oggenc, which is necessary for encoding. Please install the package that provides oggenc (probably named 'oggenc' or 'vorbistools')";
|
2
dirclean
2
dirclean
@ -15,7 +15,7 @@
|
|||||||
# 0.2 - aligned version with ds-audiotools
|
# 0.2 - aligned version with ds-audiotools
|
||||||
# 0.1 - initial version
|
# 0.1 - initial version
|
||||||
|
|
||||||
$VERSION = "0.2";
|
$VERSION = "0.2.3";
|
||||||
$HELP_MSG = "# dirclean v$VERSION\n\tusage: dirclean <directory>\n\t";
|
$HELP_MSG = "# dirclean v$VERSION\n\tusage: dirclean <directory>\n\t";
|
||||||
|
|
||||||
foreach (@ARGV)
|
foreach (@ARGV)
|
||||||
|
2
fixname
2
fixname
@ -25,7 +25,7 @@
|
|||||||
# 0.0.2: Takes command-line arguments instead of parsing entire directory
|
# 0.0.2: Takes command-line arguments instead of parsing entire directory
|
||||||
# 0.0.1: basic code in place
|
# 0.0.1: basic code in place
|
||||||
|
|
||||||
$VERSION = "0.2";
|
$VERSION = "0.2.3";
|
||||||
$HELP_MSG = "# Filename fixer v$VERSION\n\tusage: fixname <files>\n\t fixname -o \"name\"\n";
|
$HELP_MSG = "# Filename fixer v$VERSION\n\tusage: fixname <files>\n\t fixname -o \"name\"\n";
|
||||||
|
|
||||||
die $HELP_MSG if ($#ARGV < 0);
|
die $HELP_MSG if ($#ARGV < 0);
|
||||||
|
@ -4,23 +4,29 @@
|
|||||||
# usage: vcfromfilename [options] <files>
|
# usage: vcfromfilename [options] <files>
|
||||||
# options:
|
# options:
|
||||||
# -n: Only set the track number
|
# -n: Only set the track number
|
||||||
|
# -0: Leading 0s in track number are preserved
|
||||||
#
|
#
|
||||||
# Adds Vorbiscomment data to ogg vorbis and flac files based on the filename.
|
# Adds Vorbiscomment data to ogg vorbis and flac files based on the filename.
|
||||||
# Files should be in darkside's arbitrary file name standard, which is:
|
# Files should be in Patrick's arbitrary file name standard, which is:
|
||||||
# album/artist-tracknum-title.(ogg|flac)
|
# artist/album/artist-tracknum-title.(ogg|flac)
|
||||||
|
#
|
||||||
|
# The top-level directory (artist) is optional. Filenames should contain no
|
||||||
|
# spaces; underscores in the filename are converted to spaces in the resulting
|
||||||
|
# metadata
|
||||||
#
|
#
|
||||||
# Requires vorbiscomment and metaflac
|
# Requires vorbiscomment and metaflac
|
||||||
#
|
#
|
||||||
# Changelog:
|
# Changelog:
|
||||||
# 0.2.2: added flac support
|
# 0.2.3: added documentation, -0 command-line option
|
||||||
|
# 0.2.2: added flac support, documentation
|
||||||
# 0.2.1: fixed version in help message
|
# 0.2.1: fixed version in help message
|
||||||
# fixed handling of dashes in artist name and title
|
# fixed handling of dashes in artist name and title
|
||||||
# 0.2: aligned version with ds-audiotools
|
# 0.2: aligned version with ds-audiotools
|
||||||
# 0.1.1: added version variable
|
# 0.1.1: added version variable
|
||||||
# 0.1: initial implementation
|
# 0.1: initial implementation
|
||||||
|
|
||||||
$VERSION = "0.2.2";
|
$VERSION = "0.2.3";
|
||||||
$HELP_MSG = "Vorbiscomment from Filename $VERSION\n\tusage: vcfromfilename [options] <files>\n";
|
$HELP_MSG = "Vorbiscomment from Filename $VERSION\n\tusage: vcfromfilename [options] <files>\n\nValid options:\n\t-n\tOnly set the track numbers\n\t-0\tPreserve leading 0s in track numbers";
|
||||||
|
|
||||||
chomp($COMMENTFILENAME = '/tmp/vcfromfilename-' . `whoami`);
|
chomp($COMMENTFILENAME = '/tmp/vcfromfilename-' . `whoami`);
|
||||||
|
|
||||||
@ -29,6 +35,7 @@ foreach (@ARGV)
|
|||||||
{
|
{
|
||||||
if (/^(-h)|(--help)$/) { die $HELP_MSG; }
|
if (/^(-h)|(--help)$/) { die $HELP_MSG; }
|
||||||
if (/^-n$/) { $tracknumonly = true; s/.*//g; }
|
if (/^-n$/) { $tracknumonly = true; s/.*//g; }
|
||||||
|
if (/^-0$/) { $extrazero = true; s/.*//g; }
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set the album name
|
# Set the album name
|
||||||
@ -88,7 +95,7 @@ foreach (@ARGV)
|
|||||||
# Now get the track number
|
# Now get the track number
|
||||||
my $tracknum = $_;
|
my $tracknum = $_;
|
||||||
$tracknum =~ s/.*-(\d{2})-.*/\1/;
|
$tracknum =~ s/.*-(\d{2})-.*/\1/;
|
||||||
$tracknum =~ s/\b0*//; # removing leading zeros
|
if (!$extrazeros) { $tracknum =~ s/\b0*//; } # removing leading zeros
|
||||||
$tracknum = formatName($tracknum, 'tracknumber=');
|
$tracknum = formatName($tracknum, 'tracknumber=');
|
||||||
print COMMENTFILE $tracknum;
|
print COMMENTFILE $tracknum;
|
||||||
|
|
Reference in New Issue
Block a user