def tag_kword_articles(credentials, items): jc = JsonConfig(".kwords") config = jc.read() kwords = config["keywords"] total_uids = [] for kword, kword_tag in kwords: uids = isolate_keyword_articles(items, kword.lower(), kword_tag) add_tags(credentials, uids, [kword_tag]) total_uids.extend(uids) return len(total_uids)
def setUp(self): super(PocketTester, self).setUp() jc = JsonConfig(os.path.join(TEST_FILES_DIRECTORY, "sample.json")) items = jc.read() self.sample_items = {"list": items}
def setUp(self): super(PocketTester, self).setUp() jc = JsonConfig(os.path.join(TEST_FILES_DIRECTORY, "sample.json")) items = jc.read() self.sample_items = {"list":items}