Wikipedia:Bots/Requests for approval/Sambot 8


Sambot 08

[[User:Sambot|Sambot]] 8

{{Newbot|Sambot|8}}

Operator: [[Sam Korn]] (smoddy)

Automatic or Manually Assisted: Automatic

Programming Language(s): PHP, using Pillar

Function Overview: Change templates on and categorise lists of ships/

Edit period(s): Once

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

Function Details:

Belhalla describes the task perfectly here:

''I'd like to see about getting a bot to process all the articles in four categories: {{cat|Lists of ship commissionings}}, {{cat|Lists of ship decommissionings}}, {{cat|Lists of shipwrecks by year}}, and {{cat|Lists of ship launches}}. The number of articles in each category ranges from about 85 up to 125. The processing would be as follows:

  • '' For the three categories {{cat|Lists of ship commissionings}}, {{cat|Lists of ship decommissionings}}, and {{cat|Lists of shipwrecks by year}}: visit each page and replace any template transclusions of the form {{shipeventsNNNN}} with {{tlx|Shipevents|XXXX}}, where NNNN is a year ending in 0, like 1870; and XXXX is the specific year in the title of the page. Typically, the templates to be replaced appear in a "See also" section. Although most articles will have only one template of the {{shipeventsNNNN}} style, year articles near the turn of a decade most often have two. If any article already has the template {{tlx|shipevents}}, skip it.
  • ''Example 1: In List of ship commissionings in 1876, replace {{tlx|shipevents1870}} with {{tlx|shipevents|1876}}.
  • ''Example 2: In List of ship commissionings in 1879, replace {{tlx|shipevents1870}} and {{tlx|shipevents1880}} with {{tlx|shipevents|1879}}.
  • ''For the category {{cat|Lists of ship launches}}: Perform the same template replacement as above, PLUS place the article in Category:XXXX ships with a pipe and a space (so the article will sort at the top of the category) like this: . As above, XXXX is the specific year in the title of the article. If any article already has the template {{tlx|shipevents}} skip that task. If any article already has the XXXX ships category, please add the pipe-and-space ("| ") sortkey
  • ''Example 3: List of ship launches in 1908, replace {{tlx|shipevents1900}} with {{tlx|shipevents|1908}}; add to {{cat (with a pipe-and-space sortkey)

Bellhalla (talk) 05:42, 12 April 2009 (UTC)

Code: User:Sambot/Code/Ships 2.

[[Sam Korn]] (smoddy) 19:47, 13 April 2009 (UTC)

=Discussion=

  • Looks great to me. Anyone have any concerns? – Quadell (talk) 20:36, 15 April 2009 (UTC)
  • {{BotTrial|edits=20}} Fair enough. Let's have a trial then. - Jarry1250 (t, c) 16:23, 16 April 2009 (UTC)

{{BotTrialComplete}} [https://secure.wikimedia.org/wikipedia/en/w/index.php?title=Special:Contributions&dir=prev&offset=20090417032158&limit=20&target=Sambot 20 edits] -- successful [[Sam Korn]] (smoddy) 11:37, 17 April 2009 (UTC)

I've checked the edits, and they look good to me. Anyone else? – Quadell (talk) 13:37, 17 April 2009 (UTC)

:Looks good from this end. :) — Bellhalla (talk) 14:01, 17 April 2009 (UTC)

  • {{BotApproved}} Under the duck test, if it looks like a working bot, and er... well, anyhow, approved. - Jarry1250 (t, c) 15:29, 17 April 2009 (UTC)

:The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section.