Automatic or Manually Assisted: Automatic
Programming Language(s): Python
Function Overview: replace {{unreferenced}} on BLPs with {{BLP unsourced}}
Edit period(s): 1 large run initially, then probably weekly after that
Already has a bot flag (Y/N): Y
Function Details: Finds the intersection of Category:Living people and Category:All articles lacking sources and replaces {{unreferenced}} on the pages with {{BLP unsourced}} (or removes {{unreferenced}} if it has both) for proper categorization. I think there's about 19,000 pages that would be updated on the first, main run, and based on a query of recentchanges, about 40 per week after that. Mr.Z-man 01:15, 2 April 2009 (UTC)[reply]
19,000 pages? Good Christ. More technically, I assume you've sampled the pages to ensure that all (or nearly all) will be appropriately modified if you change the template. Corner cases may need consideration here, too. Like pages that use the template multiple times (sometimes people put one in each unreferenced section) or pages that already have {{BLP_unreferenced}} on them in addition to {{Unreferenced}}. (This of course assumes you didn't exclude all of those already.) Other than that, the request looks good. --MZMcBride (talk) 01:46, 2 April 2009 (UTC)[reply]
This is fairly straightforward. Approved for trial (100 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. BJTalk 01:50, 2 April 2009 (UTC)[reply]
re.sub("{{unreferenced}}", "", page_text) if not re.search("{{BLP_unreferenced}}", page_text) page_text.insert(0, {{BLP_unreferenced}})
BJTalk 02:13, 2 April 2009 (UTC)[reply]
Trial complete. - edits. Mr.Z-man 04:26, 5 April 2009 (UTC)[reply]
Checked nearly all 100 diffs. All looked good to me. Minor quibble: can you sort the list alphabetically before running the bot on it? Especially for long runs, this helps give an idea of how much longer the bot has to go. (And I assume you dealt with all the possible corner cases in a nice manner, like inline uses of the template and use in combination with {{Article issues}}?) --MZMcBride (talk) 04:37, 5 April 2009 (UTC)[reply]