http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9401
Revision: 9401 Author: multichill Date: 2011-07-16 18:53:21 +0000 (Sat, 16 Jul 2011) Log Message: ----------- Add isHiddenCategory()
Modified Paths: -------------- trunk/pywikipedia/catlib.py
Modified: trunk/pywikipedia/catlib.py =================================================================== --- trunk/pywikipedia/catlib.py 2011-07-16 18:32:20 UTC (rev 9400) +++ trunk/pywikipedia/catlib.py 2011-07-16 18:53:21 UTC (rev 9401) @@ -458,6 +458,16 @@ return False return True
+ def isHiddenCategory(self): + """Return True if the category is hidden.""" + text = self.get() + hidden = re.search('__HIDDENCAT__', text) + + if hidden: + return True + else: + return False + def copyTo(self, catname): """ Returns true if copying was successful, false if target page already
pywikipedia-svn@lists.wikimedia.org