Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mwclient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WebU
shared
mwclient
Commits
b18263f6
Commit
b18263f6
authored
12 years ago
by
Waldir
Browse files
Options
Downloads
Patches
Plain Diff
convert to markdown + minor tweaks
parent
6e664d98
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+41
-32
41 additions, 32 deletions
README.md
with
41 additions
and
32 deletions
README.md
+
41
−
32
View file @
b18263f6
This files describes mwclient-0.6.5. The latest version is available in the
subversion repository
<https://mwclient.svn.sourceforge.net/svnroot/mwclient>
and also browsable
<http://mwclient.svn.sourceforge.net/viewvc/mwclient/>
.
This file describes mwclient-0.6.5.
The latest version is available in the
[
subversion repository
](
https://mwclient.svn.sourceforge.net/svnroot/mwclient
)
and is also
[
browsable online
](
http://mwclient.svn.sourceforge.net/viewvc/mwclient/
)
.
Mwclient is a client to the MediaWiki API
<http://mediawiki.org/wiki/API>
and allows access to almost all implemented API functions. Mwclient requires
Python 2.4. This version supports MediaWiki 1.11 and above. However, for
functions not available in the current MediaWiki, a MediaWikiVersionError
is raised.
Mwclient is a client to the
[
MediaWiki API
](
http://mediawiki.org/wiki/API
)
and allows access to almost all implemented API functions.
Mwclient requires Python 2.4.
This version supports MediaWiki 1.11 and above.
However, for functions not available in the current MediaWiki,
a
`MediaWikiVersionError`
is raised.
This framework is written by Bryan Tong Minh and serves most of his bots.
The framework and this documentation are primarily written for personal
use and may or may not work for you. In case it doesn't, Bryan can be
contacted on btongminh@users.sourceforge.net.
The framework and this documentation are primarily written for personal use
and may or may not work for you.
In case it doesn't, Bryan can be contacted on btongminh@users.sourceforge.net.
This framework heavily depends on Bob Ippolito's
[
simplejson
](
https://pypi.python.org/pypi/simplejson
)
.
This framework heavily depends on simplejson, (c) copyright Bob Ippolito.
== Implementation notes ==
Most properties and generators accept the same parameters as the API, without
their two letter prefix. Exceptions to this rule:
*
Image.imageinfo is the imageinfo of the latest image. Earlier versions can be
fetched using imagehistory()
*
Site.all
*
: parameter [ap]from renamed to start
*
categorymembers is implemented as Category.members
*
deletedrevs is deletedrevisions
*
usercontribs is usercontributions
*
First parameters of search and usercontributions are search and user
## Implementation notes ##
Most properties and generators accept the same parameters as the API,
without their two letter prefix.
Exceptions to this rule:
*
`Image.imageinfo`
is the imageinfo of the latest image. Earlier versions can be
fetched using
`imagehistory()`
*
`Site.all*`
: parameter
`[ap]from`
renamed to
`start`
*
`categorymembers`
is implemented as
`Category.members`
*
`deletedrevs`
is
`deletedrevisions`
*
`usercontribs`
is
`usercontributions`
*
First parameters of
`search`
and
`usercontributions`
are
`search`
and
`user`
respectively
Properties and generators are implemented as Python generators. Their limit
parameter is only an indication of the number of items in one chunk. It is not
the total limit. Doing list(generator(limit = limit)) will return ALL items of
generator, and not be limited by the limit value.
Properties and generators are implemented as Python generators.
Their limit parameter is only an indication of the number of items in one chunk.
It is not the total limit.
Doing
`list(generator(limit = limit))`
will return ALL items of generator,
and not be limited by the limit value.
Default chunk size is generally the maximum chunk size.
== HTTPS ==
To use https, specify the host as a tuple in the form of ('https', hostname).
== Example ==
## HTTPS ##
To use https, specify the host as a tuple in the form of
`('https', hostname)`
.
## Example ##
```
python
## For more information, see REFERENCE.txt
# Init site object
import
mwclient
...
...
@@ -63,8 +71,9 @@ site.upload(open('file.jpg'), 'destination.jpg', 'Image description')
# Listing all categories (don't do this in reality)
for
category
in
site
.
allcategories
():
print
category
```
==
License
==
##
License
##
Copyright (c) 2006-2011 Bryan Tong Minh
Permission is hereby granted, free of charge, to any person
...
...
@@ -86,4 +95,4 @@ for category in site.allcategories():
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
OTHER DEALINGS IN THE SOFTWARE.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment