Wikipedia:Bots/Requests for approval/Sambot 6


 * 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 Symbol keep vote.svg Approved.

Sambot 6
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 and  respectively.

Then, for each page that uses, 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.
 * For ships launched before 1600, add to century-specific category (e.g. for 1493,  for 1300)
 * For ships launched between 1600 and 1850, add to decade-specific category (e.g. for 1815)
 * For ships launched between 1850 and 2009, add to year-specific category (e.g. for 1983)
 * For ships with a launch date in the future, add to

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

Discussion

 * The code looks pretty straightforward, and the scope was pretty well defined in the request linked above. My thumb is up. – Quadell (talk) 19:09, 7 April 2009 (UTC)
 * Question: does the code look at the field "Ship completed" if "Ship launched" is empty? — Bellhalla (talk) 20:54, 7 April 2009 (UTC)
 * It didn't; it does now. Sorry, I missed that in your request.  As Quadell said, though, thanks for your excellent request -- very easy to program from!  Incidentally, if someone is going to give a trial here, can it be more than the normal 50?  The first ~300 edits of necessity are the very simple category/category talk creation edits (if they aren't done first, pages will be added to non-existing categories).  Thanks!   [[Sam Korn ]] (smoddy) 23:56, 7 April 2009 (UTC)

– Quadell (talk) 15:38, 8 April 2009 (UTC)


 * As an FYI, it looks like another editor has also ready created and . — Bellhalla (talk) 16:02, 8 April 2009 (UTC)

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


 * 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)
 * 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 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)
 * 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)
 * 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)

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