view gaim2blt.pl @ 8988:d6fea11c62d7

[gaim-migrate @ 9763] " This patch moves the single Font preference from the Font page to the Message Text page, and makes the "Tab Placement" drop down sensitive only when tabs are enabled. I moved the "Tab Placement" pref to the bottom of the Tab preferences because a) it makes sense that it's below the tab enabled pref when it depends on it, and b) it looked silly if I put it in the middle of the boolean prefs." --Stu Tomlinson "Date: 2004-05-20 14:11 Sender: nosnilmot Logged In: YES user_id=309779 Changed "Font" to "Default Formatting" and put the imhtml+toolbar in a frame." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Thu, 20 May 2004 18:14:18 +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