Ejemplo n.º 1
0
def fetch_all(feeds, menu = None):
	if menu is None:
		menu = Menu('RSS')
	for name in feeds:
		if feeds[name].__class__.__name__ == 'dict':
			# it's a folder
			submenu = Menu(name)
			fetch_all(feeds[name], submenu)
			menu.append(submenu)
		else:
			# if it's not a folder, assume it's a feed
			menu.append(read_feed(feeds[name], name))
	return menu
Ejemplo n.º 2
0
def build_menu():
  menu = Menu('RSS')
  menu.add(rss.main(config.get('rss')).items)
  menu.append(MenuItem('Refresh', 'refresh'))
  # TODO remove the need for this
  return menu