view gaim2blt.pl @ 8445:46f3c447da4d

[gaim-migrate @ 9175] Mar 13 20:58:37 <nosnilmot> LSchiere2: ping Mar 13 21:04:28 <LSchiere2> semi-pong Mar 13 21:05:11 <nosnilmot> LSchiere2: simple one, do you want a patch that splits changelog into ChangeLog & po/ChangeLog ? Mar 13 21:05:24 <LSchiere2> sure. go ahead Mar 13 21:06:13 <nosnilmot> http://www.nosnilmot.com/patches/gaim-0.76cvs-i18n-changelog.patch ... Mar 13 21:58:31 <nosnilmot> LSchiere2: did you get that changelog patch? Mar 13 22:01:44 <LSchiere2> i grabbed it, nothing more .... Mar 14 00:53:07 <LSchiere> nosnilmot: i left that patch at work accidentally All times in GST (Gaim Standard Time). committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 14 Mar 2004 19:01:53 +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