Mercurial > pidgin
view gaim2blt.pl @ 9073:cb4d9604d1e5
[gaim-migrate @ 9849]
(14:27:33) nosnilmot: LSchiere:
http://www.nosnilmot.com/patches/gaim-0.78cvs-man-prefslash.patch
(14:29:56) Paco-Paco: every line of that file changed, due to word-wrapping
(14:30:20) nosnilmot: yes, that was intentional
(14:30:41) nosnilmot: but the only real changes are adjustments to match
what is actually in preferences now
(14:34:25) wing|work: if i were to re-wrap every line in man pages, i would
wrap after punctuation :P
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 26 May 2004 19:06:47 +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