5a6 > # $Id: moblog.pl,v 1.3 2004/08/18 20:45:59 viv Exp $ 19a21,31 > # this is a tag in the subject line of the message as delivered, > # to be stripped before changing it to the story title -- > # leave blank if not using a subject line tag > my $blog_tag = ""; > > # the suffix appended to blosxom story files, e.g. 'txt' > my $blog_suffix = "txt"; > > # line-break tag to use, e.g.
,
,
,

,

, or

> my $brtag = "

"; > 29c41 < my $uri_pattern = q|photo|; --- > my $uri_pattern = q|$blog_title$brtag|; 53a66,71 > my $text_part = ""; # the text/plain portion of the message > > # first, strip any (optional) subject-line moblog-entry identifier > $blog_title =~ s/(${blog_tag}[ ])(.*)/$2/; > # then strip any trailing newlines to avoid polluting IMG ALT tag > chomp($blog_title); 71c89,90 < $blog_entry .= $uri_pattern; --- > $uri_pattern =~ s/\$blog_title/$blog_title/e; > $uri_pattern =~ s/\$brtag/$brtag/e; 74d92 < $blog_entry .= "

\n"; 76c94 < $blog_entry .= "$line
\n"; --- > $text_part .= "$line\n"; 78c96 < $blog_entry .= "

\n"; --- > $text_part .= "$brtag\n"; 83a102,105 > # Print parts of the story entry in the order you choose > $blog_entry = ""; > $blog_entry .= "$uri_pattern\n"; > $blog_entry .= "$text_part\n"; 89c111 < my (undef, $file) = tempfile(DIR => $text, SUFFIX => '.txt', OPEN => 0); --- > my (undef, $file) = tempfile(DIR => $text, SUFFIX => ".$blog_suffix", OPEN => 0); 91c113 < print OUT "$blog_title\n$blog_entry"; --- > print OUT "$blog_title\n\n$blog_entry";