chiark
/
gitweb
/
~webstump
/
modbot-mtm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a86612b
)
Deal more sensibly with various combinations of input format
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 4 Mar 2010 17:23:17 +0000
(17:23 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 4 Mar 2010 17:23:17 +0000
(17:23 +0000)
xlog/bin/record
patch
|
blob
|
history
diff --git
a/xlog/bin/record
b/xlog/bin/record
index 11c7e605678d4d0dc8339506be5c3e243d45fa3a..1ba50b70ae543452a6e303297dbc9fcb0225a0e6 100755
(executable)
--- a/
xlog/bin/record
+++ b/
xlog/bin/record
@@
-39,16
+39,28
@@
sub parse_posted () {
}
sub parse_submission () {
my $hadng=0;
}
sub parse_submission () {
my $hadng=0;
+ my %oldf;
+ my $had2=0;
while (<STDIN>) {
chomp;
while (<STDIN>) {
chomp;
+print STDERR "$hadng $had2|$_|\n";
$hadng++ if m/^Newsgroups:/i;
if (m/^$/) {
last if $hadng;
$hadng++ if m/^Newsgroups:/i;
if (m/^$/) {
last if $hadng;
+ last if $had2++;
+ %oldf= %f;
undef %f;
}
undef %f;
}
+ last unless m/^\S+\:|^\s|^$|^From /;
parse__headerline();
}
parse__headerline();
}
- $f{Event}= 'receive';
+ if ($hadng) {
+ $f{Event}= $had2 ? 'receive newstyle' : 'receive';
+ } else {
+ %f= %oldf if $had2;
+ $f{Subject}= '[suppressed]';
+ $f{Event}= 'receive junk';
+ }
}
sub parse_stump2webstump () {
}
sub parse_stump2webstump () {