Changeset 363

Show
Ignore:
Timestamp:
03/22/07 16:34:31 (20 months ago)
Author:
ogawa
Message:

Add --debug option. This allows you to include the original CSV line as the COMMENT field for each VEVENT.

Location:
cybozu2ical/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • cybozu2ical/trunk/cybozu2ical

    r361 r363  
    2121 
    2222my %opt = (conf => 'config.yaml'); 
    23 GetOptions(\%opt, 'help', 'conf=s') or pod2usage(2); 
     23GetOptions(\%opt, 'help', 'debug', 'conf=s') or pod2usage(2); 
    2424pod2usage(1) if $opt{help}; 
    2525 
     
    4444        description => decode_utf8($item->{description}), 
    4545        created     => to_icaldate($item->{created}), 
    46         dtstamp     => to_icaldate($item->{modified}) 
     46        dtstamp     => to_icaldate($item->{modified}), 
    4747    ); 
     48 
     49    $args{comment} = decode_utf8($item->{debug_info}) 
     50        if $opt{debug} && $item->{debug_info}; 
    4851 
    4952    if ($item->{is_full_day}) { 
  • cybozu2ical/trunk/lib/WWW/CybozuOffice6/Calendar.pm

    r359 r363  
    5454            $this->_parse_recurrent_event(@fields) : 
    5555            $this->_parse_general_event(@fields); 
     56        $item->{debug_info} = $line; # save the CSV line as for debug info. 
    5657        push @items, $item if $item; 
    5758    }