Wikipedia:Bots/Requests for approval/Sambot 8
[[User:Sambot|Sambot]] 8
{{Newbot|Sambot|8}}
Operator:
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
with {{tlx|Shipevents|XXXX}}, where
{{shipeventsNNNN}} NNNN
is a year ending in0
, like1870
; andXXXX
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 thestyle, year articles near the turn of a decade most often have two. If any article already has the template {{tlx|shipevents}}, skip it.
{{shipeventsNNNN}} - ''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
with a pipe and a space (so the article will sort at the top of the category) like this:
Category:XXXX ships . 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 theXXXX 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
(with a pipe-and-space sortkey)
{{cat
Code: User:Sambot/Code/Ships 2.
=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
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.