User:Freshgavin/Sandbox/Reference desk bot request

Background
Discussion of this proposed bot has been discussed at length for a number of months at Wikipedia talk:Reference desk. The original version of this request can be found here, and all credit for the code and prose written here goes to User:Csjoiner and User:VectorPotential.

Cleaning and maintainance of the Reference Desk was formerly performed on a daily basis by the now defunct Crypticbot. With the departure of Cryptic from Wikipedia, the bot was no longer allowed to function. There have been problems with other bots in the past as well due to the extremely large size of RD pages.

Required tasks
In the past, bots at RD have performed the following tasks:
 * Add date headers to the bottom of each reference desk page at 00:00 UTC each day.
 * Archive questions on the page under dates more than x days old (x has been 10 days, but a proposal has been made to shorten this in order to keep the desk at a much smaller file size).
 * The archiving procedure will be detailed below.

More recently, transclusion (by separating each days' questions into separate day pages, and then combining them together when the entire desk is loaded) has been used on all the desks. If transclusion functions are to be used then we need a bot that can do the following:
 * Create the next page for transclusion after questions have existed on the page for 24 hours.
 * Add appropriate templates to transclusion pages for navigation between pages. These templates also function as archive browsers, and thus if transclusion is implemented archiving is practically automatic, and invisible.
 * Add trancluded pages within x time frame (e.g. 10 days) to the current desk.

Revisal
Due to the weight of the pages and the constantly increasing traffic at RD, a new layout for the page has been created (shown here) and will be proposed once a bot has been planned to work along with it. The main difference is the number of desks, a significantly large increase from the current 6 to (at present) 15. This is primarily due to the large file size of each reference desk even after being properly archived, a problem which is likely only to get worse as Wikipedia users increase. Currently there is no apparent consensus whether the old system or the new system will function better, because no vote or tally has been taken. There are supporters for both the new and old system, and this is an issue that will have to be settled once and for all before either of the systems is put (back) into full force. Either way, a new bot will have to be able to (or be easily programmed to) handle an increase in the number of desks used, something that is likely to happen no matter which system is used.

Other than the number of desks, the design is essentially the same. All other revisions are purely cosmetic, mainly the orientation of desk navigation vertically instead of horizontally because of space restrictions. The archive list has also be vertically oriented.

Detailed Example of Bot's Function
There is a difference in layout of the archives pages between the new version and the old version, namely the page Reference desk archive is located instead at Reference desk/Archives. The following example shows the old system, where the archives are not a subpage, to show how the archiving process works without a bunch of redlinks. Since the layout to be proposed is located here, the bot could be set up to operate on those pages temporarily (and tested), and functionally moved to Wikipedia space only later.

This is an example of how the bot would work on the current desk working with a time frame of 10 days:

At 00:00 UTC on August 16, 2006, for the Miscellaneous reference desk the bot would:
 * Append = August 16 = to the bottom of Reference desk/Miscellaneous
 * Remove = August 9 = and   from the top of Reference desk/Miscellaneous
 * Copy all text between = August 14 = and = August 15 = from Reference desk/Miscellaneous to Reference desk archive/Miscellaneous/2006 August 14
 * Copy the following archive navigation template at the top and create the new page Reference desk archive/Miscellaneous/2006 August 14


 * ''Note:


 * Replace all text between = August 14 = and = August 15 = on Reference desk/Miscellaneous with   and save the page (this depends on whether the pages will be transcluded or not, it is not functionally necessary for the archive as-is)
 * Append = August 14 = and  Reference desk archive/Miscellaneous/2006 August 14  followed by a numbered list of all questions asked to the end of Reference desk archive/Miscellaneous/August 2006 and save the page. For August 14, this would look like:

= August 14 = Reference desk archive/Miscellaneous/2006 August 14
 * 1) A type of chair
 * 2) Male Orgasm
 * 3) World Trade Center Movie
 * 4) edits
 * 5) Maps from Nationalatlas.gov
 * 6) Clitoral Hood Piercing
 * 7) Guitar
 * 8) Alexander Graham Bell
 * 9) Cruise control on the 1998 ford windstar
 * 10) Gangster Chronicles TV Series
 * 11) Physics of a bullet
 * 12) T.E.A.M.
 * 13) Who would be richest?
 * 14) My surname is Bencko.
 * 15) Top Hats
 * 16) pounds to dollars
 * 17) The New York Pass

In addition to its normal daily tasks, at 00:00 UTC on the third of each month, the bot would need to create a new monthly reference archive page for each of the reference desks. After creating all six monthly pages, the bot would perform its normal daily duties.

For example, at 00:00 UTC on September 3, 2006 the bot would create Reference desk archive/Miscellaneous/September 2006 as a new page containing the following text:

Instead of the Template:Reference desk navigation template, the template at User:71-247-243-173/RDmonthly has been used recently and basically performs the same function. The example template in my name space User:Freshgavin/Sandbox/Reference desk/Archives/Archive header is also meant to be functionally the same, and is just place-holding to show how the pages of the reference desk would be arranged.

The RD design to be proposed (here), since it is not being used, is available for bot tests if anybody wants to give it a try. freshofftheufo ΓΛĿЌ  05:31, 4 October 2006 (UTC)