#! /usr/bin/perl
use Jcode;
use MIME::QuotedPrint;

my $content = "";
while(my $line = <STDIN>) {
    $content .= $line;
}
my $summary = encode_qp(Jcode->new($content)->sjis);
$summary =~ s/\n/=0A/gos;
chomp($summary);

my $result = << "END_OF_MEMO";
BEGIN:VCALENDAR
VERSION:1.0
BEGIN:VTODO
SUMMARY;ENCODING=QUOTED-PRINTABLE:$summary
END:VTODO
END:VCALENDAR
END_OF_MEMO

print $result;
exit(0);
