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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: WikiProjectWorker: * Seems to be done.
AnomieBOT (talk | contribs)
Updating published sources: WikiProjectTagger, WikiProjectWorker: * Retire these tasks, WikiProject templates have changed a bunch since I last ran these.
 
(59 intermediate revisions by the same user not shown)
Line 1:
{{ombox|type=notice|text= Approved 2009-04-08<br />[[Wikipedia:Bots/Requests for approval/AnomieBOT 28]]}}
{{ombox|type=notice|text= Retired 2024-01-29. Haven't had call to run this in a while, and the related templates have changed so I'd probably have to update this code to run it again.}}
<source lang="perl">
<syntaxhighlight lang="perl">
package tasks::WikiProjectWorker;
 
Line 7 ⟶ 8:
=begin metadata
 
Bot: AnomieBOT
Task: WikiProjectWorker
BRFA: Wikipedia:Bots/Requests for approval/AnomieBOT 28
Status: ApprovedInactive 20092024-0401-0829
Rate: Max 6 edits/minute
Created: 2009-03-27
OnDemand: true
Line 27 ⟶ 28:
 
use Data::Dumper;
use Digest::SHA qw/sha256_base64/;
use AnomieBOT::Task;
use vars qw/@ISA/;
Line 33:
 
### Request link, for edit summary.
my $req="[[User:AnomieBOT/req/WikiProject NRHPHigher 1Education|request]]";
 
### Increment this number every time a new run is started, so we don't have to
### mess around with deleting previous runs' database entries.
my $seq=728;
 
