Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 RussBot 4  
14 comments  


1.1  Discussion  



1.1.1  Trial  


















Wikipedia:Bots/Requests for approval/RussBot 4







Add links
 









Project page
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 

< Wikipedia:Bots | Requests for approval

  • Approved BRFAs
  • talk
  • contribs
  • count
  • SUL
  • logs
  • page moves
  • block log
  • rights log
  • flag)
  • Operator: R'n'B (talk · contribs)

    Automatic or Manually assisted: Automatic

    Programming language(s): Python

    Source code available: Pywikipedia rewrite branch

    Function overview: Edit intentional links to disambiguation pages in hatnotes

    Links to relevant discussions (where appropriate): Wikipedia talk:WikiProject Disambiguation#Bot to edit intentional disambig links in hatnotes?

    Edit period(s): Monthly (may be adjusted as needed)

    Estimated number of pages affected: About 10,000 on the first run; much fewer after that.

    Exclusion compliant (Y/N):Y

    Already has a bot flag (Y/N):Y

    Function details: According to this disambiguation guideline, intentional links to disambiguation pages should be directed

    This bot task will locate links to disambiguation pages in hatnotes. Hatnotes are templates designed specifically for the task of assisting readers who searched for ambiguous article titles (or clicked on a link to one); therefore, links to disambiguation pages appearing in these templates can be presumed to be intentional, unlike those appearing elsewhere in an article. Where applicable, as defined in the specification below, the bot will change a link such as PAGE1toPAGE1 (disambiguation).

    Specification

    Identifying hatnote links is a little tricky because each hatnote template has its own format, by which some template parameters are automatically converted into links, others are not, and some are ignored entirely. The bot will search through all pages that transclude specific templates, and then parse the wikitext to identify the parameters of the template, and act upon only the parameters specified below (only if they are present, of course). Only the following arguments will be treated as un-bracketed links:

    1. On pages that transclude {{About}}, arguments 3, 5, 7, and 9.
    2. On pages that transclude {{Distinguish}}, arguments 1, 2, 3, and 4.
    3. On pages that transclude {{For}}, arguments 2 and 3.
    4. On pages that transclude {{Other hurricane uses}}, argument 1.
    5. On pages that transclude {{Other persons}}, argument 2.
    6. On pages that transclude {{Other persons3}}, argument 2.
    7. On pages that transclude {{Other people2}}, argument 1.
    8. On pages that transclude {{Other people3}}, argument 3.
    9. On pages that transclude {{Other places3}}, argument 1.
    10. On pages that transclude {{Other uses}}, argument 1.
    11. On pages that transclude {{Other uses6}}, arguments 1 and 2.
    12. On pages that transclude {{Other uses of}}, argument 2.
    13. On pages that transclude {{Redirect}}, arguments 3, 5, 7, and 9.
    14. On pages that transclude {{Redirect2}}, arguments 4, 6, and 8.
    15. On pages that transclude {{Redirect6}}, arguments 3 and 5.
    16. On pages that transclude {{Redirect7}}, arguments 3 and 5.
    17. On pages that transclude {{Redirect-distinguish}}, arguments 2, 3, 4, and 5.
    18. On pages that transclude {{See also}}, arguments 1 through 15.

    N.B.: The bot will only edit links on pages in namespace 0, and only links to pages in namespace 0.

    As the above list makes clear, there is no rhyme or reason to the formatting of these templates, so the bot will simply parse the text of each page that transcludes any of the above templates and look for matching arguments. As a precaution, the bot will ignore any template invocation that includes a recursive template call (i.e., any "{" character between "{{" and the first "}}" will cause the bot to skip the page entirely).

    The bot will edit an identified link only if (for purposes of these criteria, the identified link is designated as PAGE1):

    1. PAGE1 is a disambiguation page or a redirect to a disambiguation page; and
    2. IfPAGE1 (disambiguation) exists, it is a redirect whose target is either PAGE1 or, if PAGE1 is also a redirect, the same as the target of PAGE1, or
      IfPAGE1 (disambiguation) does not exist, the bot will create it as a redirect to PAGE1 (or the target of PAGE1 if it is a redirect)

    When all these criteria are true, the bot will change "PAGE1" to "PAGE1 (disambiguation)" in the hatnote (but will not change any other links on the page).

    Discussion[edit]

    Will you be publishing your source code?

    The discussion seems to have settled down. Are you ready for a trial? Josh Parris 11:30, 25 May 2010 (UTC)[reply]

    I will publish the source code after I get it working. I'm still in debugging mode.
    What I'd like to do in lieu of a trial is a dry run; I'll run through the whole set of pages without making any edits, but instead log the edits that would have been made to a wiki page. --R'n'B (call me Russ) 17:45, 25 May 2010 (UTC)[reply]
    Whilst I have no objection to a dry run, I can't review 10K edits. Josh Parris 15:01, 26 May 2010 (UTC)[reply]
    OK, how about if I set it up to edit the first X pages, as well as logging the results of the dry run? --R'n'B (call me Russ) 15:28, 26 May 2010 (UTC)[reply]


    Trial[edit]

    Approved for trial (30 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Do as big a dry run as you desire; provide me with 30 edits (or proposed edits) to review. Josh Parris 11:51, 30 May 2010 (UTC)[reply]

    Trial complete.Trial edits may be reviewed at [1]. One issue I noticed (see Gel electrophoresis) was that if the hatnote was erroneous to begin with, the bot can make seemingly inexplicable changes. This is not really a bot error, but it is compounding a previous user error. --R'n'B (call me Russ) 14:00, 1 June 2010 (UTC)[reply]
    P.S. That particular edit isn't as bizarre as it first appeared, because PAGE in fact was formerly a redirect to Gel electrophoresis; now it is a redirect to SDS-PAGE, which is a particular electrophoresis technique. --R'n'B (call me Russ) 17:02, 3 June 2010 (UTC)[reply]
    By the way, partial dry run results are available (if you are interested) at User:RussBot/Hatnote dry run/001 and pages linked from there. --R'n'B (call me Russ) 15:13, 1 June 2010 (UTC)[reply]
    Well Done! Tim1357 talk 16:25, 5 June 2010 (UTC)[reply]
     Approved. Tim1357 talk 16:25, 5 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.

    Retrieved from "https://en.wikipedia.org/w/index.php?title=Wikipedia:Bots/Requests_for_approval/RussBot_4&oldid=1051714170"

    Category: 
    Approved Wikipedia bot requests for approval
     



    This page was last edited on 25 October 2021, at 05:11 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki