Giter Club home page Giter Club logo

pywikibot-core's Introduction

Pywikibot

The Pywikibot framework is a Python library that interfaces with the MediaWiki API version 1.14 or higher.

Also included are various general function scripts that can be adapted for different tasks.

For further information about the library excluding scripts see the full code documentation.

Quick start

git clone https://gerrit.wikimedia.org/r/pywikibot/core.git
cd core
git submodule update --init
python pwb.py script_name

Or to install using PyPI (excluding scripts)

pip install pywikibot --pre

Our installation guide has more details for advanced usage.

Basic Usage

If you wish to write your own script it's very easy to get started:

import pywikibot
site = pywikibot.Site('en', 'wikipedia')  # The site we want to run our bot on
page = pywikibot.Page(site, 'Wikipedia:Sandbox')
page.text = page.text.replace('foo', 'bar')
page.save('Replacing "foo" with "bar"')  # Saves the page

For more documentation on pywikibot see our docs.

The contents of the package

README and config files:
ChangeLog Log file to keep track of major changes versionwise
CREDITS List of major contributors to this module
ez_setup.py Bootstrap distribute installation file, can also be run to install or upgrade setuptools.
generate_family_file.py Creates a new family file.
generate_user_files.py Creates user-config.py or user-fixes.py
LICENSE a reference to the MIT license
pwb.py Wrapper script to use Pywikibot in 'directory' mode
README-conversion.txt Guide to converting bot scripts from version 1 of the Pywikibot framework to version 3
README.rst Short info string used by Pywikibot Nightlies
requirements.txt PIP requirements file
setup.py Installer script for Pywikibot 3.0 framework
user-config.py.sample Example user-config.py file for reference
Directories
pywikibot Contains some libraries and control files
scripts Contains all bots and utility scripts
tests Some test stuff for the developing team

Required external programs

It may require the following programs to function properly:

  • 7za: To extract 7z files

Contributing

Our code is maintained on Wikimedia's Gerrit installation. Learn about how to contribute.

Build Status

pywikibot-core's People

Contributors

xqt avatar jayvdb avatar xzise avatar valhallasw avatar legoktm avatar ricordisamoa avatar ladsgroup avatar 5j9 avatar translatewiki avatar matejsuchanek avatar lokal-profil avatar whym avatar pyfisch avatar hashar avatar magul avatar geofbot avatar nullzero avatar vcamx avatar framawiki avatar multichill avatar happy5214 avatar drtrigon avatar zhuyifei1999 avatar priyankajayaswal avatar marcoaureliowm avatar h4ck3rm1k3 avatar mineo avatar opensourceware avatar malafaya avatar darthbhyrava avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.