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
“ | to the title that includes the text "(disambiguation)", even if that's a redirect – for example, link to the redirect "America (disambiguation)" rather than the target page at "America". ... This helps distinguish accidental links to the disambiguation page from intentional ones. | ” |
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 PAGE1 to PAGE1 (disambiguation).
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:
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):
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).
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
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
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
“ | to the title that includes the text "(disambiguation)", even if that's a redirect – for example, link to the redirect "America (disambiguation)" rather than the target page at "America". ... This helps distinguish accidental links to the disambiguation page from intentional ones. | ” |
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 PAGE1 to PAGE1 (disambiguation).
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:
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):
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).
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
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