All Projects → barrust → Mediawiki

barrust / Mediawiki

Licence: mit
MediaWiki API wrapper in python http://pymediawiki.readthedocs.io/en/latest/

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Mediawiki

Mwparserfromhell
A Python parser for MediaWiki wikicode
Stars: ✭ 440 (+394.38%)
Mutual labels:  wikipedia, mediawiki, parser
DiscordWikiBot
Discord bot for Wikimedia projects and MediaWiki wiki sites
Stars: ✭ 30 (-66.29%)
Mutual labels:  mediawiki, wikipedia
wikiapi
JavaScript MediaWiki API for node.js
Stars: ✭ 28 (-68.54%)
Mutual labels:  mediawiki, wikipedia
Kgt
BNF wrangling and railroad diagrams
Stars: ✭ 312 (+250.56%)
Mutual labels:  parser-library, parser
cassandra-GLAM-tools
Support GLAMs in monitoring and evaluating their cooperation with Wikimedia projects
Stars: ✭ 17 (-80.9%)
Mutual labels:  mediawiki, wikipedia
wikipedia-reference-scraper
Wikipedia API wrapper for references
Stars: ✭ 34 (-61.8%)
Mutual labels:  wikipedia, api-wrapper
Dart Petitparser
Dynamic parser combinators in Dart.
Stars: ✭ 266 (+198.88%)
Mutual labels:  parser-library, parser
Wikipedia Mirror
🌐 Guide and tools to run a full offline mirror of Wikipedia.org with three different approaches: Nginx caching proxy, Kimix + ZIM dump, and MediaWiki/XOWA + XML dump
Stars: ✭ 160 (+79.78%)
Mutual labels:  wikipedia, mediawiki
Wptools
Wikipedia tools (for Humans): easily extract data from Wikipedia, Wikidata, and other MediaWikis
Stars: ✭ 371 (+316.85%)
Mutual labels:  wikipedia, mediawiki
Wikiteam
Tools for downloading and preserving wikis. We archive wikis, from Wikipedia to tiniest wikis. As of 2020, WikiTeam has preserved more than 250,000 wikis.
Stars: ✭ 404 (+353.93%)
Mutual labels:  wikipedia, mediawiki
discord-wiki-bot
Wiki-Bot is a bot with the purpose to easily search for and link to wiki pages. Wiki-Bot shows short descriptions and additional info about the pages and is able to resolve redirects and follow interwiki links.
Stars: ✭ 69 (-22.47%)
Mutual labels:  mediawiki, wikipedia
Wikipedir
R's MediaWiki API client library
Stars: ✭ 54 (-39.33%)
Mutual labels:  api-wrapper, mediawiki
Mwclient
Python client library to interface with the MediaWiki API
Stars: ✭ 221 (+148.31%)
Mutual labels:  wikipedia, mediawiki
wikibot
Some MediaWiki bot examples including wikipedia, wikidata using MediaWiki module of CeJS library. 採用 CeJS MediaWiki 自動化作業用程式庫來製作 MediaWiki (維基百科/維基數據) 機器人的範例。
Stars: ✭ 26 (-70.79%)
Mutual labels:  mediawiki, wikipedia
Mediawiki
🌻 The collaborative editing software that runs Wikipedia. Mirror from https://gerrit.wikimedia.org/g/mediawiki/core. See https://mediawiki.org/wiki/Developer_access for contributing.
Stars: ✭ 2,752 (+2992.13%)
Mutual labels:  wikipedia, mediawiki
copyvios
A copyright violation detector running on Wikimedia Cloud Services
Stars: ✭ 32 (-64.04%)
Mutual labels:  mediawiki, wikipedia
Huggle3 Qt Lx
Huggle is an anti-vandalism tool for use on MediaWiki based projects
Stars: ✭ 143 (+60.67%)
Mutual labels:  wikipedia, mediawiki
Infoboxer
Wikipedia information extraction library
Stars: ✭ 147 (+65.17%)
Mutual labels:  wikipedia, mediawiki
Mercury Parser
📜 Extract meaningful content from the chaos of a web page
Stars: ✭ 4,025 (+4422.47%)
Mutual labels:  parser-library, parser
Substitution Schedule Parser
Java library for parsing schools' substitution schedules. Supports multiple different systems mainly used in the German-speaking countries, including Untis, svPlan, and DAVINCI
Stars: ✭ 33 (-62.92%)
Mutual labels:  parser-library, parser

