--- tamtam/tamtam2socialtext.pl 2007/12/13 11:42:24 22 +++ tamtam/tamtam2socialtext.pl 2007/12/13 11:46:46 23 @@ -17,10 +17,12 @@ my $debug = 0; my $max = 999; +my $attachments = 0; GetOptions( 'debug+' => \$debug, 'max=i' => \$max, + 'attachments' => \$attachments, ); my $page; @@ -209,11 +211,14 @@ $Rester->put_pagetag( $name, $_ ); print "+ tag $_\n"; } - foreach my $a ( @{ $p->{attachments} } ) { - my $type = $m->get_mime( $a->{full_path} ); - my $content = read_file( $a->{full_path} ); - print "+ attachment ", $a->{name}," $type ", length($content), " bytes\n"; - $Rester->post_attachment($name, $a->{name}, $content, $type ); + + if ( $attachments ) { + foreach my $a ( @{ $p->{attachments} } ) { + my $type = $m->get_mime( $a->{full_path} ); + my $content = read_file( $a->{full_path} ); + print "+ attachment ", $a->{name}," $type ", length($content), " bytes\n"; + $Rester->post_attachment($name, $a->{name}, $content, $type ); + } } }