view gaim2blt.pl @ 8310:cc3a65c19ecf

[gaim-migrate @ 9034] <nosnilmot> I think someone should remove buddy_chat.c from POTFILES.in === can you commit this fix? i cant do it from work... ----- Original Message ----- From: <seven@nimrod-online.com> To: <gaim@robflynn.com> Sent: Thursday, February 19, 2004 10:25 AM Subject: 'nl.po' typo > Dear Rob, > > Yesterday i sent an e-mail to your sourceforge account. I bet you > never read it, so here it is again (in short ;)). First of all, love > Gaim, hate MSN Messenger 6.1, so I use it ;). When I got rather bored > I started reading the dutch translation (nl.po), to look for any > mistakes, and hey, I found one! Where it says > #~ msgid "State:" > #~ msgstr "Privincie:" > it should say: > #~ msgid "State:" > #~ msgstr "Provincie:" > Well, that was about all > > Roy Spliet. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sat, 21 Feb 2004 20:32:06 +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