2016-04-27 19:30 GMT+01:00 John Mark Vandenberg <jay...@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/proofreadpage.py#L67 > > 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. -- Regards, T.Shrinivasan My Life with GNU/Linux : http://goinggnu.wordpress.com Free E-Magazine on Free Open Source Software in Tamil : http://kaniyam.com Get Free Tamil Ebooks for Android, iOS, Kindle, Computer : http://FreeTamilEbooks.com _______________________________________________ Wikimediaindia-l mailing list Wikimediaindia-l@lists.wikimedia.org To unsubscribe from the list / change mailing preferences visit https://lists.wikimedia.org/mailman/listinfo/wikimediaindia-l