Index: /trunk/id3ascii
===================================================================
--- /trunk/id3ascii	(revision 37)
+++ /trunk/id3ascii	(revision 37)
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# converts the ID3 tag info in files given as arguments to ASCII-only,
+# using the Perl Unidecode module
+
+for FILE in "$@"; do
+    echo "$FILE"
+    ./id3dump "$FILE" | unidecode | ./id3load "$FILE"
+done
Index: /trunk/id3dump
===================================================================
--- /trunk/id3dump	(revision 37)
+++ /trunk/id3dump	(revision 37)
@@ -0,0 +1,23 @@
+#!/usr/bin/perl -w
+use strict;
+
+# prints ID3 tag info from an MP3 file in Vorbis tag format to STDOUT
+
+use MP3::Tag;
+
+my $audio_file = shift or die "Usage: $0 <mp3-file>\n";
+my $mp3 = MP3::Tag->new($audio_file);
+
+my %key_for = (
+    ALBUM       => 'album',
+    ARTIST      => 'artist',
+    DATE        => 'year',
+    TITLE       => 'title',
+    TRACKNUMBER => 'track',
+);
+
+my $info = $mp3->autoinfo;
+
+for my $vorbis_tag (sort keys %key_for) {
+    print "$vorbis_tag=" . ($info->{$key_for{$vorbis_tag}} || '') . "\n";
+}
Index: /trunk/id3load
===================================================================
--- /trunk/id3load	(revision 37)
+++ /trunk/id3load	(revision 37)
@@ -0,0 +1,29 @@
+#!/usr/bin/perl -w
+use strict;
+
+# reads tags from STDIN and applies them to the MP3 file given as the first argument
+
+use MP3::Tag;
+
+my $audio_file = shift or die "Usage: $0 <mp3-file>\n";
+my $mp3 = MP3::Tag->new($audio_file);
+
+my %method_for = (
+    ALBUM       => sub { $_[0]->album_set($_[1]) },
+    ARTIST      => sub { $_[0]->artist_set($_[1]) },
+    DATE        => sub { $_[0]->year_set($_[1]) },
+    TITLE       => sub { $_[0]->title_set($_[1]) },
+    TRACKNUMBER => sub { $_[0]->track_set($_[1]) },
+);
+
+while (<>) {
+    chomp;
+    next if /\s*#/;
+    next unless /\S/;
+    my ($key, $value) = split(/=/, $_, 2);
+    if (exists $method_for{$key}) {
+        $method_for{$key}->($mp3, $value);
+    }
+}
+
+$mp3->update_tags;
