def __init__(self, page, main): """Inits the Container and the claim buffers. Gets the item of a page and check if it exists, and if it is already transffered to Wikidata. @param page Wikipedia Page object. @var self.claims Raw claims as extracted. @var self.merged_claims self.claims merged between the languages. @var self.validated_claims Merged claims after checks for some selected propertys. @var self.new_claims Claims, which where not on Wikidata before and have no conficts. @var self.proceed If the item should be extracted. """ #create variables self.lang_claims = [] self.merged_claims = [] self.validated_claims = [] self.new_claims = [] self.proceed = True self.main = main #init parents pywikibot.ItemPage.__init__(self, page.site, page.title()) output.Logger.__init__(self) Rules.__init__(self) self.main = main #get the page if not self.checkNoItem(): self.proceed = False else: self.get() #check if the item is untransferred if self.checkTransferred(): self.proceed = False
def __init__(self, page, main): """Inits the Container and the claim buffers. Gets the item of a page and check if it exists, and if it is already transffered to Wikidata. @param page Wikipedia Page object. @var self.claims Raw claims as extracted. @var self.merged_claims self.claims merged between the languages. @var self.validated_claims Merged claims after checks for some selected propertys. @var self.new_claims Claims, which where not on Wikidata before and have no conficts. @var self.proceed If the item should be extracted. """ #create variables self.lang_claims = [] self.merged_claims = [] self.validated_claims = [] self.new_claims = [] self.proceed = True self.main = main #init parents pywikibot.ItemPage.__init__(self, page.site, page.title()) output.Logger.__init__(self) Rules.__init__(self) self.main = main #get the page if not self.checkNoItem(): self.proceed = False else: self.get() #check if the item is untransferred if self.checkTransferred(): self.proceed = False
def __init__(self): Board.__init__(self) Actions.__init__(self) Rules.__init__(self) self.players = {} self.turn = 0 self.game_over = True
def __init__(self, parent, code, name, params, contents): Rules.__init__(self, parent=parent, code=code, contents=contents) self.__name = name self.__params = list() for param in params: param = Param(code=param['code'], name=param['name'], value=param['value'], parent=self) self.__params.append(param)
def __init__(self, parent, code, name, params, contents): Rules.__init__(self, parent=parent, code=code, contents=contents) self.__name = name self.__params = list() for param in params: param = Param(code=param['code'], name=param['name'], value=param['value'], parent=self) self.__params.append(param)
def __init__(self, parent, code, names=None, contents=None): Rules.__init__(self, parent=parent, code=code, contents=contents) self.__names = names
def __init__(self, parent, code, media, contents=None): Rules.__init__(self, parent=parent, code=code, contents=contents) self.__media = media
def __init__(self, parent, code, names=None, contents=None): Rules.__init__(self, parent=parent, code=code, contents=contents) self.__names = names
def __init__(self, parent, code, media, contents=None): Rules.__init__(self, parent=parent, code=code, contents=contents) self.__media = media