view gaim2blt.pl @ 6656:dd9e0bd6488e

[gaim-migrate @ 7181] Danilo Segan writes: "Aleksandar has updated some of the translation, and I've updated the other part. So, attached is the new Serbian (sr.po) and Serbian Latin (sr@Latn.po) translation -- both files are gzipped. Because of some updates, it seems that translators are also creditted now: please use the following in that case: Danilo Segan <dsegan@gmx.net> Aleksandar Urosevic <urke@users.sourceforge.net> If you cannot put both names, you can put mine in the "previous translators" list, and Aleksandar's in the "current translators" (though, we're both actively supporting the translation ;-)." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 31 Aug 2003 15:32:26 +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