Planning is crucial to obtain an error-free, efficient, and effective program. If you wish to write a new bot, be aware that it may require significant programming ability and a completely new bot will be required to undergo substantial testing before it will be approved for regular operation. For some of these bot frameworks, such as PWB, a general familiarity with scripts is all that is necessary to run the bot successfully as the complex code that makes up the framework has been written and tested by others and is frequently updated (it is important to regularly apply the framework updates for these bots). Other examples of bot frameworks can be found below. The most popular and common of these frameworks is Pywikibot (PWB), a bot framework written in Python, which is well documented and tested and for which, in addition to the framework, many standardized scripts (bot instructions) are available. Since these bot frameworks are in common usage and the complex coding has been done by others and has been heavily tested, it is far easier to get bots based on these frameworks approved for use. These frameworks comprise the vast majority of a bot's code. There are also a number of standard bot frameworks available for download. Many bots publish their source code, which can sometimes be reused with little additional development time. If you decide you need a bot of your own due to the frequency or novelty of your requirements, you don't need to write one from scratch. Semi-bots, such as AWB, can often be operated with little or no understanding of programming. A complete list of Wikipedia semi-bots can be found at w:Wikipedia:Tools/Editing tools. The most popular of these is AutoWikiBrowser (AWB), a browser specifically designed to assist with editing on Wikipedia and other Wikimedia projects. Most of these take the form of enhanced web browsers with MediaWiki-specific functionality. There are a number of semi-bots available to anyone. If you have a simple task that you need to perform lots of times (an example might be to add a template to all pages in a category with 1000 pages), then this is a task better suited to a bot than a human.Ĭonsiderations before creating a bot Why would I need to create a bot? īots can automate tasks and perform them much faster than humans. The explanation is geared mainly towards those who have some prior programming experience, but are unsure of how to apply this knowledge to creating a Wikipedia bot. This page attempts to explain how to carry out the development of a bot for use on Wikimedia projects and much of this is transferable to other wikis based on MediaWiki. MediaWiki Robots or just bots are automatic processes that interact with Wikipedia (and other Wikimedia projects) as though they were human editors. This article is nearly an exact copy of Wikipedia:Wikipedia:Creating a bot. #!/usr/bin/python3 """ stashedit.py MediaWiki API Demos Demo of `stashedit` module: prepare an edit in shared cache MIT license """ import requests S = requests. Type: integer tokenĪ "csrf" token retrieved from action=query&meta=tokens This parameter is required. One of the following values: application/json, application/octet-stream, application/unknown, application/x-binary, text/css, text/javascript, text/plain, text/unknown, text/x-wiki, unknown/unknown baserevid One of the following values: GadgetDefinition, Json.JsonConfig, JsonSchema, Map.JsonConfig, MassMessageListContent, NewsletterContent, Scribunto, SecurePoll, Tabular.JsonConfig, css, flow-board, javascript, json, sanitized-css, text, translate-messagebundle, unknown, wikitext contentformatĬontent serialization format used for the input text. Page content hash from a prior stash to use instead. 0 for the top section, new for a new section. Ibeere POST lati mura edit stash kan ninu kaṣe pinpin. Using the API in MediaWiki and extensions.Perform a prefix search for page titles.Get the current user's watchlist as a feed.Get tokens for data modifying operations.Get meta information about the wiki and user.This page is part of the MediaWiki Action API documentation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |