Wikipedia:Bots/Requests for approval/NationalRegisterBot 2
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Approved.
Operator: Dudemanfellabra (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 06:23, Friday July 11, 2014 (UTC)
Automatic, Supervised, or Manual: Supervised
Programming language(s): JavaScript (probably)
Source code available: None yet
Function overview: Create redirects to all county lists linked from United States National Register of Historic Places listings in the form of "National Register of Historic Places in PLACE"->"National Register of Historic Places listings in PLACE"
Links to relevant discussions (where appropriate): WT:NRHP#Mass creation of redirects
Edit period(s): One time run
Estimated number of pages affected: 3-4K
Exclusion compliant (Yes/No): N/A
Already has a bot flag (Yes/No): Should since the bot already exists, but I'm not sure it does since its edits aren't marked bot
Function details: Loop through all counties and subdivisions with NRHP lists found on WP:NRHPPROGRESS. Determine for each county if the redirect "National Register of Historic Places in COUNTY" exists. If it does, check to make sure it points to the right place. If it doesn't, create it and point it to the right place.
Discussion
[edit]Note: User:NationalRegisterBot DOES already have a bot flag Special:UserRights/NationalRegisterBot. — xaosflux Talk 15:25, 11 July 2014 (UTC)[reply]
- Approved for trial (30 edits or 30 days). Please provide a link to the relevant contributions and/or diffs when the trial is complete.. — xaosflux Talk 15:27, 11 July 2014 (UTC)[reply]
- Initial trial OK, concerned it may be more complicated then you are expecting, please report back results here; may request an extended larger scale trial if needed. — xaosflux Talk 15:28, 11 July 2014 (UTC)[reply]
- As the person who made the initial request, I'm confused why it would be complicated. All the bot needs to do is to find what pages need to be created, find if each of the list pages is a list or a redirect, and then create each redirect with its target either as the list page or the as the list's target. In other words, bot needs to know that National Register of Historic Places in Perry County, Indiana should redirect to National Register of Historic Places listings in Perry County, Indiana because that's a standalone page, while National Register of Historic Places in Crawford County, Indiana needs to redirect to National Register of Historic Places listings in Indiana#Crawford County because National Register of Historic Places listings in Crawford County, Indiana redirects to there. Why would this be difficult for the bot to determine? If the problem is getting the original list (bot's wondering what pages to create in the first place), I can supply a complete list if requested. Nyttend (talk) 21:13, 11 July 2014 (UTC)[reply]
- As this is being coded from scratch, potential syntax, unusual titles, etc may present technical hurdles. If it doesn't that is great! — xaosflux Talk 03:20, 12 July 2014 (UTC)[reply]
- We have a highly standardised set of page titles; perhaps Dudemanfellabra is thinking somewhat differently, but at least when I proposed it, I was imagining creating only pages with "National Register of Historic Places in X", and only if "National Register of Historic Places listings in X" already existed. If we have any pages with other titles, that's a matter that requires repair rather than accommodation through additional instructions (aside from an instruction to ignore all pages with nonstandard titles, which would be crucial), and if the bot doesn't create redirects because of a nonstandard title, that omission will actively help us find the pages that need repair. Plus, should the bot omit anything because of a nonstandard title, the omissions will be few enough that manual creation will be easy. Nyttend (talk) 04:24, 12 July 2014 (UTC)[reply]
- As this is being coded from scratch, potential syntax, unusual titles, etc may present technical hurdles. If it doesn't that is great! — xaosflux Talk 03:20, 12 July 2014 (UTC)[reply]
- As the person who made the initial request, I'm confused why it would be complicated. All the bot needs to do is to find what pages need to be created, find if each of the list pages is a list or a redirect, and then create each redirect with its target either as the list page or the as the list's target. In other words, bot needs to know that National Register of Historic Places in Perry County, Indiana should redirect to National Register of Historic Places listings in Perry County, Indiana because that's a standalone page, while National Register of Historic Places in Crawford County, Indiana needs to redirect to National Register of Historic Places listings in Indiana#Crawford County because National Register of Historic Places listings in Crawford County, Indiana redirects to there. Why would this be difficult for the bot to determine? If the problem is getting the original list (bot's wondering what pages to create in the first place), I can supply a complete list if requested. Nyttend (talk) 21:13, 11 July 2014 (UTC)[reply]
- Initial trial OK, concerned it may be more complicated then you are expecting, please report back results here; may request an extended larger scale trial if needed. — xaosflux Talk 15:28, 11 July 2014 (UTC)[reply]
- Thanks for the trial approval. I didn't expect it to come so fast–I figured there would at least be some discussion haha–so I haven't had time to whip up any code yet. I, too, don't think it will be that difficult, but we'll see when I get it created. I planned on getting some other stuff taken care of first, but now that the approval is there, I'll move this to the top of my to-do list. I'll try to get something done by tonight if I have time. I'll probably just output to a user page first saying this is what the bot would do to each page (e.g. "National Register of Historic Places in Perry County, Indiana does not exist; create and point to National Register of Historic Places listings in Perry County, Indiana") and let that be the trial (although if it's wanted, I can still edit the first 30 pages to show that the editing function works).--Dudemanfellabra (talk) 02:55, 12 July 2014 (UTC)[reply]
- Editing to the userspace is fine. We had a bit of a backlog in RFBOT going on for a while and some of us BAG members are trying to keep it moving, while ensuring that there are no community or policy issues is important, having limited trials to ensure the technical aspects are ready serve to both ensure the task is possible, and to give better examples for any needed community discussion. — xaosflux Talk 03:17, 12 July 2014 (UTC)[reply]
- Note, extended the trial date out to ensure you have time to complete coding. — xaosflux Talk 03:20, 12 July 2014 (UTC)[reply]
- Editing to the userspace is fine. We had a bit of a backlog in RFBOT going on for a while and some of us BAG members are trying to keep it moving, while ensuring that there are no community or policy issues is important, having limited trials to ensure the technical aspects are ready serve to both ensure the task is possible, and to give better examples for any needed community discussion. — xaosflux Talk 03:17, 12 July 2014 (UTC)[reply]
- I wrote up some code at User:Dudemanfellabra/Sandbox.js (at the bottom.. I also have some other functions on that page for another project I'm working on) and dumped the output to User:NationalRegisterBot/Redirects. I didn't edit any pages, but the output tells you what would happen if I were to edit them.
- The code first figures out if the relevant page is a redlink or not since some have already been created, e.g. National Register of Historic Places in Pitkin County, Colorado.
- If the page exists, it checks the target of the redirect.
- If the existing target is correct, no action is necessary.
- If the existing target is incorrect (of which there were no examples in the output), I would have to make code to replace the existing target with the correct one. Since there were no examples and I don't expect there to be any, I'll forego coding this, although it would be a simple regex replace in the wikitext.
- If the page does not exist, it shows the page to which it should redirect.
- If the page exists but is not a redirect (again, no examples), the code throws an error for manual attention.
- All that remains is to actually create the redirects, which is easy to do with a simple edit function. Does anyone have any problems with the output?--Dudemanfellabra (talk) 15:36, 12 July 2014 (UTC)[reply]
- This is what I was hoping to see, and I'd guess that everyone else at WT:NRHP would agree. Nyttend (talk) 15:42, 12 July 2014 (UTC)[reply]
- Trial complete.
- A user has requested the attention of the operator. Once the operator has seen this message and replied, please deactivate this tag. (user notified) - To be clear, is the only edit task you are going to perform now is to create the redirects from this list: User:NationalRegisterBot/Redirects ? — xaosflux Talk 03:34, 16 July 2014 (UTC)[reply]
- Yes, that is all the bot is going to do. It will be a one-time run.--Dudemanfellabra (talk) 11:25, 16 July 2014 (UTC)[reply]
- A user has requested the attention of the operator. Once the operator has seen this message and replied, please deactivate this tag. (user notified) - To be clear, is the only edit task you are going to perform now is to create the redirects from this list: User:NationalRegisterBot/Redirects ? — xaosflux Talk 03:34, 16 July 2014 (UTC)[reply]
Approved. — xaosflux Talk 01:37, 17 July 2014 (UTC)[reply]
- The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.