12 |
use POSIX qw/strftime/; |
use POSIX qw/strftime/; |
13 |
use File::Slurp; |
use File::Slurp; |
14 |
use File::MMagic::XS; |
use File::MMagic::XS; |
15 |
|
use Getopt::Long; |
16 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
17 |
|
|
18 |
my $debug = 0; |
my $debug = 0; |
19 |
my $max = 999; |
my $max = 999; |
20 |
|
|
21 |
|
GetOptions( |
22 |
|
'debug+' => \$debug, |
23 |
|
'max=i' => \$max, |
24 |
|
); |
25 |
|
|
26 |
my $page; |
my $page; |
27 |
my $page_date; |
my $page_date; |
28 |
|
|
160 |
$body =~ s,----(\S+),----\n$1,gs; |
$body =~ s,----(\S+),----\n$1,gs; |
161 |
|
|
162 |
# attachments |
# attachments |
163 |
|
$body =~ s,\[attachment:([^\]]+)(gif|png|jpg|jpeg)\],{image: $1$2},gis; |
164 |
$body =~ s,\[attachment:([^\]]+)\],{file: $1},gs; |
$body =~ s,\[attachment:([^\]]+)\],{file: $1},gs; |
165 |
|
|
166 |
return $body; |
return $body; |
197 |
$body .= qq{ |
$body .= qq{ |
198 |
---- |
---- |
199 |
|
|
200 |
Original http://www.razmjenavjestina.org/$full_name {date: $date} |
"original"<http://www.razmjenavjestina.org/$full_name> {date: $date} |
201 |
}; |
}; |
202 |
|
|
203 |
Encode::_utf8_off( $body ); |
Encode::_utf8_off( $body ); |