Wiktionary:Bots: difference between revisions

From Wiktionary, the free dictionary
Jump to navigation Jump to search
Content deleted Content added
m wikilink
expand policy per recent discussion
Line 1: Line 1:
{{shortcut|WT:BOT}}
{{shortcut|WT:BOT}}


A "[[bot#Noun_2|bot]]" is a computer-controlled process that interacts with the wiki, much like human users do, but in an automated fashion, usually used to perform repetitive tasks. Their editing happens much faster, and can easily flood the [[Special:Recentchanges]] page. For this reason, bots 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.
A "[[bot#Noun_2|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 run 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.


General 'bot usage on the English Wiktionary has historically been discouraged. Contrary to Wikipedia and most other Wikimedia projects, the English Wiktionary has the odd policy of allowing '''only one''' task per bot account. Therefore, if users want several tasks to be done, they'll need as many accounts and bot flags as there are tasks.
In the past, bot usage on the English Wiktionary has been somewhat discouraged. Acceptance for their use is growing, but their usage here remains somewhat different than 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.

[There are some who favor altering this aspect of the policy; see the [[Wiktionary talk:Bots#One bot per task?|talk page]] if you wish to discuss this.]
====Policy====

Wiktionary's bot policy is based on, but is somewhat different from, the [[w:Wikipedia:Bots|Wikipedia bot policy]]. If you have not already read Wikipedia's bot policy, please [[w:Wikipedia:Bots|do so now]].

Like Wikipedia, Wiktionary requires that bots be approved in advance. This approval is for two reasons:

# To ensure that the bot software is properly written; to give interested bystanders an opportunity to review the code if necessary.
# 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:

# I will use the bot to perform only such edits as I would, in good conscience, perform manually myself, except that
# I will ''not'' "be bold" with the bot, and specifically, before giving the bot a task to do,
# I will ask around for consensus, perhaps at the [[Wiktionary:Beer parlour|Beer parlour]], or
# 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,
# 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
# I will un-do (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====
====Process====


If you think you have a task likely to be done much more easily by a bot, try [[m:using the python wikipediabot|using the python wikipediabot]] and see if it helps. '''Generally, use of bots on the English Wiktionary is discouraged.''' Only if you've made sure that it will significantly help getting the task done, create an additional account for your bot tasks. Either link the account's name to your own username, or to the task the bot will be doing. In our case, the latter will be more useful. Make sure you link the bot account to your user account, and preferably vice versa as well.
If you think you have a task likely to be done much more easily by a bot, try [[m:using the python wikipediabot|using the python wikipediabot]] 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-100 entries until you're certain everything goes well. Please mark the edits as minor if you're doing a lot of them. Finally, if you're certain, you can request bot status in the [[Wiktionary:Beer parlour]]. If consensus is reached, ask a [[Wiktionary:Bureaucrats|Bureaucrat]] to set the flag if none shows up.
Then, do a test run (under the bot account) on some 10-100 entries until you're certain everything goes well. 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 [[Wiktionary:Beer parlour|Beer parlour]]. Clearly state:
# Your user name,
# The proposed bot user name,
# The bot software you'll be using, with pointers to its source and documentation if it's not standard, and
# 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 Wiktionary 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 Wiktionary editing differs from, say, Wikipedia's. Wiktionary pages are more structured than Wikipedia's, and your bot must respect this. (Indeed, bots are one tool Wiktionary 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 Wiktionary'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 [[Wiktionary:Bureaucrats|Wiktionary 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 [[w:Wikipedia:Bots|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====
====Technical advice====
Line 27: Line 62:
usernames['wiktionary']['en']='DblRedirBot'
usernames['wiktionary']['en']='DblRedirBot'
console_encoding = 'utf-8'
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


====[[Special:Listusers/bot|Current accounts with the bot flag]]====
====[[Special:Listusers/bot|Current accounts with the bot flag]]====

Revision as of 14:56, 3 September 2006

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 run 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 Wiktionary has been somewhat discouraged. Acceptance for their use is growing, but their usage here remains somewhat different than 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

Wiktionary'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, Wiktionary 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 un-do (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 the python wikipediabot 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-100 entries until you're certain everything goes well. 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 Beer parlour. 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 Wiktionary 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 Wiktionary editing differs from, say, Wikipedia's. Wiktionary pages are more structured than Wikipedia's, and your bot must respect this. (Indeed, bots are one tool Wiktionary 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 Wiktionary'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 Wiktionary 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:

  • pagesfromfile.py
  • redirect.py
  • interwiki.py caution: GerardM only.
  • replace.py
  • template.py
  • category.py

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
Active or semi-active bots
Inactive bots