Wikipedia:Bots/Requests for approval/NationalRegisterBot
- 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: 00:17, Friday October 25, 2013 (UTC)
Automatic, Supervised, or Manual: Supervised
Programming language(s): JavaScript
Source code available: User:Dudemanfellabra/Sandbox.js, but I guess I'll probably need to move that out somewhere? Not sure since this if my first bot request
Function overview: Tag pages with only one reference to the National Register Information System (NRIS) with the {{NRIS-only}} template message.
Links to relevant discussions (where appropriate): Latest discussion, Initial discussion (other related discussions in more recent archives)
Edit period(s): Probably ~weekly, but it will be operated manually by me
Estimated number of pages affected: ~10,000
Exclusion compliant (Yes/No): No, but I can add it in if necessary
Already has a bot flag (Yes/No): No
Function details: As of this moment, the code only outputs a list of articles that would be tagged to User:Dudemanfellabra/NRISOnly (the last section on the page). If this is approved, I will modify the code to actually edit the articles and tag them with the {{NRIS-only}} tag. This will be manually run periodically by me (and perhaps others later, but there has been no discussion of that) and will eventually be able to remove tags as well as add them. The code is still incomplete, but this is a proof of concept really. This is my first bot request, so I am looking for any kind of guidance possibly from other bot operators. Thanks!--Dudemanfellabra (talk) 00:17, 25 October 2013 (UTC)[reply]
Discussion
[edit]In case you didn't remember, there's already a NrhpBot (talk · contribs · deleted contribs · logs · filter log · block user · block log), and it's responsible for creating lots of the stubs that your bot will tag. It may be much less confusing if you choose a different name. Nyttend (talk) 02:21, 28 October 2013 (UTC)[reply]
- Changed to Userlinks template Also, it should be noted that the bot in question hasn't edited since 2007, might be a good idea to disbar that bot just to be safe. Hasteur (talk) 15:18, 28 October 2013 (UTC)[reply]
Yes, the operator needs a different name. I'm surprised account creation wasn't automatically blocked. I can't see a problem with this task, so... the cleanest way to do this is to withdraw this application and re-apply under the new bot's name. Josh Parris 10:49, 6 November 2013 (UTC)[reply]
- @Josh Parris: I never created the proposed bot account, specifically because of this. Can I just change this ones name to something like User:NRBot (i.e. "National Register Bot") and not have to refile?--Dudemanfellabra (talk) 00:35, 7 November 2013 (UTC)[reply]
- That would screw up things like sub-page titles, confuse AnomieBOT and generally make life hard. Everything will be smooth if you create a new BRFA. Josh Parris 01:09, 7 November 2013 (UTC)[reply]
- If he moves the page to match the new bot name, it should be ok. And if nothing else, I can fix the bot. Anomie⚔ 03:00, 7 November 2013 (UTC)[reply]
- If Anomie says it's good, then give a page move a go! Josh Parris 03:38, 7 November 2013 (UTC)[reply]
- I've just moved the page and updated the title. Still haven't created the user account though. I'll wait for someone to give me the go ahead there in case the move actually did mess something up.--Dudemanfellabra (talk) 04:00, 7 November 2013 (UTC)[reply]
- If Anomie says it's good, then give a page move a go! Josh Parris 03:38, 7 November 2013 (UTC)[reply]
- If he moves the page to match the new bot name, it should be ok. And if nothing else, I can fix the bot. Anomie⚔ 03:00, 7 November 2013 (UTC)[reply]
- That would screw up things like sub-page titles, confuse AnomieBOT and generally make life hard. Everything will be smooth if you create a new BRFA. Josh Parris 01:09, 7 November 2013 (UTC)[reply]
- @Josh Parris: I never created the proposed bot account, specifically because of this. Can I just change this ones name to something like User:NRBot (i.e. "National Register Bot") and not have to refile?--Dudemanfellabra (talk) 00:35, 7 November 2013 (UTC)[reply]
Approved for trial (5 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Josh Parris 06:27, 7 November 2013 (UTC)[reply]
- I finally created an account for the bot after all that was settled, but I had to change the name once again since apparently there is already a User:NRbot (lowercase "b") on some other wiki. I created an account for User:NationalRegisterBot, which I think is fine. I'll work in the next few days on modifying the code to be able to edit pages and post here with the results. Thanks!--Dudemanfellabra (talk) 18:25, 7 November 2013 (UTC)[reply]
- I just ran the code and tagged five articles. I had to revert/rerun twice to get some kinks ironed out, but everything seems to be running smoothly now, and the extension to the full list is straightforward. The bot uses the list dumped at User:Dudemanfellabra/NRISOnly (which will likely be moved to the bot's userspace soon), which can be generated by anyone who installs the script and visits WP:NRHPPROGRESS (though it takes about 6-7 hours to run through, at least on my slow internet connection). The script that edits the articles themselves is locked to only allow the bot to use it and will produce an error if anyone else tries. Before actually editing the pages, the script checks one last time that the pages really do need to be tagged/untagged, just in case the generated list is out of date. This first run's list of articles to be tagged is giant because no articles have been tagged, but after the first run, the list will shrink dramatically.
- See Special:Contributions/NationalRegisterBot for a full list of the bot's contributions, specifically [1][2][3][4][5].--NationalRegisterBot (talk) 20:28, 10 November 2013 (UTC)[reply]
- Note that you shouldn't be making non-bot edits with the bot account, including posting to the BRFA. See WP:BOTACC. Anomie⚔ 13:35, 11 November 2013 (UTC)[reply]
Looks good. Please find five pages that have notices on them already, including some that have {{multiple issues}}, and apply there. Approved for trial (5 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Josh Parris 08:31, 11 November 2013 (UTC)[reply]
- @Dudemanfellabra: if you're having trouble finding matching pages, there's a search tool on the toolserver that will help. Josh Parris 11:04, 13 November 2013 (UTC)[reply]
- It's not so much that I'm having trouble finding matching pages but that I'm having trouble finding time haha. Grad school and such. I just got time last night to sit down and modify the code to be compatible with {{multiple issues}} (i.e. to put the template at the bottom of the list rather than just at the top of the page outside the multiple issues template), and I plan on actually tagging some articles later tonight. The way I have the code set up, it walks through the list on User:Dudemanfellabra/NRISOnly and tags in sequential order..
I can't make itIt would take a large reworking of the code to make it only tag specific articles, so what I planned on doing was just adding random templates to the first five articles in the list, running the bot to tag them, then reverting both changes and posting the diffs here as like a "this will work if it comes up" kind of thing. Yes, for a few minutes the articles will have unnecessary tags, but I'm banking on these articles being obscure enough that during that short period of time no one will even see them or care enough to try to remove them before the bot runs. Is that ok?--Dudemanfellabra (talk) 15:15, 13 November 2013 (UTC)[reply]- No, that's not okay. Modify the list, then roll it back after the test.
- Why aren't you using AWB for this task? Josh Parris 20:58, 13 November 2013 (UTC)[reply]
- I really don't see why that is unreasonable; the articles in question would be affected for literally less than 5-10 minutes while the bot runs. The time that it would take to find five articles (out of ~10,000) that have template messages in them is way longer than it would take to temporarily turn the first five articles on the list into test cases and immediately revert them when finished.
- The reason I'm not using AWB is because the last time I checked (which has been probably years, so correct me if I'm wrong), I need Internet Explorer to use it. I have a Mac and a Linux computer, neither of which support IE, so AWB is a no-go for me. If you have access to AWB and can somehow produce a list of the first five articles with existing template messages from the list in my userspace, feel free to do so, and I can move those five to the beginning of the list to run the code.--Dudemanfellabra (talk) 23:32, 13 November 2013 (UTC)[reply]
- Changing the encyclopaedia for convenience is frowned upon and could be construed as disruptive.
- https://toolserver.org/~daniel/WikiSense/CategoryIntersect.php will allow you to generate a list of pages that match a criteria - I'd suggest category "National Register of Historic Places" and template "Multiple issues". It's not working for me at the moment (my 'net connection's a bit wonky), otherwise I'd just post a list of pages to attack. Josh Parris 06:36, 15 November 2013 (UTC)[reply]
- With that tool, I've found Collinsville Masonic Lodge Hall, East Tennessee and Western North Carolina Railroad, Grapevine Commercial Historic District, Judge Poché Plantation House, Kenilworth Inn, Monnett Memorial M. E. Chapel, North Carolina Executive Mansion, and Union Hall (Truro, Massachusetts). I haven't run the bot on those yet, but seeing these articles, I wanted to get your opinion on some things.
- The Collinsville Masonic Lodge Hall, Grapevine Commercial Historic District, and Monnett Memorial M. E. Chapel articles use {{one source}}, which I'm pretty sure should be replaced by {{NRIS-only}}, as the latter is more specific. I'm pretty sure I can make my code replace this tag (even if it isn't in a multiple issues banner).. should I do so?
- The Kenilworth Inn, North Carolina Executive Mansion, and Judge Poché Plantation House articles have {{refimprove}} on them, so should I replace this one as well?
- Same question for {{more footnotes}}, which is in use on Union Hall (Truro, Massachusetts).
- One thing I see I'll have to add regardless is support for the old syntax of the Multiple issues template, which I see is still in use on Kenilworth Inn and is undoubtedly still in use on other articles. I'll also have to add support for redirects of the Multiple issues template, as well as redirects to the other templates if those are deemed acceptable/necessary to replace. I can probably take care of all/most of this by the end of the weekend, so expect some results by then. Thanks for the help so far!--Dudemanfellabra (talk) 08:00, 15 November 2013 (UTC)[reply]
- With that tool, I've found Collinsville Masonic Lodge Hall, East Tennessee and Western North Carolina Railroad, Grapevine Commercial Historic District, Judge Poché Plantation House, Kenilworth Inn, Monnett Memorial M. E. Chapel, North Carolina Executive Mansion, and Union Hall (Truro, Massachusetts). I haven't run the bot on those yet, but seeing these articles, I wanted to get your opinion on some things.
- It's not so much that I'm having trouble finding matching pages but that I'm having trouble finding time haha. Grad school and such. I just got time last night to sit down and modify the code to be compatible with {{multiple issues}} (i.e. to put the template at the bottom of the list rather than just at the top of the page outside the multiple issues template), and I plan on actually tagging some articles later tonight. The way I have the code set up, it walks through the list on User:Dudemanfellabra/NRISOnly and tags in sequential order..
- My opinion? Category:Articles sourced only to NRIS doesn't seem to be a sub-cat of Category:Articles needing additional references; that needs fixing. Yes, replace {{one source}} because {{NRIS-only}} is a special case of it (various documentation should be altered to note this). The text for {{refimprove}} suggests that the problem isn't the number of sources, but the number of citations, so I'd suggest it's distinct and should not be replaced. {{more footnotes}} is a subtly different complaint again and also should not be replaced.
- You've done well spotting the redirects issue, and the old call format.
- Of course, there's Wikipedia:AutoWikiBrowser/Mono and Wine for non-Windows users. Josh Parris 10:33, 15 November 2013 (UTC)[reply]
Second trial complete
[edit]Trial complete. Second trial complete. These two diffs show the bot replacing {{one source}} with {{NRIS-only}}. This one shows compatibility with the old syntax of {{Multiple issues}}. And these two show simply adding the NRIS-only template to the end of the list in Multiple issues. I went with your opinion and just left the {{refimprove}} and {{more footnotes}} templates alone. The code will also work (it uses the same logic) to replace Template:One source (and all its redirects) even if it isn't inside a multiple issues template. Any other ideas on something we may have missed? The bot can always be reverted, but when it's going to be editing 10,000 pages, I want to get everything right before we start.--Dudemanfellabra (talk) 19:52, 16 November 2013 (UTC)[reply]
- Looks good. That's all the cases that leap to mind; if you were using AWB then it would handle adding the box to a page with too many improvement tags already; your code doesn't insert a {{multiple issues}} template when needed. I don't see that as a show-stopper.
- If you don't have confidence in your code, review its edits. I'm prepared to approve this. Any objection? Josh Parris 22:19, 16 November 2013 (UTC)[reply]
- Hmm I might be able to add that in later, but really I don't expect the affected articles to remain like this for too long. I trust someone will manually add the multiple issues template if needed if not just correct one or more of the issues. This tag is meant to start off a quality enhancement drive at WP:NRHP, so hopefully these tags won't last too long. The continual running is only to catch new editors creating these stubs, and it directs them to why they shouldn't be doing what they're doing. I have full confidence in my code, and am prepared to run it immediately. Thanks for all the help! I'll wait for the go ahead, then proceed to tag all the articles.--Dudemanfellabra (talk) 23:46, 16 November 2013 (UTC)[reply]
Approved.Josh Parris 09:07, 17 November 2013 (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.