Was my site helpful?

Plus me please!

My Latitude

scripts

run a local slackware current

this comes care of alien who has done so much for the slackware community. basically, you cron a script i believe he built, i opted to create and use a custom config file, and found it well documented and straightfoward, the script looks for changes in the CHANGELOG.txt and if it finds updates, downloads them and either generates 3 cdrom images, a dvd image, or both.

ethier way it’s a great script mirror-slackware-current.sh and my local slackware mirror can be found at http://drunkensailor.org/slackware/slackware-current/

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

rename mp3s from id3s

#!/usr/bin/perl
require 5;
use strict;
use Image::ExifTool ‘ImageInfo’;

my $trackdir = $ARGV[0];
opendir(DIR, $trackdir) || die(“unable to open directory $trackdir”);
my @tracks = grep { /.mp3/i } readdir DIR;
closedir DIR;
my $exifTool = new Image::ExifTool;

foreach (@tracks) {
my $filename = “$trackdir/$_”;

$exifTool->ExtractInfo($filename);

my $title = $exifTool->GetValue(‘Title’);
my $album = $exifTool->GetValue(‘Album’);
my $artist = $exifTool->GetValue(‘Artist’);
my $genre = $exifTool->GetValue(‘Genre’);
my $track = $exifTool->GetValue(‘Track’);

$track =~ /[^0-9]*([0-9]+)[^0-9]*/;
$track = $1;

print STDERR “$artist $album $title $genre $track\n”;

$track = sprintf(“%02d”, $track);
my $newname = “$artist-$album-$track-$title”;
$newname =~ s/[^A-Za-z0-9\-\.]+/_/g;
rename(“$trackdir/$_”,”${trackdir}/${newname}.mp3″);

}

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

m4a to mp3

#!/bin/bash
for i in *.m4a
do
faad “$i”
x=`echo “$i”|sed -e ‘s/.m4a/.wav/’`
y=`echo “$i”|sed -e ‘s/.m4a/.mp3/’`
lame -h -b 192 “$x” “$y”
rm “$x”

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter