Mercurial > hg > Applications > Calcon
changeset 9:798ba47e8046 address-book
*** empty log message ***
author | kono |
---|---|
date | Sun, 16 Oct 2005 15:42:04 +0900 |
parents | 37b9a5119474 |
children | 1a68139a269f |
files | Calcon.pm pool.pl |
diffstat | 2 files changed, 25 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/Calcon.pm Sat May 07 23:25:45 2005 +0900 +++ b/Calcon.pm Sun Oct 16 15:42:04 2005 +0900 @@ -3075,6 +3075,8 @@ sub initialize { my ($self) = @_; $self->SUPER::initialize(); + open(OUTPUT,"| nkf -w16") or die("nkf required."); + select OUTPUT; } sub print { @@ -3136,7 +3138,7 @@ # } if(defined $record{'office'}) { $data = "$record{'office'}"; - $self->print("org:$data\n") if($data); + $self->print("ORG:$data;\n") if($data); # if ($cat==0) { # $self->print("CATEGORIES:$data\n") if($data); # } @@ -3162,24 +3164,29 @@ $self->print("item$i.ADR;type=work;type=pref:;;$adr1;$adr2;$adr_state;$adr_zip;$adr_country\n") if ($data); } if(defined $record{'tel'}) { - my $i = $self->{'item'}++; + # my $i = $self->{'item'}++; $data = $record{'tel'}; - $self->print("item$i.TEL;type=work:$data\n") if($data); + $self->print("TEL;type=WORK:$data\n") if($data); + } + if(defined $record{'mobile-tel'}) { + # my $i = $self->{'item'}++; + $data = $record{'mobile-tel'}; + $self->print("TEL;type=CELL:$data\n") if($data); } if(defined $record{'home-tel'}) { - my $i = $self->{'item'}++; + # my $i = $self->{'item'}++; $data = $record{'tel'}; - $self->print("item$i.TEL;type=home:$data\n") if($data); + $self->print("TEL;type=HOME:$data\n") if($data); } if(defined $record{'tel2'}) { - my $i = $self->{'item'}++; + # my $i = $self->{'item'}++; $data = $record{'tel2'}; - $self->print("item$i.tel;type=cell:$data\n") if($data); + $self->print("TEL;type=CELL:$data\n") if($data); } if(defined $record{'fax'}) { - my $i = $self->{'item'}++; + # my $i = $self->{'item'}++; $data = $record{'fax'}; - $self->print( "item$i.TEL;type=pref:$data\n") if($data); + $self->print( "TEL;type=FAX:$data\n") if($data); } if(defined $record{'home-address'}) { my $i = $self->{'item'}++; @@ -3192,11 +3199,17 @@ $adr_zip = $record{'home-zip'}; } $self->print("item$i.ADR;type=home;type=pref:;;$adr1;$adr2;$adr_state;$adr_zip;$adr_country\n") if ($data); + # $self->print("item$1.X-ABADR:ja\n") if ($data); } + if(defined $record{'mail2'}) { + # my $i = $self->{'item'}++; + $data = $record{'mail2'}; + $self->print("EMAIL;type=INTERNET;type=home:$data\n") if($data); + } if(defined $record{'mail'}) { - my $i = $self->{'item'}++; + # my $i = $self->{'item'}++; $data = $record{'mail'}; - $self->print("item$i.EMAIL;type=INTERNET;type=pref:$data\n") if($data); + $self->print("EMAIL;type=INTERNET;type=pref:$data\n") if($data); } if(defined $record{'birth'}) { $data = $record{'birth'};
--- a/pool.pl Sat May 07 23:25:45 2005 +0900 +++ b/pool.pl Sun Oct 16 15:42:04 2005 +0900 @@ -23,6 +23,7 @@ 'SLA300' => 'Calcon::Sla300_write', 'AppleScript' => 'Calcon::iApp_write', 'iApp' => 'Calcon::iApp_write', + 'Address Book' => 'Calcon::Vcard_Apple_write', 'Entourage' => 'Calcon::Entourage_write', 'Print' => 'Calcon::Print_write', 'File' => 'Calcon::File_write',