#!/usr/bin/python # Copyright 2015 (c) Anna Schumaker. import slack for channel in slack.channels.list(): if not channel.is_member(): continue if channel.unread_count() == 0 or channel.unread_count() == None: continue text = [ str(channel) ] + [ "" ] for message in channel.read(): text += [ str(message) ] print("\n".join(text)) print()