Wikipedia:Bots/Requests for approval/Monkbot 6

Monkbot 6

[[User:Monkbot|Monkbot 6]]

{{Newbot|Monkbot|6}}

Operator: {{botop|Trappist the monk}}

Time filed: 10:17, Thursday October 9, 2014 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): AutoWikiBrowser

Source code available: yes (source)

Function overview: Replace {{para|title}} in CS1 citations with new parameter {{para|script-title}} when adjacent {{tld|xx icon}} and {{para|title}} language are in agreement; add {{para|language}} parameter and delete {{tld|xx icon}} template.

Links to relevant discussions (where appropriate):

Edit period(s): periodically

Estimated number of pages affected: As of 2014-10-05 the subset of categories in {{cl|Articles with non-English-language external links}} that will be examined contained approximately 251,000 pages.

Exclusion compliant (Yes/No): yes

Already has a bot flag (Yes/No): yes

Function details: Here is a link to the full description.

=Discussion=

GoingBatty what do you think about this task? -- Magioladitis (talk) 22:49, 19 October 2014 (UTC)

:{{ping|Magioladitis}} No objections - it just took me a while to realize that the function overview above is describing two different tasks. (i.e. {{para|language}} could be added in citations where {{para|script-title}} is not appropriate). GoingBatty (talk) 00:11, 20 October 2014 (UTC)

:{{ping|Magioladitis|Trappist the monk}} Would there be any benefit to having the icon template replacements done in WP:AWB/TR instead of this custom module? GoingBatty (talk) 00:13, 20 October 2014 (UTC)

::None so far as task 6 is concerned because Monkbot never does general fixes. For the icon templates it cares about, task 6 will adjust those redirects to get them into the proper format.

::—Trappist the monk (talk) 00:36, 20 October 2014 (UTC)

