User:AnomieBOT/source/tasks/DeletionSortingCleaner.pm: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: DeletionSortingCleaner: * And approved! I wonder if that's a record outside of cases where a BAGger was specifically coordinating.
AnomieBOT (talk | contribs)
Updating published sources: DeletionSortingCleaner: * Look for <code>xfd-closed</code> class to recognize closed discussions, <code>boilerplate metadata</code> might be used by other things too. * Update result regex too.
Line 223:
# If closed, remove from the main page and note it for archival.
# If still open, do nothing.
return undef unless $xfdintxt=~m!<div class=\x22boilerplate "[^"]*(?:<=[am" ]fd|metadata)[xt]fd-closed[ "]!;
my ($result,$date)=('(unknown)','(unknown)');
$result=$1 if $xfdintxt=~m!(?:result was|result of the discussion was:(?:'')?)\s*(?:'''|<(?:b|strong)>)(.+?)(?:'''|</(?:b|strong)>)!;
$date=$1 if $xfdintxt=~m!(\d\d:\d\d, \d+ \w+ \d{4} \(UTC\))!;
unshift @archive, "* [[$name|$name2]] - (".length($xfdintxt).") - $result - <small>closed $date</small>";