--- tamtam/tamtam2socialtext.pl 2007/12/12 13:17:15 8 +++ tamtam/tamtam2socialtext.pl 2007/12/12 13:28:40 10 @@ -16,6 +16,8 @@ my $page; my $page_date; +my @page_names; + find({ wanted => sub { my $path = $File::Find::name; @@ -86,8 +88,14 @@ $body =~ s/'''(.+?)'''/surround('*',$1)/gse; $body =~ s/''(.+?)''/surround('_',$1)/gse; + # fix bullets $body =~ s/^\s+([\*])/$1/gm; + # fix links + $body =~ s/\["([^"]+)"\]/[$1]/gs; + $body =~ s,\[(http://\S+)\s+([^\]]+)\],"$2"<$1>,gs; + $body =~ s,\[(http://[^\]]+)\],$1,gs; + Encode::_utf8_off( $body ); my @tags = ( 'TamTam' );