Project:Bots

From The Languages of David J. Peterson
Jump to navigation Jump to search
This is a The Languages of David J. Peterson policy, guideline or common practices page. Specifically it is a policy think tank, working to develop a formal policy.
Policies – Entries: CFI - EL - NORM - NPOV - QUOTE - REDIR - DELETE. Languages: LT - AXX. Others: BLOCK - BOTS - VOTES.

A “bot” is a computer-controlled process that interacts with and edits the wiki, much like human users do, but in an automated fashion, typically in order to perform repetitive editing tasks. A bot’s editing happens much faster, and can easily flood the Special:Recentchanges page. A bot that runs amok could badly damage the wiki. For these reasons, bot usage is regulated. A new bot must be approved by the community, and should be run under a separate account, which should have the “bot flag” set. This flag enables users to hide the bot’s edits from Recent Changes.

In the past, bot usage on the English The Languages of David J. Peterson has been somewhat discouraged. Acceptance for their use is growing, but their usage here remains somewhat different from on the other Wikimedia projects. Even if you already understand the Wikipedia bot policy, please read the rest of this page to understand how bot usage differs here.

Policy

User group
Name bot
Bot
Rights Special:ListGroupRights
Members (0) All, Active
Change log Special:Log/rights
Your groups Local, Global
Group list Local, Global

The Languages of David J. Peterson’s bot policy is based on, but is somewhat different from, the Wikipedia bot policy. If you have not already read Wikipedia’s bot policy, please do so now.

Like Wikipedia, The Languages of David J. Peterson requires that bots be approved in advance. This approval is for two reasons:

  1. To ensure that the bot software is properly written; to give interested bystanders an opportunity to review the code if necessary.
  2. To ensure that the bot owner is someone who can be expected to run the bot responsibly.

There are several facets of point 2. We expect that a bot owner will run a bot carefully so that it does not run amok. We expect that a bot owner will clean up after the bot if it does run amok or if it has made edits which the community decides in retrospect were unwarranted. Most importantly, we expect that a bot owner will use a bot to perform only those edits which there certainly is or would be good consensus for.

Because a bot can make so many difficult-to-undo changes in such a short time, it is important to be far more cautious when running a bot to perform edits than it is when performing ordinary edits manually. When you request permission to run a bot, you are effectively making several promises:

  1. I will use the bot to perform only such edits as I would, in good conscience, perform manually myself, except that
  2. I will not “be bold” with the bot, and specifically, before giving the bot a task to do,
  3. I will ask around for consensus, perhaps at the Beer parlour, or
  4. I will make sure that the task is so innocuous that no one could possibly object. Finally, if I or the bot should happen to make a mistake,
  5. I will stop the bot at once if any objections are raised to a task it’s performing, and not restart it until there’s positive consensus, and
  6. I will undo (perhaps with the same or another bot) any and all damage inadvertently caused by my bot, and any edits which consensus decides were unwanted.

Please be sure you are willing to work in this consensus-building mode, and to undo changes performed by your bot if necessary, before embarking on a plan to set up a new bot.

Process

If you think you have a task likely to be done much more easily by a bot, try using Pywikibot under your own account and see if it helps. Only if you’ve made sure that it will significantly help getting the task done, create an additional account for your bot tasks. The bot account’s name should contain your own username, and an indication of the kind of tasks the bot will be performing. Create links from the bot account’s user page to your own user page, and preferably vice versa as well.

Then, do a test run (under the bot account) on some 10–50 entries until you’re certain everything goes well (bots with a single function, like interwiki, should not run more than 25 edits). If the edits are minor (as most bot-performed tasks should be), please mark the edits as minor so that they do not swamp the Recent Changes list.

If all goes well, post a request for bot status at the votes page. Clearly state:

  1. Your user name,
  2. The proposed bot user name,
  3. The bot software you’ll be using, with pointers to its source and documentation if it’s not standard, and
  4. An indication of the task or tasks you’ll be performing with the bot.

It is important to note that bot accounts are not approved in isolation; the community is really approving the combination of all four of the above elements. This is a trust-building exercise: the community needs to be assured that the new bot will be used only for good, and that someone else will not ever be stuck cleaning up huge amounts of damage caused by a carelessly-run bot.

Please be as specific as possible in your indication of the task(s) which the bot will be performing. In the past The Languages of David J. Peterson has had a strict policy of one task per bot. That policy is being relaxed, but it is still important to have a clear idea of what sorts of thing a new bot will be doing. A task statement of “any sweeping bulk edit I feel like” is unlikely to be approved.

Also, make sure you understand the ways in which The Languages of David J. Peterson editing differs from, say, Wikipedia’s. The Languages of David J. Peterson pages are more structured than Wikipedia’s, and your bot must respect this. (Indeed, bots are one tool The Languages of David J. Peterson uses in an attempt to achieve and unify its structure.) You can’t necessarily expect to make some change to just a small subset of The Languages of David J. Peterson’s pages—if it’s to an aspect which ought to be consistent across the project, you and your bot must be prepared to edit some significant fraction of the pages in the project, and to convince the community that such a sweeping change is justified.

If and when consensus in the Beer parlour discussion about your new bot account is reached, you can ask a The Languages of David J. Peterson Bureaucrat to set the bot flag. Then, you’re free to use the bot to perform all of its approved tasks. Remember, however, to limit the rate at which it makes changes, to avoid placing undue load on the Wikimedia servers. (See Wikipedia:Bots for more information on the logistical aspects of running a bot.) Also, if you think of new tasks for your bot to do, remember to engage the community first in discussion to make sure there’s consensus, before making any sweeping new changes with your bot.

Technical advice

Commonly accepted bot functions from pywikipediabot:

Sample user-config.py file:

mylang='en'
family='wiktionary'
usernames['wiktionary']['en']='DblRedirBot'
console_encoding = 'utf-8'

Remember that a well-run bot is careful to:

  • limit its edits to a rate of one or just a few per minute
  • possibly limit its rate of editing further during peak periods
  • slow or stop its editing if it receives a Wikimedia server overload page
  • stop its editing if it is blocked by an administrator
  • (optionally) stop its editing if it receives a message on its talk page

Project:Bots/Current bot accounts