Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Wikipedia bot

NotificationsYou must be signed in to change notification settings

yetanotherx/xbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

XBot framework is a full-featured platform for running automated scripts onWikipedia. More than just a helper class for theMediaWiki api,the platform allows many different operations to run in parallel, sharingcomputing resources and information.

A bot processes consists of a class that extends the abstract class BotThread,located in the com.yetanotherx.xbot.bots package. As a result, every bot isa separate thread, so care must be taken to ensure proper thread safety. Eachbot implements a doRun() and doShutdown() method, which get run once at startupand shutdown, respectively. In addition to each bot running in its own thread,bots can assign jobs to the thread as well, which are individual threads thatare specifically assigned to the bot. They get three parameters: the parent botthread, the time to sleep after each run, and whether or not the job shouldloop indefinitely. Each job class must extend the BotJob<? extends BotThread>class (an example would be "class SomeJob extends BotJob" for a jobthat is assigned to SomeThread). These jobs get added to the thread with theBotThread.addJob() method. This adds a job to the thread and starts it.

The bot uses a modified version ofMER-C's Wiki.java.It is modified to use XBot's specific logger, as well as provide some updatedfeatures. The XBotWiki class extends this class, and provides functionality forwrite throttling, configuration parameters, runpage checking, and monitoring.It is accessible using the XBot.getWiki() method.

The bot also contains an interactive console, provided using the jline library.It allows for commands to be given to the bot, that allow for monitoring thestate of the platform, managing which bots are running, stopping/starting theprocess, as well as other useful features. It also contains support for ANSIcolor codes, using the ChatColor class. Console output gets sent to both thestandard output and a file, if the --enable-logging=true parameter is set.

XBot is open source and is available under the GNU General Public License v3.

Compiling

The bot is written for Java 6 and can be built usingMaven.

Dependencies are automatically handled by Maven.

Contributing

I will happily accept contributions, especially through pull requests on GitHub.Submissions must be licensed under the GNU Lesser General Public License v3.

About

Wikipedia bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp