view gaim2blt.pl @ 4163:986c175a607c

[gaim-migrate @ 4392] Bjo"rn Voigt (bjoernv) writes: " The German translation po/de.po is very old: "PO-Revision-Date: 2002-03-31 11:29+0200\n" Also, this translation is written with the ISO-8859-1 character set. Some characters (German umlauts) are not shown in Gaim, because gaim.cvs uses UTF-8. An updated po/de.po file can be found here: http://user.cs.tu-berlin.de/~bjoern/gaim/" this is of course, the translation at that url. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Tue, 31 Dec 2002 21:00:55 +0000
parents 66bf7ecefedd
children
line wrap: on
line source

#!/usr/bin/perl -w
# Original by Andy Harrison,
# Rewrite by Decklin Foster,
# Available under the GPL.

package Gaim2Blt;
use strict;
use Getopt::Std;
use vars qw(%opts $in_group);

getopts('s:', \%opts);
die "usage: $0 -s 'screen name' gaim.buddy\n" unless $opts{s};

print <<"EOF";
Config {
  version 1
}
User {
  screenname "$opts{s}"
}
Buddy {
  list {
EOF

while (<>) {
    chomp;
    my ($type, $args) = split ' ', $_, 2;
    next unless $type;

    if ($type eq 'g') {
        print "    }\n" if ($in_group);
        print qq(    "$args" {\n);
        $in_group = 1;
    } elsif ($type eq 'b') {
        my ($buddy, $alias) = split /:/, $args;
        print qq(      "$buddy"\n);
    }
}

print <<"EOF";
    }
  }
}
EOF