https://bugzilla.wikimedia.org/show_bug.cgi?id=58939

Jeff Hall <jh...@wikimedia.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugzilla.wikimedia.
                   |                            |org/show_bug.cgi?id=58555

--- Comment #1 from Jeff Hall <jh...@wikimedia.org> ---
Building off the work that Aaron Arcos did for Bug 58555, we can use this
Python library for Mediawiki interaction:

https://github.com/mwclient/mwclient

…and then create a script as simple as this to create a new wiki article:

import mwclient
site = mwclient.Site('en.wikipedia.beta.wmflabs.org')
site.login('<username>', '<password>')
page = site.Pages['Dune Messiah']
text = page.edit()
page.save(text + u'\nDune Messiah is a book by Frank Herbert.', summary = 'Page
created via API call')

While we could also do this via Ruby, it seems that we might want to use Python
instead for consistency with the API test(s) that Aaron has already developed. 
Added bonus is that the "mwclient" library for Python seems to be actively
maintained, while most of the Ruby libraries listed here do not appear to be
actively maintained:

http://www.mediawiki.org/wiki/API:Client_code

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to