First of all: thankyou for zenphoto! It's quick, it's uncomplicated and it does it's job! Don't add too much extras and I luv you forever.
I had gallery2 running and it was a pain. Much too huge and hard to understand, when you needed to tweak it.
I wrote this perl script to import the image description from within gallery. Use at your own risk and only, if you know what you're doing:
---snip---
#!/usr/bin/perl
##############################################################################
use DBI();
$user = "xxx";
$password = "xxx";
$dbh = DBI->connect("DBI:mysql:database=xxx;host=localhost", "$user", "$password",
{'RaiseError' => 1});
$counter = 0;
%UMLAUTE = ( 'Ä' => 'Ae', 'Ö' => 'Oe', 'Ü' => 'Ue','ä' => 'ae', 'ö' => 'oe', 'ü' => 'ue', 'ß' => 'ss');
@UMLKEYS = join("|", keys(%UMLAUTE));
$cursor = $dbh->prepare("select gallery2_FileSystemEntity.g_id, gallery2_FileSystemEntity.g_pathComponent, gallery2_Item.g_description from
gallery2_FileSystemEntity, gallery2_Item where gallery2_FileSystemEntity.g_id = gallery2_Item.g_id;") || die "Prepare schiefgegangen ($DBI::errstr)";
$cursor->execute() || die "Query schiefgegangen ($DBI::errstr)";
while(defined(my $row = $cursor->fetch))
{
$id = $row->[0];
$datei = $row->[1];
$besch = $row->[2];
$besch =~ s/(@UMLKEYS)/$UMLAUTE{$1}/g;
$besch = $dbh->quote($besch);
$datei = $dbh->quote($datei);
my $statement = "UPDATE zen_images SET title = $besch WHERE filename = $datei";
$dbh->do("$statement");
$counter++;
print "$counter: $datei --- $besch\n";
select(undef, undef, undef, 0.2); ## wait 200 ms for the database
}}
}
exit(0);
---snap---
It's intended to run in the shell, so don't try to call it from a browser. And check, if the queries work with your database, before you try.
Might help someone get rid of Gallery2!