### How to find the pages?
my @cats%catmap = (
'"Category:NationalArticles Registerusing ofinfobox Historicuniversity" Places=> in"WikiProject Alabama'Higher education",
'Category:National Register of Historic Places in Alabama by county',
'Category:Bridges on the National Register of Historic Places in Alabama',
'Category:Houses on the National Register of Historic Places in Alabama',
'Category:National Register of Historic Places Multiple Property Submissions in Alabama',
'Category:National Historic Landmarks in Alabama',
'Category:National Historic Sites in Alabama',
'Category: Buildings of religious function on the National Register of Historic Places in Alabama',
'Category:Alabama Registered Historic Place stubs',
'Category:National Register of Historic Places in Alaska',
'Category:National Historic Landmarks in Alaska',
'Category:National Historic Sites in Alaska',
'Category:National Register of Historic Places in Alaska by borough and census area',
'Category:Houses on the National Register of Historic Places in Alaska',
'Category:Buildings of religious function on the National Register of Historic Places in Alaska',
'Category:Alaska Registered Historic Place stubs',
'Category:National Register of Historic Places in Alaska',
'Category:National Historic Landmarks in Arizona',
'Category:National Historic Sites in Arizona',
'Category:National Register of Historic Places in Arizona by county',
'Category:Arizona Registered Historic Place stubs',
'Category:National Register of Historic Places in Arkansas',
'Category:National Historic Landmarks in Arkansas',
'Category:National Historic Sites in Arkansas',
'Category:Houses on the National Register of Historic Places in Arkansas',
'Category:Arkansas Registered Historic Place stubs',
'Category:National Register of Historic Places in California',
'Category:National Historic Landmarks in California',
'Category:National Historic Sites in California',
'Category:National Register of Historic Places in the San Fernando Valley',
'Category:Registered Historic Places of religious function in California',
'Category:National Register of Historic Places in the San Francisco Bay Area',
'Category:National Register of Historic Places in Sonoma County, California',
'Category:California Registered Historic Place stubs',
'Category:National Register of Historic Places in Colorado',
'Category:National Historic Landmarks in Colorado',
'Category:National Historic Sites in Colorado',
'Category:National Register of Historic Places in Colorado by county',
'Category:Buildings of religious function on the National Register of Historic Places in Colorado',
'Category:National Register of Historic Places in Connecticut',
'Category:National Historic Landmarks in Connecticut',
'Category:National Historic Sites in Connecticut',
'Category:National Register of Historic Places in Fairfield County, Connecticut',
'Category:National Register of Historic Places in Delaware',
'Category:National Historic Landmarks in Delaware',
'Category:Houses on the National Register of Historic Places in Delaware',
'Category:Buildings of religious function on the National Register of Historic Places in Delaware',
'Category:National Register of Historic Places in Florida',
'Category:National Register of Historic Places in Florida by county',
'Category:Houses on the National Register of Historic Places in Florida',
'Category:National Register of Historic Places Multiple Property Submissions in Florida',
'Category:National Historic Landmarks in Florida',
'Category:National Register of Historic Places in Alachua County, Florida',
'Category:National Register of Historic Places in Brevard County, Florida',
'Category:National Register of Historic Places in Broward County, Florida',
'Category:National Register of Historic Places in Charlotte County, Florida',
'Category:National Register of Historic Places in Clay County, Florida',
'Category:National Register of Historic Places in Collier County, Florida',
'Category:National Register of Historic Places in Duval County, Florida',
'Category:National Register of Historic Places in Escambia County, Florida',
'Category:National Register of Historic Places in Hillsborough County, Florida',
'Category:National Register of Historic Places in Indian River County, Florida',
'Category:National Register of Historic Places in Jefferson County, Florida',
'Category:National Register of Historic Places in Lake County, Florida',
'Category:National Register of Historic Places in Lee County, Florida',
'Category:National Register of Historic Places in Leon County, Florida',
'Category:National Register of Historic Places in Manatee County, Florida',
'Category:National Register of Historic Places in Marion County, Florida',
'Category:National Register of Historic Places in Miami-Dade County, Florida',
'Category:National Register of Historic Places in Monroe County, Florida',
'Category:National Register of Historic Places in Orange County, Florida',
'Category:National Register of Historic Places in Palm Beach County, Florida',
'Category:National Register of Historic Places in Pinellas County, Florida',
'Category:National Register of Historic Places in Polk County, Florida',
'Category:National Register of Historic Places in Putnam County, Florida',
'Category:Buildings of religious function on the National Register of Historic Places in Florida',
'Category:National Register of Historic Places in St. Johns County, Florida',
'Category:National Register of Historic Places in St. Lucie County, Florida',
'Category:National Register of Historic Places in Santa Rosa County, Florida',
'Category:National Register of Historic Places in Sarasota County, Florida',
'Category:National Register of Historic Places in Seminole County, Florida',
'Category:National Register of Historic Places in Volusia County, Florida',
'Category:Duval County Registered Historic Places building and structure stubs',
'Category:Florida Registered Historic Places building and structure stubs',
'Category:Florida Registered Historic Places district stubs',
'Category:Hillsborough County Registered Historic Places building and structure stubs',
'Category:Miami-Dade County Registered Historic Places building and structure stubs',
'Category:Sarasota County Registered Historic Places building and structure stubs',
'Category:National Register of Historic Places in Miami, Florida',
'Category:National Register of Historic Places in Key West, Florida',
'Category:Duval County Registered Historic Places building and structure stubs',
'Category:Hillsborough County Registered Historic Places building and structure stubs',
'Category:Miami-Dade County Registered Historic Places building and structure stubs',
'Category:Sarasota County Registered Historic Places building and structure stubs',
'Category:Houses on the National Register of Historic Places in Hillsborough County, Florida',
'Category:Houses on the National Register of Historic Places in Sarasota County, Florida',
'Category:Houses on the National Register of Historic Places in Hillsborough County, Florida',
'Category:Houses on the National Register of Historic Places in Sarasota County, Florida',
'Category:Houses on the National Register of Historic Places in Volusia County, Florida',
'Category:National Register of Historic Places in Georgia (U.S. state)',
'Category:National Historic Landmarks in Georgia (U.S. state)',
'Category:National Historic Sites in Georgia (U.S. state)',
'Category:National Register of Historic Places in Hawaii',
'Category:National Historic Landmarks in Hawaii',
'Category:National Historic Sites in Hawaii',
'Category:Houses on the National Register of Historic Places in Hawaii',
'Category:Buildings of religious function on the National Register of Historic Places in Hawaii',
'Category:National Register of Historic Places in Idaho',
'Category:National Historic Landmarks in Idaho',
'Category:National Register of Historic Places in Idaho by county',
'Category:Houses on the National Register of Historic Places in Idaho',
'Category:National Historic Sites in Idaho',
'Category:Buildings of religious function on the National Register of Historic Places in Idaho',
'Category:National Register of Historic Places in Illinois',
'Category:National Historic Landmarks in Illinois',
'Category:National Historic Sites in Illinois',
'Category:National Register of Historic Places in Boone County, Illinois',
'Category:National Register of Historic Places in Cook County, Illinois',
'Category:National Register of Historic Places in DeKalb County, Illinois',
'Category:National Register of Historic Places in DuPage County, Illinois',
'Category:National Register of Historic Places Multiple Property Submissions in Illinois',
'Category:National Register of Historic Places in Jo Daviess County, Illinois',
'Category:National Register of Historic Places in Kendall County, Illinois',
'Category:National Register of Historic Places in Lake County, Illinois',
'Category:National Register of Historic Places in Lee County, Illinois',
'Category:National Register of Historic Places in McHenry County, Illinois',
'Category:National Register of Historic Places in McLean County, Illinois',
'Category:National Register of Historic Places in LaSalle County, Illinois',
'Category:National Register of Historic Places in Montgomery County, Illinois',
'Category:National Register of Historic Places in Sangamon County, Illinois',
'Category:National Register of Historic Places in Chicago, Illinois',
'Category:National Register of Historic Places in Ogle County, Illinois',
'Category:National Register of Historic Places in Peoria County, Illinois',
'Category:National Register of Historic Places in Stephenson County, Illinois',
'Category:National Register of Historic Places in Whiteside County, Illinois',
'Category:National Register of Historic Places in Will County, Illinois',
'Category:Illinois Registered Historic Place stubs',
'Category:National Register of Historic Places in Indiana',
'Category:National Historic Landmarks in Indiana',
'Category:National Register of Historic Places in Adams County, Indiana',
'Category:National Register of Historic Places in Allen County, Indiana',
'Category:National Register of Historic Places in Bartholomew County, Indiana',
'Category:National Register of Historic Places in Benton County, Indiana',
'Category:National Register of Historic Places in Clark County, Indiana',
'Category:National Register of Historic Places in Clinton County, Indiana',
'Category:National Register of Historic Places in Crawford County, Indiana',
'Category:National Register of Historic Places in Daviess County, Indiana',
'Category:National Register of Historic Places in Dearborn County, Indiana',
'Category:National Register of Historic Places in Delaware County, Indiana',
'Category:National Register of Historic Places in Elkhart County, Indiana',
'Category:National Register of Historic Places in Fayette County, Indiana',
'Category:National Register of Historic Places in Floyd County, Indiana',
'Category:National Register of Historic Places in Franklin County, Indiana',
'Category:National Register of Historic Places in Fulton County, Indiana',
'Category:National Register of Historic Places in Grant County, Indiana',
'Category:National Register of Historic Places in Hancock County, Indiana',
'Category:National Register of Historic Places in Harrison County, Indiana',
'Category:National Register of Historic Places in Henry County, Indiana',
'Category:National Register of Historic Places in Howard County, Indiana',
'Category:National Register of Historic Places in Huntington County, Indiana',
'Category:National Register of Historic Places in Indianapolis, Indiana',
'Category:National Register of Historic Places in Jackson County, Indiana',
'Category:National Register of Historic Places in Jefferson County, Indiana',
'Category:National Register of Historic Places in Knox County, Indiana',
'Category:National Register of Historic Places in LaGrange County, Indiana',
'Category:National Register of Historic Places in Lake County, Indiana',
'Category:National Register of Historic Places in Lawrence County, Indiana',
'Category:National Register of Historic Places in Madison County, Indiana',
'Category:National Register of Historic Places in Marshall County, Indiana',
'Category:National Register of Historic Places in Miami County, Indiana',
'Category:National Register of Historic Places in Monroe County, Indiana',
'Category:National Register of Historic Places in Montgomery County, Indiana',
'Category:National Register of Historic Places in Morgan County, Indiana',
'Category:National Register of Historic Places in Noble County, Indiana',
'Category:National Register of Historic Places in Ohio County, Indiana',
'Category:National Register of Historic Places in Orange County, Indiana',
'Category:National Register of Historic Places in Owen County, Indiana',
'Category:National Register of Historic Places in Parke County, Indiana',
'Category:National Register of Historic Places in Porter County, Indiana',
'Category:National Register of Historic Places in Pulaski County, Indiana',
'Category:National Register of Historic Places in Putnam County, Indiana',
'Category:National Register of Historic Places in Rush County, Indiana',
'Category:National Register of Historic Places in Scott County, Indiana',
'Category:National Register of Historic Places in St. Joseph County, Indiana',
'Category:National Register of Historic Places in Sullivan County, Indiana',
'Category:National Register of Historic Places in Switzerland County, Indiana',
'Category:National Register of Historic Places in Tippecanoe County, Indiana',
'Category:National Register of Historic Places in Vanderburgh County, Indiana',
'Category:National Register of Historic Places in Vigo County, Indiana',
'Category:National Register of Historic Places in Warren County, Indiana',
'Category:National Register of Historic Places in Washington County, Indiana',
'Category:National Register of Historic Places in Wayne County, Indiana',
'Category:National Register of Historic Places in Whitley County, Indiana',
'Category:Indiana Registered Historic Place stubs',
'Category:National Historic Landmarks in Indianapolis, Indiana',
'Category:National Historic Landmarks in Indianapolis, Indiana',
'Category:National Register of Historic Places in Evansville',
'Category:National Register of Historic Places in Terre Haute',
'Category:National Register of Historic Places in Iowa',
'Category:National Historic Landmarks in Iowa',
'Category:National Historic Sites in Iowa',
'Category:National Register of Historic Places in Iowa by county',
'Category:Houses on the National Register of Historic Places in Iowa',
'Category:Buildings of religious function on the National Register of Historic Places in Iowa',
'Category:National Register of Historic Places in Kansas',
'Category:National Historic Landmarks in Kansas',
'Category:National Historic Sites in Kansas',
'Category:National Register of Historic Places in Kansas by county',
'Category:Houses on the National Register of Historic Places in Kansas',
'Category:Buildings of religious function on the National Register of Historic Places in Kansas ',
'Category:Kansas Registered Historic Place stubs',
'Category:National Register of Historic Places in Kentucky',
'Category:National Historic Landmarks in Kentucky',
'Category:National Register of Historic Places in Kentucky by county',
'Category:National Register of Historic Places in Bath County, Kentucky',
'Category:National Register of Historic Places in Bell County, Kentucky',
'Category:National Register of Historic Places in Bracken County, Kentucky',
'Category:National Register of Historic Places in Bullitt County, Kentucky',
'Category:National Register of Historic Places in Clay County, Kentucky',
'Category:National Register of Historic Places in Harlan County, Kentucky',
'Category:National Register of Historic Places in Knox County, Kentucky',
'Category:National Register of Historic Places in LaRue County, Kentucky',
'Category:National Register of Historic Places in Lewis County, Kentucky',
'Category:National Register of Historic Places in Madison County, Kentucky',
'Category:National Register of Historic Places in Montgomery County, Kentucky',
'Category:National Register of Historic Places in Pendleton County, Kentucky',
'Category:National Register of Historic Places in Powell County, Kentucky',
'Category:National Register of Historic Places in Pulaski County, Kentucky',
'Category:National Register of Historic Places in Shelby County, Kentucky',
'Category:National Register of Historic Places in Trigg County, Kentucky',
'Category:Kentucky Registered Historic Place stubs',
'Category:National Register of Historic Places in Anderson County, Kentucky',
'Category:National Register of Historic Places in Barren County, Kentucky',
'Category:National Register of Historic Places in Boone County, Kentucky',
'Category:National Register of Historic Places in Bourbon County, Kentucky',
'Category:National Register of Historic Places in Boyle County, Kentucky',
'Category:National Register of Historic Places in Butler County, Kentucky',
'Category:National Register of Historic Places in Caldwell County, Kentucky',
'Category:National Register of Historic Places in Calloway County, Kentucky',
'Category:National Register of Historic Places in Campbell County, Kentucky',
'Category:National Register of Historic Places in Christian County, Kentucky',
'Category:National Register of Historic Places in Clark County, Kentucky',
'Category:National Register of Historic Places in Daviess County, Kentucky',
'Category:National Register of Historic Places in Fayette County, Kentucky',
'Category:National Register of Historic Places in Franklin County, Kentucky',
'Category:National Register of Historic Places in Fulton County, Kentucky',
'Category:National Register of Historic Places in Garrard County, Kentucky',
'Category:National Register of Historic Places in Graves County, Kentucky',
'Category:National Register of Historic Places in Grayson County, Kentucky',
'Category:National Register of Historic Places in Green County, Kentucky',
'Category:National Register of Historic Places in Hardin County, Kentucky',
'Category:National Register of Historic Places in Harrison County, Kentucky',
'Category:National Register of Historic Places in Hart County, Kentucky',
'Category:National Register of Historic Places in Henderson County, Kentucky',
'Category:National Register of Historic Places in Henry County, Kentucky',
'Category:National Register of Historic Places in Hickman County, Kentucky',
'Category:National Register of Historic Places in Jefferson County, Kentucky',
'Category:National Register of Historic Places in Jessamine County, Kentucky',
'Category:National Register of Historic Places in Kenton County, Kentucky',
'Category:National Register of Historic Places in Lincoln County, Kentucky',
'Category:National Register of Historic Places in Logan County, Kentucky',
'Category:National Register of Historic Places in Magoffin County, Kentucky',
'Category:National Register of Historic Places in Marion County, Kentucky',
'Category:National Register of Historic Places in McCracken County, Kentucky',
'Category:National Register of Historic Places in Meade County, Kentucky',
'Category:National Register of Historic Places in Mercer County, Kentucky',
'Category:National Register of Historic Places in Nelson County, Kentucky',
'Category:National Register of Historic Places in Oldham County, Kentucky',
'Category:National Register of Historic Places in Scott County, Kentucky',
'Category:National Register of Historic Places in Taylor County, Kentucky',
'Category:National Register of Historic Places in Todd County, Kentucky',
'Category:National Register of Historic Places in Union County, Kentucky',
'Category:National Register of Historic Places in Warren County, Kentucky',
'Category:National Register of Historic Places in Washington County, Kentucky',
'Category:National Register of Historic Places in Woodford County, Kentucky',
'Category:National Register of Historic Places in Danville, Kentucky',
'Category:National Register of Historic Places in Lexington, Kentucky',
'Category:National Register of Historic Places in Louisville, Kentucky',
'Category:National Register of Historic Places in Louisiana',
'Category:National Historic Landmarks in Louisiana',
'Category:Louisiana Registered Historic Place stubs',
'Category:National Register of Historic Places in Maine',
'Category:National Historic Landmarks in Maine',
'Category:National Register of Historic Places in Maine by county',
'Category:Maine Registered Historic Place stubs',
'Category:National Register of Historic Places in Maryland',
'Category:National Historic Landmarks in Maryland',
'Category:National Historic Sites in Maryland',
'Category:National Register of Historic Places in Maryland by county',
'Category:Buildings of religious function on the National Register of Historic Places in Maryland',
'Category:National Register of Historic Places in Massachusetts',
'Category:National Historic Landmarks in Massachusetts',
'Category:National Historic Sites in Massachusetts',
'Category:National Register of Historic Places in Michigan',
'Category:Registered Historic Places in Michigan by county',
'Category:National Historic Landmarks in Michigan',
'Category:Michigan Registered Historic Place stubs',
'Category:National Register of Historic Places in Minnesota',
'Category:National Historic Landmarks in Minnesota',
'Category:National Register of Historic Places in Minnesota by county',
'Category:Houses on the National Register of Historic Places in Minnesota',
'Category:National Register of Historic Places in Minneapolis, Minnesota',
'Category:National Register of Historic Places in Mississippi',
'Category:National Historic Landmarks in Mississippi',
'Category:Mississippi Registered Historic Place stubs',
'Category:National Register of Historic Places in Missouri',
'Category:National Historic Landmarks in Missouri',
'Category:National Historic Sites in Missouri',
'Category:Missouri Registered Historic Place stubs',
'Category:National Register of Historic Places in Montana',
'Category:National Historic Landmarks in Montana',
'Category:National Historic Sites in Montana',
'Category:National Register of Historic Places in Montana by county',
'Category:Houses on the National Register of Historic Places in Montana',
'Category:Buildings of religious function on the National Register of Historic Places in Montana',
'Category:Montana Registered Historic Place stubs',
'Category:National Register of Historic Places in Nebraska',
'Category:National Historic Landmarks in Nebraska',
'Category:National Historic Sites in Nebraska',
'Category:National Register of Historic Places in Nebraska by county',
'Category:National Register of Historic Places Multiple Property Submissions in Nebraska',
'Category:National Register of Historic Places in Omaha, Nebraska',
'Category:Buildings of religious function on the National Register of Historic Places in Nebraska',
'Category:Nebraska Registered Historic Place stubs',
'Category:National Register of Historic Places in Nevada',
'Category:National Historic Landmarks in Nevada',
'Category:Houses on the National Register of Historic Places in Nevada',
'Category:National Register of Historic Places in Clark County, Nevada',
'Category:National Register of Historic Places in Las Vegas',
'Category:National Register of Historic Places in New Hampshire',
'Category:National Historic Landmarks in New Hampshire',
'Category:National Historic Sites in New Hampshire',
'Category:National Register of Historic Places in New Hampshire by county',
'Category:Bridges on the National Register of Historic Places in New Hampshire',
'Category:Houses on the National Register of Historic Places in New Hampshire',
'Category:Buildings of religious function on the National Register of Historic Places in New Hampshire',
'Category:National Register of Historic Places in New Jersey',
'Category:National Historic Landmarks in New Jersey',
'Category:New Jersey Registered Historic Place stubs',
'Category:Houses on the National Register of Historic Places in New Jersey',
'Category:National Register of Historic Places in New Mexico',
'Category:National Historic Landmarks in New Mexico',
'Category:National Register of Historic Places in New Mexico by county',
'Category:Houses on the National Register of Historic Places in New Mexico',
'Category:New Mexico Registered Historic Place stubs',
'Category:National Register of Historic Places in New York',
'Category:New York Registered Historic Place stubs',
'Category:National Register of Historic Places in New York by county',
'Category:National Historic Landmarks in New York',
'Category:National Historic Sites in New York',
'Category:National Register of Historic Places in New York City',
'Category:National Register of Historic Places in Orange County, New York',
'Category:National Register of Historic Places in Rensselaer County, New York',
'Category:National Register of Historic Places listings in Suffolk County, New York',
'Category:National Register of Historic Places in Sullivan County, New York',
'Category:National Register of Historic Places in Ulster County, New York',
'Category:National Register of Historic Places listings in Babylon (town), New York',
'Category:National Register of Historic Places listings in Brookhaven (town), New York',
'Category:National Register of Historic Places listings in East Hampton (town), New York',
'Category:National Register of Historic Places listings in Huntington (town), New York',
'Category:National Register of Historic Places listings in Islip (town), New York',
'Category:National Register of Historic Places listings in Riverhead (town), New York',
'Category:National Register of Historic Places listings in Shelter Island, New York',
'Category:National Register of Historic Places listings in Smithtown (town), New York',
'Category:National Register of Historic Places listings in Southampton (town), New York',
'Category:National Register of Historic Places listings in Southold (town), New York',
'Category:National Historic Landmarks in New York City',
'Category:National Register of Historic Places in Manhattan',
'Category:National Register of Historic Places in North Carolina',
'Category:National Historic Landmarks in North Carolina',
'Category:National Historic Sites in North Carolina',
'Category:Houses on the National Register of Historic Places in North Carolina',
'Category:National Register of Historic Places in Wake County, North Carolina',
'Category:North Carolina Registered Historic Place stubs',
'Category:National Register of Historic Places in Raleigh, North Carolina',
'Category:National Register of Historic Places in North Dakota',
'Category:National Historic Landmarks in North Dakota',
'Category:National Register of Historic Places in North Dakota by county',
'Category:National Historic Sites in North Dakota',
'Category:Houses on the National Register of Historic Places in North Dakota',
'Category:Buildings of religious function on the National Register of Historic Places in North Dakota',
'Category:National Register of Historic Places in Ohio',
'Category:National Historic Landmarks in Ohio',
'Category:National Historic Sites in Ohio',
'Category:National Register of Historic Places in Ohio by county',
'Category:National Register of Historic Places in Cincinnati, Ohio',
'Category:National Register of Historic Places in Oklahoma',
'Category:National Historic Landmarks in Oklahoma',
'Category:National Historic Sites in Oklahoma',
'Category:Houses on the National Register of Historic Places in Oklahoma',
'Category:National Register of Historic Places in Oklahoma by county',
'Category:Buildings of religious function on the National Register of Historic Places in Oklahoma',
'Category:Oklahoma Registered Historic Place stubs',
'Category:National Register of Historic Places in Oregon',
'Category:National Historic Landmarks in Oregon',
'Category:National Historic Sites in Oregon',
'Category:National Register of Historic Places in Clackamas County, Oregon',
'Category:National Register of Historic Places in Jackson County, Oregon',
'Category:National Register of Historic Places in Lane County, Oregon',
'Category:National Register of Historic Places in Marion County, Oregon',
'Category:National Register of Historic Places in Multnomah County, Oregon',
'Category:National Register of Historic Places in Yamhill County, Oregon',
'Category:Registered Historic Places of religious function in Oregon',
'Category:National Register of Historic Places in Washington County, Oregon',
'Category:Oregon Registered Historic Place stubs',
'Category:National Register of Historic Places in Pennsylvania',
'Category:National Historic Landmarks in Pennsylvania',
'Category:Pennsylvania Registered Historic Place stubs',
'Category:National Register of Historic Places in Pennsylvania by county',
'Category:National Register of Historic Places in Philadelphia, Pennsylvania',
'Category:National Register of Historic Places in Rhode Island',
'Category:National Historic Landmarks in Rhode Island',
'Category:National Historic Sites in Rhode Island',
'Category:National Register of Historic Places in Rhode Island by county',
'Category:Bridges on the National Register of Historic Places in Rhode Island',
'Category:Houses on the National Register of Historic Places in Rhode Island',
'Category:National Register of Historic Places in South Carolina',
'Category:National Historic Sites in South Carolina',
'Category:National Historic Landmarks in South Carolina',
'Category:National Register of Historic Places in South Carolina by county',
'Category:Buildings of religious function on the National Register of Historic Places in South Carolina',
'Category:National Register of Historic Places in South Dakota',
'Category:National Historic Landmarks in South Dakota',
'Category:National Historic Sites in South Dakota',
'Category:National Register of Historic Places in South Dakota by county',
'Category:National Register of Historic Places in Tennessee',
'Category:National Historic Landmarks in Tennessee',
'Category:National Historic Sites in Tennessee',
'Category:National Register of Historic Places in Tennessee by county',
'Category:Buildings of religious function on the National Register of Historic Places in Tennessee',
'Category:National Register of Historic Places in Texas',
'Category:National Historic Landmarks in Texas',
'Category:National Historic Sites in Texas',
'Category:National Register of Historic Places in Austin, Texas',
'Category:Houses on the National Register of Historic Places in Texas',
'Category:National Register of Historic Places in Houston, Texas',
'Category:National Register of Historic Places in Utah',
'Category:National Historic Landmarks in Utah',
'Category:National Historic Sites in Utah',
'Category:National Register of Historic Places in Utah by county',
'Category:Houses on the National Register of Historic Places in Utah',
'Category:Buildings of religious function on the National Register of Historic Places in Utah',
'Category:National Register of Historic Places in Vermont',
'Category:National Historic Landmarks in Vermont',
'Category:National Register of Historic Places in Vermont by county',
'Category:Bridges on the National Register of Historic Places in Vermont',
'Category:Houses on the National Register of Historic Places in Vermont',
'Category:Buildings of religious function on the National Register of Historic Places in Vermont',
'Category:Vermont Registered Historic Places building and structure stubs',
'Category:National Register of Historic Places in Virginia',
'Category:National Historic Landmarks in Virginia',
'Category:National Historic Sites in Virginia',
'Category:National Register of Historic Places in Roanoke, Virginia',
'Category:National Register of Historic Places in Washington (U.S. state)',
'Category:National Historic Landmarks in Washington (U.S. state)',
'Category:National Historic Sites in Washington (U.S. state)',
'Category:Buildings of religious function on the National Register of Historic Places in Washington (U.S. state)',
'Category:National Register of Historic Places in Seattle, Washington',
'Category:National Register of Historic Places in Washington, D.C.',
'Category:National Historic Landmarks in Washington, D.C.',
'Category:National Historic Sites in Washington, D.C.',
'Category:Houses on the National Register of Historic Places in Washington, D.C.',
'Category:Washington, D.C. Registered Historic Place stubs',
'Category:National Register of Historic Places in Wisconsin',
'Category:National Historic Landmarks in Wisconsin',
'Category:Houses on the National Register of Historic Places in Wisconsin',
'Category:Buildings of religious function on the National Register of Historic Places in Wisconsin',
'Category:National Register of Historic Places in West Virginia',
'Category:National Historic Landmarks in West Virginia',
'Category:National Register of Historic Places in West Virginia by county',
'Category:Buildings of religious function on the National Register of Historic Places in West Virginia',
'Category:National Register of Historic Places in Wyoming',
'Category:National Historic Landmarks in Wyoming',
'Category:National Historic Sites in Wyoming',
'Category:National Register of Historic Places in Wyoming by county',
'Category:Houses on the National Register of Historic Places in Wyoming',
'Category:Buildings of religious function on the National Register of Historic Places in Wyoming',
'Category:Wyoming Registered Historic Place stubs',
'Category:National Register of Historic Places by United States insular area',
'Category:National Register of Historic Places in American Samoa',
'Category:National Register of Historic Places in the Federated States of Micronesia',
'Category:National Register of Historic Places in Guam',
'Category:National Register of Historic Places in the Marshall Islands',
'Category:National Register of Historic Places in the Northern Mariana Islands',
'Category:National Register of Historic Places in Palau',
'Category:National Register of Historic Places in Puerto Rico',
'Category:National Register of Historic Places in the United States Virgin Islands',
'Category:National Historic Landmarks in Puerto Rico',
);
my @cats=keys %catmap;
my @iterators=(
{
list generator => 'allpagescategorymembers',
gcmtitle => [@cats],
apprefix => 'National Register of Historic Places listings in',
apnamespacegcmlimit => 0100,
apfilterredir => 'nonredirects',
aplimit => 'max',
},
{
list => 'categorymembers',
cmtitle => \@cats,
cmnamespace => 0,
cmlimit => 'max',
},
);
Line 549 ⟶ 55:
### page to tag (or undef to skip).
sub filter {
return undef$_[0]->{'title'}='Talk:'.$_[0]->{'title'} if $_[0]->{'redirectns'}==0;
return $_[0]->{'Talktitle'}=~s/^([^:]*):/$1 talk:/ if($_[0]->{'.ns'}!=0 && ($_[0]->{'titlens'}&1)==0);
return $_[0]->{'title'};
}
 
