def __init__(self): self.__conf = Configure() self.__associations = Associations() self.__sites = Sites() resultList = [] xReader = XMLReader() xParser = XMLParser() confTree = xReader.getTree('xml/conf.xml') if confTree == None: exit() searchParams = xParser.getSearchParams(confTree) searchSites = xParser.getSearchSites(confTree) pagesToSearch = xParser.getPagesToSearch(confTree) self.masterInspectionPath = xParser.getMIXML(confTree) self.__conf.setParams(searchSites, searchParams, pagesToSearch) keywordTree = xReader.getTree('xml/keywords.xml') fKeywordTree = xReader.getTree('xml/f_keywords.xml') if keywordTree == None or fKeywordTree == None: exit() keywords = xParser.getKeywords(keywordTree) fKeywords = xParser.getKeywords(fKeywordTree) avoids = xParser.getAvoids(keywordTree) fAvoids = xParser.getAvoids(fKeywordTree) self.__associations.setParams(keywords, avoids, fKeywords, fAvoids) sitesTree = xReader.getTree('xml/sites.xml') if sitesTree == None: exit() goodSites, badSites = xParser.getSites(sitesTree) self.__sites.setParams(goodSites, badSites)
def __init__(self, vote, voteId, skip = False): if skip: return self.vote = vote self.voteId = voteId xReader = XMLReader() xParser = XMLParser() confTree = xReader.getTree('xml/conf.xml') if confTree == None: print('Abort. Failed to read xml/conf.xml') exit() self.masterInspectionPath = xParser.getMIXML(confTree)