MediaWiki

.. image:: https://img.shields.io/badge/license-MIT-blue.svg :target: https://opensource.org/licenses/MIT/ :alt: License .. image:: https://img.shields.io/github/release/barrust/mediawiki.svg :target: https://github.com/barrust/mediawiki/releases :alt: GitHub release .. image:: https://github.com/barrust/mediawiki/workflows/Python%20package/badge.svg :target: https://github.com/barrust/mediawiki/actions?query=workflow%3A%22Python+package%22 :alt: Build Status .. image:: https://codecov.io/gh/barrust/mediawiki/branch/master/graph/badge.svg?token=OdETiNgz9k :target: https://codecov.io/gh/barrust/mediawiki :alt: Test Coverage .. image:: https://api.codacy.com/project/badge/Grade/afa87d5f5b6e4e66b78e15dedbc097ec :target: https://www.codacy.com/app/barrust/mediawiki?utm_source=github.com&utm_medium=referral&utm_content=barrust/mediawiki&utm_campaign=Badge_Grade :alt: Codacy Review .. image:: https://badge.fury.io/py/pymediawiki.svg :target: https://badge.fury.io/py/pymediawiki :alt: PyPi Release .. image:: http://pepy.tech/badge/pymediawiki :target: http://pepy.tech/count/pymediawiki :alt: Downloads

mediawiki is a python wrapper and parser for the MediaWiki API. The goal is to allow users to quickly and efficiently pull data from the MediaWiki site of their choice instead of worrying about dealing directly with the API. As such, it does not force the use of a particular MediaWiki site. It defaults to Wikipedia <http://www.wikipedia.org>__ but other MediaWiki sites can also be used.

MediaWiki wraps the MediaWiki API <https://www.mediawiki.org/wiki/API>_ so you can focus on leveraging your favorite MediaWiki site's data, not getting it. Please check out the code on github <https://www.github.com/barrust/mediawiki>_!

Note: this library was designed for ease of use and simplicity. If you plan on doing serious scraping, automated requests, or editing, please look into Pywikibot <https://www.mediawiki.org/wiki/Manual:Pywikibot>__ which has a larger API, advanced rate limiting, and other features so we may be considerate of the MediaWiki infrastructure. Pywikibot has also other extra features such as support for Wikibase (that runs Wikidata).

Installation

Pip Installation:

::

$ pip install pymediawiki

To install from source:

To install mediawiki, simply clone the repository on GitHub <https://github.com/barrust/mediawiki>__, then run from the folder:

::

$ python setup.py install

mediawiki supports python versions 3.5 - 3.9

For python 2.7 support, install release 0.6.7 <https://github.com/barrust/mediawiki/releases/tag/v0.6.7>__

::

$ pip install pymediawiki==0.6.7

Documentation

Documentation of the latest release is hosted on readthedocs.io <http://pymediawiki.readthedocs.io/en/latest/?>__

To build the documentation yourself run:

::

$ pip install sphinx
$ cd docs/
$ make html

Automated Tests

To run automated tests, one must simply run the following command from the downloaded folder:

::

$ python setup.py test

Quickstart

Import mediawiki and run a standard search against Wikipedia:

.. code:: python

>>> from mediawiki import MediaWiki
>>> wikipedia = MediaWiki()
>>> wikipedia.search('washington')

Run more advanced searches:

.. code:: python

>>> wikipedia.opensearch('washington')
>>> wikipedia.allpages('a')
>>> wikipedia.geosearch(title='washington, d.c.')
>>> wikipedia.geosearch(latitude='0.0', longitude='0.0')
>>> wikipedia.prefixsearch('arm')
>>> wikipedia.random(pages=10)

Pull a MediaWiki page and some of the page properties:

.. code:: python

>>> p = wikipedia.page('Chess')
>>> p.title
>>> p.summary
>>> p.categories
>>> p.images
>>> p.links
>>> p.langlinks

See the documentation for more examples! <http://pymediawiki.readthedocs.io/en/latest/quickstart.html#quickstart>_

Changelog

Please see the changelog <https://github.com/barrust/mediawiki/blob/master/CHANGELOG.md>__ for a list of all changes.

License

MIT licensed. See the LICENSE file <https://github.com/barrust/Wikipedia/blob/master/LICENSE>__ for full details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].