http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9402
Revision: 9402 Author: xqt Date: 2011-07-16 19:40:38 +0000 (Sat, 16 Jul 2011) Log Message: ----------- Add isHiddenCategory() from trunk r9401
Modified Paths: -------------- branches/rewrite/pywikibot/page.py
Modified: branches/rewrite/pywikibot/page.py =================================================================== --- branches/rewrite/pywikibot/page.py 2011-07-16 18:53:21 UTC (rev 9401) +++ branches/rewrite/pywikibot/page.py 2011-07-16 19:40:38 UTC (rev 9402) @@ -1727,6 +1727,12 @@ return False return True
+ def isHiddenCategory(self): + """Return True if the category is hidden.""" + text = self.get() + hidden = re.search('__HIDDENCAT__', text) + return bool(hidden) + def copyTo(self, cat, message): """ Copy text of category page to a new page. Does not move contents.
pywikipedia-svn@lists.wikimedia.org