### How to copy other projects' assessments
sub copy_class {
return ($_[0]->WPBmax($_[2]))[0];
return 'list' if $_[1]=~/^Talk:National Register of Historic Places listings in/;
#return '';
}
 
my $always_copy_importance = 0;
my $set_empty_importance = 0;
sub copy_importance {
#return ($_[0]->WPBmax($_[2]))[1];
return '';
}
 
# Banner configurations.
my $main_banner='WikiProject NationalHigher Register of Historic Placeseducation';
my @preprocess_templates=();
my %banner_cfgs=(
'WikiProject NationalHigher Register of Historic Placeseducation' => {
meta => 01,
stubauto => undef,
importance => '',
canonicalize => 'WikiProject Higher education',
},
);
 
# Extra parameters (e.g. workgroup).
my @extra_params=();
my $taggingwith = @extra_params ? '|' . join( '|', @extra_params ) : '';
 
# Regex fragment to match any aliases of params in @extra_params.
my %extra_param_aliases = ();
 
# Possible main banners, usually just $main_banner.
my @main_banners=(
$main_banner,
);
 
# Set this to merge these existing banners into $main_banner.
my @merge_banners=();
 
# Set this to tag WikiProject Biography workgroups in addition to the project's own banner.
my @bio_wg = (
);
 
