/[socialtext-import]/tamtam/tamtam2socialtext.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /tamtam/tamtam2socialtext.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 20 by dpavlin, Thu Dec 13 11:38:36 2007 UTC revision 22 by dpavlin, Thu Dec 13 11:42:24 2007 UTC
# Line 12  use HTTP::Date; Line 12  use HTTP::Date;
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    
# Line 35  find({ Line 41  find({
41                                  'attachment' => '+name',                                  'attachment' => '+name',
42                                  'meta' => 'name',                                  'meta' => 'name',
43                          },                          },
44                          ForceArray => [ 'attachment', 'widget' ],                          ForceArray => [ 'attachment', 'meta', 'widget' ],
45                  ) || die "can't open $path: $!";                  ) || die "can't open $path: $!";
46    
47                  warn "## $path = ",dump( $ref ) if $debug;                  warn "## $path = ",dump( $ref ) if $debug;
# Line 189  foreach my $name ( keys %$page ) { Line 195  foreach my $name ( keys %$page ) {
195          $body =~ s,``,,gs;          $body =~ s,``,,gs;
196    
197          $body .= qq{          $body .= qq{
198    
199  ----  ----
200    
201  "original"<http://www.razmjenavjestina.org/$full_name> {date: $date}  "original"<http://www.razmjenavjestina.org/$full_name> {date: $date}

Legend:
Removed from v.20  
changed lines
  Added in v.22

  ViewVC Help
Powered by ViewVC 1.1.26