Wikipedia:Bots/Requests for approval/Sambot 8
- The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was Approved.
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: Category:Lists of ship commissionings, Category:Lists of ship decommissionings, Category:Lists of shipwrecks by year, and Category: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 Category:Lists of ship commissionings, Category:Lists of ship decommissionings, and Category:Lists of shipwrecks by year: visit each page and replace any template transclusions of the form
{{shipeventsNNNN}}
with{{Shipevents|XXXX}}
, whereNNNN
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 the{{shipeventsNNNN}}
style, year articles near the turn of a decade most often have two. If any article already has the template{{shipevents}}
, skip it.
- Example 1: In List of ship commissionings in 1876, replace
{{shipevents1870}}
with{{shipevents|1876}}
.- Example 2: In List of ship commissionings in 1879, replace
{{shipevents1870}}
and{{shipevents1880}}
with{{shipevents|1879}}
.- For the category Category: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:[[Category:XXXX ships| ]]
. As above,XXXX
is the specific year in the title of the article. If any article already has the template{{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
{{shipevents1900}}
with{{shipevents|1908}}
; add to[[Category:1908 ships| ]]
(with a pipe-and-space sortkey)
Code: User:Sambot/Code/Ships 2.
[[Sam Korn]] (smoddy) 19:47, 13 April 2009 (UTC)[reply]
Discussion
[edit]- Looks great to me. Anyone have any concerns? – Quadell (talk) 20:36, 15 April 2009 (UTC)[reply]
- Approved for trial (20 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Fair enough. Let's have a trial then. - Jarry1250 (t, c) 16:23, 16 April 2009 (UTC)[reply]
Trial complete. 20 edits -- successful [[Sam Korn]] (smoddy) 11:37, 17 April 2009 (UTC)[reply]
I've checked the edits, and they look good to me. Anyone else? – Quadell (talk) 13:37, 17 April 2009 (UTC)[reply]
- Looks good from this end. :) — Bellhalla (talk) 14:01, 17 April 2009 (UTC)[reply]
- Approved. 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)[reply]
- 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.