Line 578 ⟶ 106:
my $self=$class->SUPER::new();
$self->{'config loaded'}=0;
$self->{'iter'}=undef;
$self->{'iterators'}=[@iterators];
bless $self, $class;
return $self;
Line 586 ⟶ 116:
=for info
Approved 2009-04-08<br />[[Wikipedia:Bots/Requests for approval/AnomieBOT 28]]
 
=for info
Retired 2024-01-29. Haven't had call to run this in a while, and the related templates have changed so I'd probably have to update this code to run it again.
 
=cut
Line 606 ⟶ 139:
$cfg=$api->WPBMetaConfig($cfg->{'meta'}, %$cfg) if exists($cfg->{'meta'});
$cfg{$banner}=$cfg;
$banner_cfgs{$banner}{'stubauto'}=$cfg->{'stubauto'};
}
$api->WPBconfig(%cfg);
 
$self->{'config loaded'}=1;
}
Line 617 ⟶ 152:
my $endtime=time()+300;
 
while(1){
foreach my $itercfg (@iterators) {
my $iter=$apiself->iterator(%$itercfg){'iter'};
if(!defined($iter)){
my $i=shift @{$self->{'iterators'}};
last unless $i;
$iter=$api->iterator(%$i);
$self->{'iter'}=$iter;
}
while(my $page=$iter->next()){
if(!$page->{'_ok_'}){
Line 657 ⟶ 198:
$api->log("Checking $title...");
 
my $intxt=exists($tok->{'revisions'}[0]{'*slots'})?$tok->{'revisionsmain'}[0]{'*'}: // '';
my ($outtxt,$nowiki)=$api->strip_nowiki($intxt);
 
my @params=()@extra_params;
 
my $assess = undef;
Line 668 ⟶ 209:
next;
}
if($class eq ''){=~s/^\s+|\s+$//g;
$assess=$api->WPBassess($title);
if(ref($assess) eq 'HASH'){
if($assess->{'code'} eq 'pagemissing'){
# No subject page, doesn't matter
$assess=undef;
} else {
$api->warn("Processing $title failed: ".$assess->{'error'}."\n");
next;
}
}
}
#push @params, 'auto=yes' if ($assess // '') eq 'stub';
 
my $copy_importance = $always_copy_importance; # Always copy?
if($class eq '' || lc($class) eq lc($assess)){
$class='';
} else {
$assess=undef;
push @params, "class=$class";
$copy_importance = 1;
}
 
if($copy_importance){
my $imp = copy_importance($api, $title, $intxt);
if(ref($imp) eq 'HASH'){
Line 687 ⟶ 236:
next;
}
#push @params, "importance=$imp" if ( $set_empty_importance || ($imp//'') eqne '' );
}
 
my $need_main_banner = ($api->WPBcheck($outtxt, $main_banner@main_banners) == 0);
if(0){
# grr, already redirected so the above always returns true
$need_main_banner=1;
$api->WPBcheck($outtxt, sub {
my $banner=shift;
my $name=shift;
$need_main_banner=0 if(grep $name eq $_, @main_banners);
return undef;
}, @main_banners);
}
 
### PROCESSING ###
Line 696 ⟶ 255:
my @merge=();
my @summary=();
my $no_summary = 0;
 
# Special: Different default parent banner depending on source category.
if(@preprocess_templates){
$main_banner = $catmap{$iter->iterval};
 
if(@merge_banners){
(undef,$outtxt)=$api->WPBcheck($outtxt, sub {
my $banner=shift;
Line 704 ⟶ 267:
my $params=shift;
my $wikitext=shift;
 
return undef if(grep $name eq $_, @main_banners);
 
push @merge, $oname;
 
return '' unless $need_main_banner;
$need_main_banner=0;
return "{{$main_banner}}";
}, @preprocess_templatesmerge_banners);
if(ref($outtxt) eq 'HASH'){
$api->warn("Preprocessing $title failed: ".$outtxt->{'error'}."\n");
next;
}
if(!@merge){
$apimerge[->warn("$title1]='and contains "'.$itermerge[->iterval.",1] butif not in section 0\n")@merge>1;
push @summary, "merging ".join((@merge>2)?', ':' ', @merge)." into $main_banner" if @merge;
$no_summary = 1 if @merge;
} else {
# $api->warn("$title contains ".$iter->iterval.", but not in section 0\n");
next;
}
$merge[-1]='and '.$merge[-1] if @merge>1;
push @summary, "merging ".join((@merge>2)?', ':' ', @merge)." into $main_banner" if @merge;
}
 
$outtxt=$api->WPBaddif ($outtxt, $assess,@bio_wg sub) {
shiftmy %added_wg=(); # banner
shift;(undef,$outtxt)=$api->WPBcheck($outtxt, #sub name{
my $onamebanner=shift;
my $paramsname=shift;
my $wikitextoname=shift;
my $newparams=shift;
return undef if my $newwikitext=shift;
 
foreach my $p%have = (@params){;
next unlessforeach ($p=~/^api->process_paramlist(.+?@$params)=(.*)$/; {
my ( $k,have{$v)_->{'name'}} =($ 1,$2);
my $re=($k eq 'class')?qr/(?i:\Q$v\E)\s*$/:qr/\S/;
unless(grep(/^\s*\Q$k\E\s*=\s*$re/, @$params)){
push @$params, "$k=$v" unless(grep(s/^(\s*\Q$k\E\s*=\s*?)(?:\S.*?)?(\s*)$/$1$v$2/s, @$params));
}
my $any = 0;
foreach my $p (@bio_wg){
next if exists($have{$p});
push @$params, "$p=yes";
$added_wg{"$p=yes"}=1;
$any = 1;
}
return undef unless $any;
 
my $out="{{$oname";
$out.="|".join("|", @$params) if @$params;
$out.="}}";
return $out;
}, 'WikiProject Biography');
if(ref($outtxt) eq 'HASH'){
$api->warn("WPBIO workgroups in $title failed: ".$outtxt->{'error'}."\n");
next;
}
if(%added_wg){
my @added_wg = keys %added_wg;
$added_wg[-1]='and '.$added_wg[-1] if @added_wg>1;
push @summary, "added " . join((@added_wg>2)?', ':' ', @added_wg) . " to {{WikiProject Biography}}";
}
}
 
my $out="{{$oname"tag;
my $out.pg="|".join("|", @$params) if @$paramstitle;
$out.pg="}}"~s/^Talk://;
return $wikitext if ($outpage->{'title'} eqne $wikitext;pg){
push @summary, "updating {{$main_banner}}" unless @summary;page=$api->query(
return titles => $out;pg,
}, $main_banner, @params); prop => 'info',
if(ref($outtxt) eq 'HASH'){ redirects => 1,
$api->warn("Processing $title failed: ".$outtxt->{'error'}."\n");
next;if($page->{'code'} ne 'success'){
$api->warn("Could not load $pg info: ".$page->{'error'}."\n");
return 60;
}
 
$page=(values %{$page->{'query'}{'pages'}})[0];
}
 
my @process_banners = ();
$api->WPBcheck( $outtxt, sub { push @process_banners, $_[0]; }, @main_banners );
@process_banners = ( $main_banner ) unless @process_banners;
for my $process_banner (@process_banners) {
$outtxt=$api->WPBadd($outtxt, $assess, sub {
my $banner=shift; # banner
my $name=shift; # name
my $oname=shift;
my $params=shift;
my $wikitext=shift;
my $new=shift;
#return '' if $new;
 
return undef unless(grep $banner eq $_, @main_banners);
my %cfg=%{$banner_cfgs{$banner}};
 
my $any=0;
foreach my $p (@params){
next unless $p=~/^(.+?)=(.*)$/;
my ($k,$v)=($1,$2);
my $kre=qr/\Q$k\E/;
if ( defined( $extra_param_aliases{$k} ) ) {
my $aliasre = $extra_param_aliases{$k};
$kre = qr/(?:$kre|$aliasre)/;
}
my $re=qr/\S.*?/;
unless(grep(/^\s*$kre\s*=\s*$re\s*$/, @$params)){
next if(grep(/^\s*$kre\s*=\s*(?i:\Q$v\E)\s*$/s, @$params));
unshift @$params, "$k=$v" unless(grep(s/^(\s*$kre\s*=\s*?)(?:\S.*?)?(\s*)$/$1$v$2/s, @$params));
$any=1 unless $v eq '';
if($k eq 'class' && exists($cfg{'meta'}) && ($cfg{'stubauto'}//'')){
my $aa=$cfg{'stubauto'};
$aa=~s/\s*=.*//;
push @$params, "$aa=inherit" unless(grep(s/^(\s*\Q$aa\E\s*=\s*?)(?:\S.*?)?(\s*)$/$1inherit$2/s, @$params));
}
}
}
if($new && $class && (grep /^class=/, @$params) && exists($cfg{'meta'}) && ($cfg{'stubauto'}//'')){
my $aa=$cfg{'stubauto'};
$aa=~s/\s*=.*//;
push @$params, "$aa=inherit" unless(grep(s/^(\s*\Q$aa\E\s*=\s*?)(?:\S.*?)?(\s*)$/$1inherit$2/s, @$params));
$any=1;
}
return $wikitext unless $any;
 
if(defined($cfg{'canonicalize'})){
my $n=$cfg{'canonicalize'};
$oname=~s/_/ /g;
$oname=~s/^(\s*)\S(?:.*\S)?(\s*)$/$1$n$2/is;
}
my $out="{{$oname";
$out.="|".join("|", @$params) if @$params;
$out.="}}";
return $out;
}, $process_banner, @params);
if(ref($outtxt) eq 'HASH'){
$api->warn("Processing $title failed: ".$outtxt->{'error'}."\n");
next;
}
push @summary, "Tagging with {{$process_banner$taggingwith}}" unless $no_summary;
}
push @summary, "Tagging with {{$main_banner}}" unless @summary;
 
$outtxt=$api->replace_nowiki($outtxt, $nowiki);
Line 760 ⟶ 415:
next;
}
my $oldcat=$outtxtiter->iterval;
$outtxtsummary[-1]='and '.$apisummary[-1] if @summary>WPBfixshell($outtxt)1;
my $summary = ucfirst(join((@summary>2)?', ':' ', @summary))." per $req";
 
my @cleanup=();
$outtxt=$api->WPBfixshell($outtxt, \@cleanup);
if(ref($outtxt) eq 'HASH'){
$api->warn("Processing $title failed: ".$outtxt->{'error'}."\n");
next;
}
push @$summary, .="; general banner cleanup (".join(', if', $outtxt@cleanup).")" neif $old@cleanup;
$summary.=". $errto";
 
my $cat=$iter->iterval;
$summary[-1]='and '.$summary[-1] if @summary>1;
my $summary = ucfirst(join((@summary>2)?', ':' ', @summary))." per $req $errto";
$api->log("$summary in $title");
my $r=$api->edit($tok, $outtxt, $summary, 1, 1);
Line 787 ⟶ 444:
return 0 if time()>=$endtime;
}
$self->{'iter'}=undef;
}
 
# No more pages to check, try again in 10 minutes or so in case of errors.
$self->{'iter'}=undef;
$self->{'iterators'}=[@iterators];
$api->log("WikiProjectWorker may be DONE!");
return 600;
}
 
1;
</source>
 
</syntaxhighlight>