view gaim2blt.pl @ 9221:8054855f2bb9

[gaim-migrate @ 10017] a yahoo japan patch from wing: 1. Recognize ISO2022 in Subject header 2. Go to mail.yahoo.co.jp if account is marked as "Yahoo Japan" 3. Make profiles.yahoo.co.jp a #define and use it in yahoo_profile.c I poked at it myself some too, to make it give the right profile url in the get info box for yahoo japan. I also added a new macro to connection.h to check if a connection is valid. I'm not very good at macros, however, and used its argument twice. Someone should fix that :) committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Sun, 06 Jun 2004 18:45: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