Index: trunk/debs/mwclient/debian/control |
— | — | @@ -0,0 +1,14 @@ |
| 2 | +Source: mwclient |
| 3 | +Maintainer: Ryan Lane <rlane@wikimedia.org> |
| 4 | +Section: python |
| 5 | +Priority: optional |
| 6 | +Build-Depends: python-setuptools (>= 0.6b3), debhelper (>= 7), python-support (>= 0.8.4) |
| 7 | +Standards-Version: 3.7.2 |
| 8 | + |
| 9 | +Package: python-mwclient |
| 10 | +Architecture: all |
| 11 | +Depends: ${python:Depends}, python-simplejson |
| 12 | +XB-Python-Version: ${python:Versions} |
| 13 | +Provides: ${python:Provides} |
| 14 | +Description: MediaWiki API client |
| 15 | + |
Index: trunk/debs/mwclient/debian/compat |
— | — | @@ -0,0 +1 @@ |
| 2 | +7 |
Index: trunk/debs/mwclient/debian/python-mwclient.preinst |
— | — | @@ -0,0 +1,14 @@ |
| 2 | +#! /bin/sh |
| 3 | + |
| 4 | +set -e |
| 5 | + |
| 6 | +# This was added by stdeb to workaround Debian #479852. In a nutshell, |
| 7 | +# pycentral does not remove normally remove its symlinks on an |
| 8 | +# upgrade. Since we're using python-support, however, those symlinks |
| 9 | +# will be broken. This tells python-central to clean up any symlinks. |
| 10 | +if [ -e /var/lib/dpkg/info/python-mwclient.list ] && which pycentral >/dev/null 2>&1 |
| 11 | +then |
| 12 | + pycentral pkgremove python-mwclient |
| 13 | +fi |
| 14 | + |
| 15 | +#DEBHELPER# |
Index: trunk/debs/mwclient/debian/changelog |
— | — | @@ -0,0 +1,5 @@ |
| 2 | +mwclient (0.6.5-1) lucid-wikimedia; urgency=low |
| 3 | + |
| 4 | + * Initial package |
| 5 | + |
| 6 | + -- Ryan Lane <rlane@wikimedia.org> Mon, 25 Apr 2011 22:57:00 +0000 |
Index: trunk/debs/mwclient/debian/rules |
— | — | @@ -0,0 +1,22 @@ |
| 2 | +#!/usr/bin/make -f |
| 3 | + |
| 4 | +# This file was automatically generated by stdeb 0.5.1 at |
| 5 | +# Mon, 25 Apr 2011 22:57:00 +0000 |
| 6 | + |
| 7 | +# Unset the environment variables set by dpkg-buildpackage. (This is |
| 8 | +# necessary because distutils is brittle with compiler/linker flags |
| 9 | +# set. Specifically, packages using f2py will break without this.) |
| 10 | +unexport CPPFLAGS |
| 11 | +unexport CFLAGS |
| 12 | +unexport CXXFLAGS |
| 13 | +unexport FFLAGS |
| 14 | +unexport LDFLAGS |
| 15 | + |
| 16 | +#exports specified using stdeb Setup-Env-Vars: |
| 17 | +export DH_OPTIONS=--buildsystem=python_distutils |
| 18 | + |
| 19 | + |
| 20 | +%: |
| 21 | + dh $@ |
| 22 | + |
| 23 | + |
Property changes on: trunk/debs/mwclient/debian/rules |
___________________________________________________________________ |
Added: svn:executable |
1 | 24 | + * |
Index: trunk/debs/mwclient/setup.py |
— | — | @@ -0,0 +1,18 @@ |
| 2 | +#!/usr/bin/env python |
| 3 | +# setup.py -- Setup file for mwclient |
| 4 | +# Author: Baishampayan Ghose <b.ghose@gmail.com> |
| 5 | +# Yuvi Panda <yuvipanda@yuvi.in> |
| 6 | +from setuptools import setup |
| 7 | + |
| 8 | +setup(name='mwclient', |
| 9 | + version='0.6.5', |
| 10 | + license="MIT License", |
| 11 | + description='MediaWiki API client', |
| 12 | + author='Bryan Tong Minh', |
| 13 | + author_email='btongminh@users.sourceforge.net', |
| 14 | + url='http://sourceforge.net/projects/mwclient/', |
| 15 | + maintainer='Baishampayan Ghose', |
| 16 | + maintainer_email='b.ghose@gmail.com', |
| 17 | + keywords=('wikipedia', 'mediawiki'), |
| 18 | + packages=['mwclient'] |
| 19 | + ) |
Index: trunk/debs/mwclient/PKG-INFO |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +Metadata-Version: 1.0 |
| 3 | +Name: mwclient |
| 4 | +Version: 0.6.5 |
| 5 | +Summary: MediaWiki API client |
| 6 | +Home-page: http://sourceforge.net/projects/mwclient/ |
| 7 | +Author: Baishampayan Ghose |
| 8 | +Author-email: b.ghose@gmail.com |
| 9 | +License: MIT License |
| 10 | +Description: UNKNOWN |
| 11 | +Keywords: wikipedia,mediawiki |
| 12 | +Platform: UNKNOWN |
Index: trunk/debs/mwclient/README.txt |
— | — | @@ -0,0 +1,89 @@ |
| 2 | +This files describes mwclient-0.6.5. The latest version is available in the
|
| 3 | +subversion repository <https://mwclient.svn.sourceforge.net/svnroot/mwclient>
|
| 4 | +and also browsable <http://mwclient.svn.sourceforge.net/viewvc/mwclient/>.
|
| 5 | +
|
| 6 | +Mwclient is a client to the MediaWiki API <http://mediawiki.org/wiki/API>
|
| 7 | +and allows access to almost all implemented API functions. Mwclient requires
|
| 8 | +Python 2.4. This version supports MediaWiki 1.11 and above. However, for
|
| 9 | +functions not available in the current MediaWiki, a MediaWikiVersionError
|
| 10 | +is raised.
|
| 11 | +
|
| 12 | +This framework is written by Bryan Tong Minh and serves most of his bots.
|
| 13 | +The framework and this documentation are primarily written for personal
|
| 14 | +use and may or may not work for you. In case it doesn't, Bryan can be
|
| 15 | +contacted on btongminh@users.sourceforge.net.
|
| 16 | +
|
| 17 | +This framework heavily depends on simplejson, (c) copyright Bob Ippolito.
|
| 18 | +
|
| 19 | +
|
| 20 | +== Implementation notes ==
|
| 21 | +Most properties and generators accept the same parameters as the API, without
|
| 22 | +their two letter prefix. Exceptions to this rule:
|
| 23 | +* Image.imageinfo is the imageinfo of the latest image. Earlier versions can be
|
| 24 | + fetched using imagehistory()
|
| 25 | +* Site.all* : parameter [ap]from renamed to start
|
| 26 | +* categorymembers is implemented as Category.members
|
| 27 | +* deletedrevs is deletedrevisions
|
| 28 | +* usercontribs is usercontributions
|
| 29 | +* First parameters of search and usercontributions are search and user
|
| 30 | + respectively
|
| 31 | +
|
| 32 | +Properties and generators are implemented as Python generators. Their limit
|
| 33 | +parameter is only an indication of the number of items in one chunk. It is not
|
| 34 | +the total limit. Doing list(generator(limit = limit)) will return ALL items of
|
| 35 | +generator, and not be limited by the limit value.
|
| 36 | +Default chunk size is generally the maximum chunk size.
|
| 37 | +
|
| 38 | +== HTTPS ==
|
| 39 | +To use https, specify the host as a tuple in the form of ('https', hostname).
|
| 40 | +
|
| 41 | +== Example ==
|
| 42 | +## For more information, see REFERENCE.txt
|
| 43 | +# Init site object
|
| 44 | +import mwclient
|
| 45 | +site = mwclient.Site('commons.wikimedia.org')
|
| 46 | +site.login(username, password) # Optional
|
| 47 | +
|
| 48 | +# Edit page
|
| 49 | +page = site.Pages['Commons:Sandbox']
|
| 50 | +text = page.edit()
|
| 51 | +print 'Text in sandbox:', text.encode('utf-8')
|
| 52 | +page.save(text + u'\nExtra data', summary = 'Test edit')
|
| 53 | +
|
| 54 | +# Printing imageusage
|
| 55 | +image = site.Images['Example.jpg']
|
| 56 | +print 'Image', image.name.encode('utf-8'), 'usage:'
|
| 57 | +for page in image.imageusage():
|
| 58 | + print 'Used:', page.name.encode('utf-8'), '; namespace', page.namespace
|
| 59 | + print 'Image info:', image.imageinfo
|
| 60 | +
|
| 61 | +# Uploading a file
|
| 62 | +site.upload(open('file.jpg'), 'destination.jpg', 'Image description')
|
| 63 | +
|
| 64 | +# Listing all categories (don't do this in reality)
|
| 65 | +for category in site.allcategories():
|
| 66 | + print category
|
| 67 | +
|
| 68 | +== License ==
|
| 69 | + Copyright (c) 2006-2009 Bryan Tong Minh
|
| 70 | +
|
| 71 | + Permission is hereby granted, free of charge, to any person
|
| 72 | + obtaining a copy of this software and associated documentation
|
| 73 | + files (the "Software"), to deal in the Software without
|
| 74 | + restriction, including without limitation the rights to use,
|
| 75 | + copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 76 | + copies of the Software, and to permit persons to whom the
|
| 77 | + Software is furnished to do so, subject to the following
|
| 78 | + conditions:
|
| 79 | +
|
| 80 | + The above copyright notice and this permission notice shall be
|
| 81 | + included in all copies or substantial portions of the Software.
|
| 82 | +
|
| 83 | + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 84 | + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
| 85 | + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
| 86 | + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
| 87 | + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
| 88 | + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
| 89 | + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
| 90 | + OTHER DEALINGS IN THE SOFTWARE. |
\ No newline at end of file |
Index: trunk/debs/mwclient/mwclient.egg-info/SOURCES.txt |
— | — | @@ -0,0 +1,17 @@ |
| 2 | +README.txt |
| 3 | +setup.cfg |
| 4 | +setup.py |
| 5 | +mwclient/__init__.py |
| 6 | +mwclient/client.py |
| 7 | +mwclient/compatibility.py |
| 8 | +mwclient/errors.py |
| 9 | +mwclient/ex.py |
| 10 | +mwclient/http.py |
| 11 | +mwclient/listing.py |
| 12 | +mwclient/page.py |
| 13 | +mwclient/page_nowriteapi.py |
| 14 | +mwclient/upload.py |
| 15 | +mwclient.egg-info/PKG-INFO |
| 16 | +mwclient.egg-info/SOURCES.txt |
| 17 | +mwclient.egg-info/dependency_links.txt |
| 18 | +mwclient.egg-info/top_level.txt |
\ No newline at end of file |
Index: trunk/debs/mwclient/mwclient.egg-info/top_level.txt |
— | — | @@ -0,0 +1 @@ |
| 2 | +mwclient |
Index: trunk/debs/mwclient/mwclient.egg-info/PKG-INFO |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +Metadata-Version: 1.0 |
| 3 | +Name: mwclient |
| 4 | +Version: 0.6.5 |
| 5 | +Summary: MediaWiki API client |
| 6 | +Home-page: http://sourceforge.net/projects/mwclient/ |
| 7 | +Author: Baishampayan Ghose |
| 8 | +Author-email: b.ghose@gmail.com |
| 9 | +License: MIT License |
| 10 | +Description: UNKNOWN |
| 11 | +Keywords: wikipedia,mediawiki |
| 12 | +Platform: UNKNOWN |
Index: trunk/debs/mwclient/mwclient.egg-info/dependency_links.txt |
— | — | @@ -0,0 +1 @@ |
| 2 | + |
Index: trunk/debs/mwclient/mwclient.egg-info/requires.txt |
— | — | @@ -0,0 +1 @@ |
| 2 | +simplejson |
\ No newline at end of file |
Index: trunk/debs/mwclient/setup.cfg |
— | — | @@ -0,0 +1,5 @@ |
| 2 | +[egg_info] |
| 3 | +tag_build = |
| 4 | +tag_date = 0 |
| 5 | +tag_svn_revision = 0 |
| 6 | + |