:::{{ping|Magioladitis}} Is WP:AWB/TR part of general fixes? (i.e. Does unclicking the Apply general fixes stop WP:AWB/TR from running? GoingBatty (talk) 18:40, 20 October 2014 (UTC)

:{{ping|Trappist the monk}} If I understand your request properly, this bot task would also clear the maintenance :Category:CS1 maint: English language specified, correct? GoingBatty (talk) 18:40, 20 October 2014 (UTC)

::Task 6 would go some way toward clearing that category but accomplishing that is not defined as one of the task 6 functions.

::—Trappist the monk (talk) 18:53, 20 October 2014 (UTC)

{{BAG assistance needed}}

Trappist the monk (talk) 13:26, 27 October 2014 (UTC)

  • {{Ping|Trappist the monk}} If I'm not wrong: Your module has some minor problems. If you run your module against articles that doesn't contain {{tl|Cite}} but contains {{tl|fi}} then it will change [fi is just an example] {{tl|fi}} to {{tl|fi icon}} which is totally unnecessary (This type of edits doesn't help the encyclopedia). What will you do to stop changing {{tl|fi}} to {{tl|fi icon}} when there is no {{tl|Cite}}? Thanks! Jim Carter 10:08, 28 October 2014 (UTC)

::The module is subsidiary to an AWB settings file which now includes a rule to skip the page if the page does not contain Module:Citation/CS1-supported templates.

::—Trappist the monk (talk) 10:55, 28 October 2014 (UTC)

:::{{ping|Trappist the monk}} Can you add the AWB settings file source code here? It will help us better understand the task before we procced. Thanks! Jim Carter 15:41, 28 October 2014 (UTC)

::::Done.

::::—Trappist the monk (talk) 16:03, 28 October 2014 (UTC)

:::::Thanks {{U|Trappist the monk}}. I found another minor issue. If I'm not wrong, the module changes [for example]: {{Cite book|language=xx|title=aaaabbbb cccc|author=Example|publisher=Example production company|location=San Diego|date=18 March 1997|isbn=8888888888}} to {{Cite book|title=aaaabbbb cccc|author=Example|publisher=Example production company|location=San Diego|date=18 March 1997|isbn=8888888888|language=xx}} This change is totally unnecessary. I randomly searched and found 10 out of 100 such cases. How will you skip such changes? Thanks! Jim Carter 04:56, 30 October 2014 (UTC)

::::::Are you using an older version of the script?

::::::Where {{para|language}} precedes {{para|title}}, task 6 moves {{para|language}} to the end of the CS1 template so that duplicate rules for each of the specific languages is not required. When {{para|language}} positioning is all that is done to a page, then the page is skipped. When other changes are made – {{tld|xx icon}} replaced with {{para|language}}, {{para|title}} replaced with {{para|script-title}} – then all of the moved {{para|language}} parameters will remain at their new positions.

::::::—Trappist the monk (talk) 09:50, 30 October 2014 (UTC)

{{Od}}{{Ping|Trappist the monk}} I'm asking how will you skip a page if the bot only positioning {{para|language}} and nothing else? I haven't found anything in your settings or module that can skip pages if only positioning of {{para|language}} is to be done. Jim Carter 11:53, 30 October 2014 (UTC)

:I thought I answered that when I wrote: {{tq|When {{para|language}} positioning is all that is done to a page, then the page is skipped.}} Does that not answer your question?

:—Trappist the monk (talk) 12:14, 30 October 2014 (UTC)

::{{ping|Trappist the monk}} Sorry if I'm messing everything but I want to know the Skip system. How will AWB determine if there is only positioning change and the page should be skipped? for example "skip if contain X" "skip if no changes where made" etc. How will the skip process work? Jim Carter 14:03, 30 October 2014 (UTC)

{{Od}}

Refer to the module: At the top of the module is this (line 3):

Skip = true;

That tells awb to skip the page. The rule for moving {{para|language}} does not change the Skip value (line 334):

ArticleText = Regex.Replace(ArticleText, @"(\{\{\s*" + IS_CS1 + @"[^\}]+)(\|\s*language\s*=\s*[^\|\}]*)([^\}]*)(\|\s*title\s*=[^\}]*)(\}\})", "$1$3$4$2$5");

Compare that to this portion of a rule that makes more substantive changes (line 345):

if (Regex.Match (ArticleText, pattern).Success)

{

ArticleText = Regex.Replace(ArticleText, pattern, "$1script-title=$5:$2$3|language=$5$4");

Skip = false;

}

Here, Skip = false; tells awb that the page won't be skipped. So, if only the reposition rule is applied, Skip will still have it's initial value and the page will be skipped.

Trappist the monk (talk) 14:33, 30 October 2014 (UTC)

  • Support - seems useful.--BabbaQ (talk) 14:22, 31 October 2014 (UTC)

{{BotTrial|edits=50}} -- Magioladitis (talk) 18:50, 31 October 2014 (UTC)

{{BotTrialComplete}}

For source lists I chose 10 What transcludes page: Template:xx icon where xx is ar, zh, el, he, ja, ko, fa, ru, th, uk. For each of these I loaded a new list and let the script run for 5 edits. At the end I should have completed 50 edits. I got 51. Apparently, awb did not count the edit to {{diff|Married and maiden names|631943407|629941422|Married and maiden names}} yet there it is in Special:Contributions/Monkbot. That page is not listed in awb's successfully saved log. Is this a bug in awb? I don't see how it can be a bug in Monkbot task 6.

{{collapse top|title=AWB successfully saved log}}

  1. Ukrainian language
  2. Mother's Day
  3. Transport in Ukraine
  4. Ukraine
  5. Joseph Stalin
  6. Nissan Navara
  7. Irreligion
  8. Motor vehicle theft
  9. Taksin
  10. List of banned films
  11. Oleksiy Byelik
  12. Harutyun Vardanyan
  13. March Days
  14. Sergey Lushan
  15. Jafar Irismetov
  16. Mafatih al-hayat
  17. Bargh Tehran F.C.
  18. Ahmad Tu'mah
  19. Mohammad Khordadian
  20. Iran at the 2013 Asian Indoor and Martial Arts Games
  21. 2011 Gwangju FC season
  22. Into the New World (album)
  23. 2011 Sangju Sangmu Phoenix season
  24. Lee Sang-deuk
  25. Choi Minho
  26. Bamboo Blade
  27. Rosario + Vampire
  28. Prince Hotels
  29. Shin Yanagisawa
  30. Hiroyuki Sonoda
  31. Itzik Zohar
  32. Oshri Gita
  33. Plasan Sand Cat
  34. Qaqun
  35. Rodrigo Goldberg
  36. Hellenic Force in Cyprus
  37. Daniel da Silva Soares
  38. Anastasios Charalambis
  39. Flampouro, Larissa
  40. Pantelis Savvidis
  41. Archaeology in Singapore
  42. Nanjing Metro
  43. Chinese treasure ship
  44. Zhongshan Soccer Stadium
  45. Chery QQ
  46. 2009–10 Libyan Premier League
  47. El Sawy Culture wheel
  48. Ninos Aho
  49. Runes of Magic
  50. Denmark–Iraq relations

{{collapse bottom}}

Trappist the monk (talk) 22:44, 31 October 2014 (UTC)

  • Seem to work and the trial was a success. --BabbaQ (talk) 00:10, 1 November 2014 (UTC)

((BAG assistance needed))

Trappist the monk (talk) 11:28, 9 November 2014 (UTC)

{{BotApproved}} -- Magioladitis (talk) 00:43, 12 November 2014 (UTC)

: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.