2016-04-27 19:30 GMT+01:00 John Mark Vandenberg jayvdb@gmail.com:
Pywikibot has a class ProofreadPage which allows modification of level via simple attributes and methods.
https://github.com/wikimedia/pywikibot-core/blob/master/pywikibot/proofreadp...
If you dont want to use Pywikibot, its code can be helpful and it can be copied using very unrestrictive MIT license (and the authors would likely be happy to relicense it to another license if that was useful.
Regards, John Vandenberg
Thanks for pointing pywikibot. Never used it before.
Now learnt it and used the following snippet, to change the page quality level.
import pywikibot from pywikibot import proofreadpage
site = pywikibot.Site('ta','wikisource') page = pywikibot.Page(site, u"Page:"<pagename>) text = page.text
pa = proofreadpage.ProofreadPage(page)
pa.text = pa.text.replace('level="1"','level="3"')
pa.save(summary="demo")
Thanks again.