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: Per request, create and populate categories for ships by year.

Edit period(s): Once

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

Function Details:

Source code available here.

Firstly, create each category page between 1850 and 2009 (except 1900, 1906, 1911, 1912, and 1986, which already exist) and the associated talk page, with ((cathead ship year|year)) and ((WikiProject Ships)) respectively.

Then, for each page that uses ((Infobox Ship Career)), get the "Ship launched" parameter. If it does not exist, add this page to User:Sambot/Tasks/Ships. If it is present, follow the following logic:

The category will be added to the end of the existing categories or appended to the bottom of the page if no categories exist.

[[Sam Korn]] (smoddy) 22:37, 6 April 2009 (UTC)[reply]

Discussion

[edit]

Approved for trial. Please provide a link to the relevant contributions and/or diffs when the trial is complete. : All categories, and 25 edits outside of the category and cattalk namespaces. – Quadell (talk) 15:38, 8 April 2009 (UTC)[reply]

As an FYI, it looks like another editor has also ready created Category:1898 ships and Category:1899 ships. — Bellhalla (talk) 16:02, 8 April 2009 (UTC)[reply]

Trial complete.. No problems creating the category pages (I had already programmed it to skip existing pages). The only problem with the main namespace edits (of which I made 19 -- I think that's enough!) was five edits with broken edit summaries (e.g. this), until I caught it. [[Sam Korn]] (smoddy) 17:27, 8 April 2009 (UTC)[reply]

A few suggestions. This edit added Category:1984 ships, and the article already contained Category:1984 introductions. Should the bot remove the introductions category when it adds the ships category? And should it place each "xxxx ships" category in an "xxxx introductions" category? Also, I see that the bot skipped Soviet submarine K-219; should the date in "commissioned" be used? – Quadell (talk) 18:20, 8 April 2009 (UTC)[reply]
  • I was not aware of the "NNNN introductions" category, so I would say yes to replacing "NNNN introductions" with "NNNN ships" in articles. I've already added to ((cathead ship year)) to include each "NNNN ships" category in the appropriate "NNNN introductions" category, so replacing it will just be further refining the categorization.
  • For the second, the consensus at WP:SHIPS was that launch date (or completion date if launch not available) was to be used, and not commissioning date. This parallels the disambiguation schema which uses launch/completion year as the disambiguating term.
  • Otherwise, the test looks great from this end. Now, just a few thousand more to go, right? — Bellhalla (talk) 19:25, 8 April 2009 (UTC)[reply]
The introductions categories will now be removed. I don't think there are many pages in them. I think Quadell's question was whether we can use "commissioned" if "launched" and "completed" were both unavailable... [[Sam Korn]] (smoddy) 23:08, 8 April 2009 (UTC)[reply]
Sorry if I didn't get that across clearly, but don't use a commissioning date if it doesn't have either of the other two. Just put it on the "no date" list, please. — Bellhalla (talk) 11:08, 10 April 2009 (UTC)[reply]

 Approved. Looks great, go for it. – Quadell (talk) 12:55, 10 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.