Jump to content

User:IcalaniseBot/LongPeriFix

From Wikipedia, the free encyclopedia

This page describes a one-time bot editing task that has now been completed.

LongPeriFix is a proposed task that would convert the values in the long_peri field in the Planetbox_orbit template (used for exoplanets) to arg_peri. The bot code is written in Perl and runs on my local machine.

Rationale for editing

[edit]

The property ω of the exoplanet orbits that is currently residing in the long_peri field (which is described as "longitude of periastron") should actually be entered into the arg_peri field (which is the "argument of periastron"). Since hundreds of pages currently have this mistake, fixing this is a task better suited to bots.

Support for editing

[edit]

I brought up this matter at WikiProject Astronomical objects. The response gained was that using the "argument of periastron" term is preferable to the current situation.

Running

[edit]

The task will only be performed once.

Article data is requested in batches of 10 articles, and server requests are made once every 10 seconds (these numbers can easily be changed if desired). The edits which would be performed are:

  1. Transfer value from long_peri to arg_peri if the arg_peri field is not populated (i.e. contains only whitespace and comments).
  2. If the long_peri field contains a comment <!--longitude of periastron, in degrees--> and the transfer is performed, the comment is changed to <!--argument of periastron, in degrees-->
  3. Pages which do not contain a long_peri field, or if they contain a populated arg_peri field are NOT affected.
  4. In the case of an edit conflict or other failed edits, the bot will skip the article in question. A list of pages where editing failed is output to STDOUT on the local machine. Since I do not anticipate this will affect a large number of articles, I will fix the articles in the failure list manually.