Wikipedia:Bots/Requests for approval/DodoBot
- 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 Speedily Approved.
Operator: EdoDodo (talk · contribs)
Automatic or Manually assisted: Automatic
Programming language(s): AutoWikiBrowser, using Kingbotk Plugin
Source code available: The AWB configuration I'll be using for the first run can be found here
Function overview: Will be used for project tagging, its first run will be tagging articles on lines of latitude and longitude, as per this bot request.
Links to relevant discussions (where appropriate): Bot Request
Edit period(s): One time run(s)
Estimated number of pages affected: For the first run on lines of latitude and longitude a total of 591 pages will be affected.
Exclusion compliant (Y/N): Yes
Already has a bot flag (Y/N): No
Function details: This bot will be doing one-off runs to add tags for WikiProjects. Its first run will add {{WPcoord}} and {{WikiProject Geography|class= |importance=low}} to the 591 pages in Category:Lines of longitude and Category:Lines of latitude (unless they are already there, of course). This will be done by using AutoWikiBrowser, having Kingbotk Plugin add the project tags and then using a simple search and replace function to mark the importance for WikiProject Geography as low (the two things are handled separately by AWB but it's all done in one edit, of course).
Discussion
[edit]- Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. I realize that there will probably not be any biographies in this run; but in future if you are working on pages that might have biographies of living persons, you should use the following advanced find&replace to ensure that the biography banner with living=yes receives top billing. (Replace "WikiProject Foo" with template name of sponsor project) –xenotalk 16:18, 8 June 2010 (UTC)[reply]
<AdvancedReps>
<IRule xsi:type="Rule">
<enabled_>true</enabled_>
<Children>
<IRule xsi:type="Rule">
<enabled_>true</enabled_>
<Children />
<Name>Rule</Name>
<ruletype_>OnWholePage</ruletype_>
<replace_>}}
{{</replace_>
<with_>}}
{{</with_>
<ifContains_ />
<ifNotContains_ />
<regex_>false</regex_>
<ifIsRegex_>false</ifIsRegex_>
<numoftimes_>1</numoftimes_>
<ifRegexOptions_>None</ifRegexOptions_>
<regexOptions_>None</regexOptions_>
</IRule>
<IRule xsi:type="Rule">
<enabled_>true</enabled_>
<Children />
<Name>Rule</Name>
<ruletype_>OnWholePage</ruletype_>
<replace_>}}
{{</replace_>
<with_>}}
{{</with_>
<ifContains_ />
<ifNotContains_ />
<regex_>false</regex_>
<ifIsRegex_>false</ifIsRegex_>
<numoftimes_>1</numoftimes_>
<ifRegexOptions_>None</ifRegexOptions_>
<regexOptions_>None</regexOptions_>
</IRule>
</Children>
<Name>Biocleanup</Name>
<ruletype_>OnWholePage</ruletype_>
<replace_>\{\{WikiProject Foo(.*?)\}\}(.*?)\{\{WPBiography(.*?)\}\}</replace_>
<with_>{{WPBiography$3}}
{{WikiProject Foo$1}}$2</with_>
<ifContains_>living[ ]*=[ ]*yes</ifContains_>
<ifNotContains_>blp[ ]*=[ ]*yes</ifNotContains_>
<regex_>true</regex_>
<ifIsRegex_>true</ifIsRegex_>
<numoftimes_>1</numoftimes_>
<ifRegexOptions_>IgnoreCase</ifRegexOptions_>
<regexOptions_>IgnoreCase Singleline</regexOptions_>
</IRule>
</AdvancedReps>
- Y Test Run Complete Thanks for the code, I'll make sure I include it for future runs where BLPs might be involved. As for this run I've completed the 50 page trial, the bot malfunctioned for the first few edits (mostly just on the edit summary), so I stopped the bot and sorted out what was going wrong, I think it worked fine for the rest (still looking through the logs). I've uploaded the article list (which contains the 50 articles I ran the bot on) and the AWB log. - EdoDodo talk 19:23, 8 June 2010 (UTC)[reply]
- Note: The bot only did 44 edits because some articles were already tagged, however I noticed that for the ones that were already tagged it could have added "importance=low" but didn't, I'm going to improve it so that it does. - EdoDodo talk 19:25, 8 June 2010 (UTC)[reply]
- These look fine. Not your fault, but I really wish the "WPcoord" would be moved to a standard form name. Have you considered scanning the articles for the existence of a {{stub}} template and setting auto-stub on? –xenotalk 19:30, 8 June 2010 (UTC)[reply]
- I've added a few regex's that will mark the importance if it is not present, as for adding the stub tag, yes I thought about it, but to be honest I have no idea how I would go about doing that in AWB. Will I have to use external processing or can it be done using an AWB plugin? - EdoDodo talk 05:55, 9 June 2010 (UTC)[reply]
- I typically paste the list of articles (not talk pages) into Special:Export and then run the database scanner on the resultant .xml looking for -stub}}. Those that match can be converted to talk pages and set to auto-stub with WP:Plugin++. Alternatively, you could simply preparse the articles skipping those that didn't contain it, but the export way is faster. –xenotalk 13:58, 9 June 2010 (UTC)[reply]
Thanks for the tip, using the database scanner I found 9 articles containing stub tags, that will be marked as stubs. Also thanks for showing me the source code of Xenobot, using the regular expressions you gave me I found a further 67 articles that will inherit categories, so that will leave about 515 articles unassessed. - EdoDodo talk 16:55, 9 June 2010 (UTC)[reply]
- FWIW and further to Arctic Gnome's request at the BOTREQ, some projects (off the top of my head, CHICAGO, JAZZ and SONGS do this) will set "class=stub|auto=length" for articles 2500 bytes or less excluding redirects and dabs (using pagelen to do anything other than stub is problematic as start and higher have sourcing requirements). So, that's something else you might consider, if the project desires it. –xenotalk 17:06, 9 June 2010 (UTC)[reply]
- I've left a message on the project page, and asked Arctic Gnome. As for implementing this, would this also be done using the database scanner to make a list and then going through it with AWB? - EdoDodo talk 17:20, 9 June 2010 (UTC)[reply]
- Yep, you scan for "at most 2500 characters", "Ignore redirects" and not containing
{{disambig
You need to make custom find&replace to put in "class=stub|auto=length", that's easy enough but I can give you a code snippet if you need it. –xenotalk 17:37, 9 June 2010 (UTC)[reply]- Nah, thanks, it's fairly simple and not very different from some of the regex you already gave me, so I can figure it out . Anyway, I'm pretty much ready to run the bot once we get the reply from WikiProject Geography and/or Artic Gnome about assessing based on length, I've finished sorting out configuration, lists, etc. I would publish the code here but it contains a fair bit of your code, which is not publicly available, so I won't (at least not without your permission). If you would like to see it then I can email it to you. - EdoDodo talk 17:45, 9 June 2010 (UTC)[reply]
- Since this is a fairly standard-type bot, running on mostly proven code, I'm going to approve it shortly, barring any objections. –xenotalk 17:49, 9 June 2010 (UTC)[reply]
- Nah, thanks, it's fairly simple and not very different from some of the regex you already gave me, so I can figure it out . Anyway, I'm pretty much ready to run the bot once we get the reply from WikiProject Geography and/or Artic Gnome about assessing based on length, I've finished sorting out configuration, lists, etc. I would publish the code here but it contains a fair bit of your code, which is not publicly available, so I won't (at least not without your permission). If you would like to see it then I can email it to you. - EdoDodo talk 17:45, 9 June 2010 (UTC)[reply]
- Yep, you scan for "at most 2500 characters", "Ignore redirects" and not containing
- I've left a message on the project page, and asked Arctic Gnome. As for implementing this, would this also be done using the database scanner to make a list and then going through it with AWB? - EdoDodo talk 17:20, 9 June 2010 (UTC)[reply]
Just for the record, for this first run 9 articles will be assessed as stubs based on tags found on page, 107 articles will be assessed as stubs based on their size (assuming that the WikiProject agrees with this automation of assessment), 54 article will inherit assessments from other WikiProjects, which will leave 419 articles unassessed. —Preceding unsigned comment added by EdoDodo (talk • contribs) 18:35, 9 June 2010 (UTC)
- Speedily Approved. Make sure that any task you run has consensus from the project. –xenotalk 20:16, 10 June 2010 (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.